From 8038388cb37bc7220805cc19ed9f83ad25c5b6f7 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 6 Jul 2023 03:09:28 -0400 Subject: [PATCH] Update Darwin availability annotations. (#27642) * Update to the Fan Control renames from #27434. * Put in the correct Darwin versions for fall release in availability.yaml. * Move anything that is not 100% known to be stable right now to provisional for Darwin fall release in availability.yaml. * Add backwards-compat shim for MTRFanControlWindSettingMask. * Turn off darwin-framework-tool tests that would use the now-not-existing APIs. * Fix availability annotations for initWithResponseValue for command response payloads. * Replace non-generated MTR_NEWLY_* annotations with appropriate API_AVAILABLE and MTR_DEPRECATED. --- .../templates/tests/ciTests.json | 46 +- .../tests/partials/test_cluster.zapt | 13 +- .../Framework/CHIP/MTRBackwardsCompatShims.h | 20 +- src/darwin/Framework/CHIP/MTRBaseDevice.h | 39 +- src/darwin/Framework/CHIP/MTRCSRInfo.h | 11 +- .../CHIP/MTRCommissionableBrowserDelegate.h | 2 +- .../CHIP/MTRCommissionableBrowserResult.h | 2 +- .../CHIP/MTRCommissioningParameters.h | 4 +- src/darwin/Framework/CHIP/MTRDevice.h | 4 +- .../Framework/CHIP/MTRDeviceController.h | 8 +- .../CHIP/MTRDeviceControllerDelegate.h | 12 +- .../CHIP/MTRDeviceControllerStartupParams.h | 4 +- src/darwin/Framework/CHIP/MTRError.h | 6 +- .../CHIP/MTROnboardingPayloadParser.h | 6 +- .../templates/MTRCommandPayloadsObjc.zapt | 2 +- .../CHIP/templates/availability.yaml | 1311 +- .../MTRAttributeSpecifiedCheck.mm | 1781 +- .../MTRAttributeTLVValueDecoder.mm | 9037 +- .../CHIP/zap-generated/MTRBaseClusters.h | 12474 +-- .../CHIP/zap-generated/MTRBaseClusters.mm | 59839 ++++------- .../zap-generated/MTRBaseClusters_Internal.h | 85 - .../CHIP/zap-generated/MTRCallbackBridge.h | 20112 +--- .../CHIP/zap-generated/MTRCallbackBridge.mm | 14183 +-- .../CHIP/zap-generated/MTRClusterConstants.h | 592 +- .../CHIP/zap-generated/MTRClusters.h | 1044 +- .../CHIP/zap-generated/MTRClusters.mm | 8815 +- .../CHIP/zap-generated/MTRClusters_Internal.h | 85 - .../zap-generated/MTRCommandPayloadsObjc.h | 479 +- .../zap-generated/MTRCommandPayloadsObjc.mm | 390 - .../MTRCommandPayloads_Internal.h | 7 - .../zap-generated/MTREventTLVValueDecoder.mm | 501 - .../CHIP/zap-generated/MTRStructsObjc.h | 239 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 418 - .../zap-generated/cluster/Commands.h | 50680 +++------ .../zap-generated/test/Commands.h | 88227 ++++++---------- 35 files changed, 87472 insertions(+), 183006 deletions(-) diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index f8f9dca68c2060..bf7fcca70ce307 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -65,6 +65,50 @@ "Test_TC_WTREMON_2_1", "Disabled due to using provisional Zeolite Filter Monitoring (ZeoliteFilterMonitoring) cluster:", "Test_TC_ZEOFREMON_1_1", - "Test_TC_ZEOFREMON_2_1" + "Test_TC_ZEOFREMON_2_1", + "Disabled due to AirQuality not being enabled in Matter.framework for now:", + "Test_TC_AIRQUAL_1_1", + "Test_TC_AIRQUAL_2_1", + "Disabled due to CarbonDioxideConcentrationMeasurement not being enabled in Matter.framework for now:", + "Test_TC_CDOCONC_1_1", + "Test_TC_CDOCONC_2_1", + "Disabled due to CarbonMonoxideConcentrationMeasurement not being enabled in Matter.framework for now:", + "Test_TC_CMOCONC_1_1", + "Test_TC_CMOCONC_2_1", + "Disabled due to FormaldehydeConcentrationMeasurement not being enabled in Matter.framework for now:", + "Test_TC_FLDCONC_1_1", + "Test_TC_FLDCONC_2_1", + "Disabled due to NitrogenDioxideConcentrationMeasurement not being enabled in Matter.framework for now:", + "Test_TC_NDOCONC_1_1", + "Test_TC_NDOCONC_2_1", + "Disabled due to OzoneConcentrationMeasurement not being enabled in Matter.framework for now:", + "Test_TC_OZCONC_1_1", + "Test_TC_OZCONC_2_1", + "Disabled due to PM1ConcentrationMeasurement not being enabled in Matter.framework for now:", + "Test_TC_PMHCONC_1_1", + "Test_TC_PMHCONC_2_1", + "Disabled due to PM2.5ConcentrationMeasurement not being enabled in Matter.framework for now:", + "Test_TC_PMICONC_1_1", + "Test_TC_PMICONC_2_1", + "Disabled due to PM10ConcentrationMeasurement not being enabled in Matter.framework for now:", + "Test_TC_PMKCONC_1_1", + "Test_TC_PMKCONC_2_1", + "Disabled due to RadonConcentrationMeasurement not being enabled in Matter.framework for now:", + "Test_TC_RNCONC_1_1", + "Test_TC_RNCONC_2_1", + "Disabled due to TotalVolatileOrganicCompoundsConcentrationMeasurement not being enabled in Matter.framework for now:", + "Test_TC_TVOCCONC_1_1", + "Test_TC_TVOCCONC_2_1", + "Disabled due to FanControl AirFlowDirection attribute not being enabled in Matter.framework for now:", + "Test_TC_FAN_2_5", + "Disabled due to DoorLock UnboltDoor command not being enabled in Matter.framework for now:", + "Test_TC_DRLK_2_12", + "DL_LockUnlock", + "Disabled due to ActivatedCarbonFilterMonitoring not being enabled in Matter.framework for now:", + "Test_TC_ACFREMON_1_1", + "Test_TC_ACFREMON_2_1", + "Disabled due to HEPAFilterMonitoring not being enabled in Matter.framework for now:", + "Test_TC_HEPAFREMON_1_1", + "Test_TC_HEPAFREMON_2_1" ] } diff --git a/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt b/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt index ddc1b909ca0b29..f9ed81b5e4ee96 100644 --- a/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt +++ b/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt @@ -58,8 +58,15 @@ class {{filename}}: public TestCommandBridge return; } {{/if}} + {{! EventList marked provisional for now }} + {{#if (and isReadAttribute + (isStrEqual (asUpperCamelCase (or attribute "") preserveAcronyms=true) "EventList"))}} + NextTest(); + return; + {{else}} err = Test{{asUpperCamelCase label}}_{{index}}(); break; + {{/if}} {{/chip_tests_items}} } @@ -105,6 +112,9 @@ class {{filename}}: public TestCommandBridge {{/chip_tests_config}} {{#chip_tests_items}} + {{! EventList marked provisional for now }} + {{#unless (and isReadAttribute + (isStrEqual (asUpperCamelCase (or attribute "") preserveAcronyms=true) "EventList"))}} {{#if async}} bool testSendCluster{{parent.filename}}_{{index}}_{{asUpperCamelCase command}}_Fulfilled = false; {{/if}} @@ -257,7 +267,8 @@ class {{filename}}: public TestCommandBridge return CHIP_NO_ERROR; {{/if}} } -{{/chip_tests_items}} + {{/unless}} + {{/chip_tests_items}} }; diff --git a/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.h b/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.h index 727fa01e64720d..4fb7016c488937 100644 --- a/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.h +++ b/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.h @@ -17,6 +17,7 @@ #import #import +#import #import /** @@ -30,9 +31,24 @@ NS_ASSUME_NONNULL_BEGIN /** * This command used to incorrectly have a groupKeySetIDs field. */ -@property (nonatomic, copy) NSArray * groupKeySetIDs API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("This field has been removed"); +@property (nonatomic, copy) NSArray * groupKeySetIDs MTR_DEPRECATED( + "This field has been removed", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); @end +/** + * FanControl used to have WindSettingMask and WindSupportMask that had + * identical values. Those got replaced with a single WindBitmap. We codegen + * WindSupportMask as an alias of WindBitmap, but we need a manual shim for + * WindSettingMask. + */ +typedef NS_OPTIONS(uint8_t, MTRFanControlWindSettingMask) { + MTRFanControlWindSettingMaskSleepWind MTR_DEPRECATED( + "Please use MTRFanControlWindBitmapSleepWind", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x1, + MTRFanControlWindSettingMaskNaturalWind MTR_DEPRECATED( + "Please use MTRFanControlWindBitmapNaturalWind", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x2, +} MTR_DEPRECATED("Please use MTRFanControlWindBitmap", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); + NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.h b/src/darwin/Framework/CHIP/MTRBaseDevice.h index 65e1d9d0cabfbf..9821c647ac5639 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.h @@ -154,15 +154,18 @@ typedef NS_ENUM(uint8_t, MTRTransportType) { * * nil is used to represent wildcards. */ -MTR_NEWLY_AVAILABLE +API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRAttributeRequestPath : NSObject -@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint; -@property (nonatomic, readonly, copy, nullable) NSNumber * cluster; -@property (nonatomic, readonly, copy, nullable) NSNumber * attribute; +@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) + ; +@property (nonatomic, readonly, copy, nullable) NSNumber * cluster API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, readonly, copy, nullable) + NSNumber * attribute API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + (MTRAttributeRequestPath *)requestPathWithEndpointID:(NSNumber * _Nullable)endpointID clusterID:(NSNumber * _Nullable)clusterID - attributeID:(NSNumber * _Nullable)attributeID MTR_NEWLY_AVAILABLE; + attributeID:(NSNumber * _Nullable)attributeID + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end /** @@ -170,15 +173,17 @@ MTR_NEWLY_AVAILABLE * * nil is used to represent wildcards. */ -MTR_NEWLY_AVAILABLE +API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTREventRequestPath : NSObject -@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint; -@property (nonatomic, readonly, copy, nullable) NSNumber * cluster; -@property (nonatomic, readonly, copy, nullable) NSNumber * event; +@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) + ; +@property (nonatomic, readonly, copy, nullable) NSNumber * cluster API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, readonly, copy, nullable) NSNumber * event API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + (MTREventRequestPath *)requestPathWithEndpointID:(NSNumber * _Nullable)endpointID clusterID:(NSNumber * _Nullable)clusterID - eventID:(NSNumber * _Nullable)eventID MTR_NEWLY_AVAILABLE; + eventID:(NSNumber * _Nullable)eventID + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRBaseDevice : NSObject @@ -299,7 +304,7 @@ MTR_NEWLY_AVAILABLE eventPaths:(NSArray * _Nullable)eventPaths params:(MTRReadParams * _Nullable)params queue:(dispatch_queue_t)queue - completion:(MTRDeviceResponseHandler)completion MTR_NEWLY_AVAILABLE; + completion:(MTRDeviceResponseHandler)completion API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); /** * Write to attribute in a designated attribute path @@ -418,7 +423,8 @@ MTR_NEWLY_AVAILABLE queue:(dispatch_queue_t)queue reportHandler:(MTRDeviceResponseHandler)reportHandler subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduled MTR_NEWLY_AVAILABLE; + resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduled + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); /** * Deregister all local report handlers for a remote device @@ -466,7 +472,8 @@ MTR_NEWLY_AVAILABLE - (void)openCommissioningWindowWithDiscriminator:(NSNumber *)discriminator duration:(NSNumber *)duration queue:(dispatch_queue_t)queue - completion:(MTRDeviceOpenCommissioningWindowHandler)completion MTR_NEWLY_AVAILABLE; + completion:(MTRDeviceOpenCommissioningWindowHandler)completion + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); /** * Reads events from the device. @@ -633,7 +640,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * * The data does not match the known schema. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @@ -706,7 +714,8 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) { * * The data does not match the known schema. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end diff --git a/src/darwin/Framework/CHIP/MTRCSRInfo.h b/src/darwin/Framework/CHIP/MTRCSRInfo.h index c4a218557fc207..f46b330404eebd 100644 --- a/src/darwin/Framework/CHIP/MTRCSRInfo.h +++ b/src/darwin/Framework/CHIP/MTRCSRInfo.h @@ -62,7 +62,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) csrNonce:(NSData *)csrNonce csrElementsTLV:(MTRTLVBytes)csrElementsTLV attestationSignature:(NSData *)attestationSignature - MTR_NEWLY_DEPRECATED("Please use one of the initializers that validates the input"); + MTR_DEPRECATED("Please use one of the initializers that validates the input", ios(16.4, 17.0), macos(13.3, 14.0), + watchos(9.4, 10.0), tvos(16.4, 17.0)); /** * Initialize an MTROperationalCSRInfo by providing the csrNonce (for example, @@ -73,7 +74,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) */ - (nullable instancetype)initWithCSRNonce:(NSData *)csrNonce csrElementsTLV:(MTRTLVBytes)csrElementsTLV - attestationSignature:(NSData *)attestationSignature MTR_NEWLY_AVAILABLE; + attestationSignature:(NSData *)attestationSignature + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); /** * Initialize an MTROperationalCSRInfo by providing just the csrElementsTLV and @@ -83,7 +85,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * fails. */ - (nullable instancetype)initWithCSRElementsTLV:(MTRTLVBytes)csrElementsTLV - attestationSignature:(NSData *)attestationSignature MTR_NEWLY_AVAILABLE; + attestationSignature:(NSData *)attestationSignature + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); /** * Initialize an MTROperationalCSRInfo by providing an @@ -91,7 +94,7 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * relevant fields from the response data. */ - (nullable instancetype)initWithCSRResponseParams:(MTROperationalCredentialsClusterCSRResponseParams *)responseParams - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTROperationalCSRInfo", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) diff --git a/src/darwin/Framework/CHIP/MTRCommissionableBrowserDelegate.h b/src/darwin/Framework/CHIP/MTRCommissionableBrowserDelegate.h index 6dbc04ca5a481c..743ffc47e85c59 100644 --- a/src/darwin/Framework/CHIP/MTRCommissionableBrowserDelegate.h +++ b/src/darwin/Framework/CHIP/MTRCommissionableBrowserDelegate.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN -MTR_NEWLY_AVAILABLE +API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @protocol MTRCommissionableBrowserDelegate /** * Tells the delegate the commissionable manager discovered a device while scanning for devices. diff --git a/src/darwin/Framework/CHIP/MTRCommissionableBrowserResult.h b/src/darwin/Framework/CHIP/MTRCommissionableBrowserResult.h index c62e6ea3477654..d243cfd8486de2 100644 --- a/src/darwin/Framework/CHIP/MTRCommissionableBrowserResult.h +++ b/src/darwin/Framework/CHIP/MTRCommissionableBrowserResult.h @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN -MTR_NEWLY_AVAILABLE +API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRCommissionableBrowserResult : NSObject /** diff --git a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h index f1cce0e53e6699..432feb91333304 100644 --- a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h +++ b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h @@ -86,7 +86,7 @@ NS_ASSUME_NONNULL_BEGIN * * Defaults to NO. */ -@property (nonatomic, assign) BOOL skipCommissioningComplete MTR_NEWLY_AVAILABLE; +@property (nonatomic, assign) BOOL skipCommissioningComplete API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); /** * The country code to provide to the device during commissioning. @@ -94,7 +94,7 @@ NS_ASSUME_NONNULL_BEGIN * If not nil, this must be a 2-character ISO 3166-1 country code, which the * device can use to decide on things like radio communications bands. */ -@property (nonatomic, copy, nullable) NSString * countryCode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy, nullable) NSString * countryCode API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end diff --git a/src/darwin/Framework/CHIP/MTRDevice.h b/src/darwin/Framework/CHIP/MTRDevice.h index 71f24c1e33528a..aadcb569d8f833 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.h +++ b/src/darwin/Framework/CHIP/MTRDevice.h @@ -17,6 +17,7 @@ #import #import +#import NS_ASSUME_NONNULL_BEGIN @@ -198,7 +199,8 @@ typedef NS_ENUM(NSUInteger, MTRDeviceState) { - (void)openCommissioningWindowWithDiscriminator:(NSNumber *)discriminator duration:(NSNumber *)duration queue:(dispatch_queue_t)queue - completion:(MTRDeviceOpenCommissioningWindowHandler)completion MTR_NEWLY_AVAILABLE; + completion:(MTRDeviceOpenCommissioningWindowHandler)completion + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.h b/src/darwin/Framework/CHIP/MTRDeviceController.h index 683e584bca5666..fce1a88002aaf8 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController.h @@ -18,6 +18,7 @@ #import #import +#import #import @class MTRBaseDevice; @@ -117,7 +118,8 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS - (BOOL)setupCommissioningSessionWithDiscoveredDevice:(MTRCommissionableBrowserResult *)discoveredDevice payload:(MTRSetupPayload *)payload newNodeID:(NSNumber *)newNodeID - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); /** * Commission the node with the given node ID. The node ID must match the node @@ -180,14 +182,14 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS * This method will fail if the controller factory is not running or the browse has already been started. */ - (BOOL)startBrowseForCommissionables:(id)delegate - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); /** * Stop scanning for commissionable devices. * * This method will fail if the controller factory is not running or the browse has not been started. */ -- (BOOL)stopBrowseForCommissionables MTR_NEWLY_AVAILABLE; +- (BOOL)stopBrowseForCommissionables API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); /** * Return the attestation challenge for the secure session of the device being commissioned. diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h index 37c2f691307d02..6a1ca1259a0da9 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h @@ -15,6 +15,7 @@ * limitations under the License. */ +#import #import NS_ASSUME_NONNULL_BEGIN @@ -31,7 +32,7 @@ typedef NS_ENUM(NSInteger, MTRCommissioningStatus) { /** * A representation of a (vendor, product) pair that identifies a specific product. */ -MTR_NEWLY_AVAILABLE +API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRProductIdentity : NSObject @property (nonatomic, copy, readonly) NSNumber * vendorID; @@ -66,7 +67,9 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * Notify the delegate when commissioning is completed. */ - (void)controller:(MTRDeviceController *)controller - commissioningComplete:(NSError * _Nullable)error MTR_NEWLY_DEPRECATED("Please use controller:commissioningComplete:nodeID:"); + commissioningComplete:(NSError * _Nullable)error + MTR_DEPRECATED("Please use controller:commissioningComplete:nodeID:", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), + tvos(16.4, 17.0)); /** * Notify the delegate when commissioning is completed. @@ -77,7 +80,7 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) */ - (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError * _Nullable)error - nodeID:(NSNumber * _Nullable)nodeID MTR_NEWLY_AVAILABLE; + nodeID:(NSNumber * _Nullable)nodeID API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); /** * Notify the delegate when commissioning infomation has been read from the Basic @@ -86,7 +89,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * At the point when this notification happens, device attestation has not been performed yet, * so the information delivered by this notification should not be trusted. */ -- (void)controller:(MTRDeviceController *)controller readCommissioningInfo:(MTRProductIdentity *)info MTR_NEWLY_AVAILABLE; +- (void)controller:(MTRDeviceController *)controller + readCommissioningInfo:(MTRProductIdentity *)info API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end typedef NS_ENUM(NSUInteger, MTRPairingStatus) { diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h index 9df0257445374e..bad13eaa6ef7bb 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h @@ -17,6 +17,7 @@ #import #import +#import #import NS_ASSUME_NONNULL_BEGIN @@ -154,7 +155,8 @@ NS_ASSUME_NONNULL_BEGIN * If not nil, must contain at most 3 numbers, which are expected to be 32-bit * unsigned Case Authenticated Tag values. */ -@property (nonatomic, copy, nullable) NSSet * caseAuthenticatedTags MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy, nullable) + NSSet * caseAuthenticatedTags API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); /** * Root certificate, in X.509 DER form, to use. diff --git a/src/darwin/Framework/CHIP/MTRError.h b/src/darwin/Framework/CHIP/MTRError.h index 980962be9e5468..d3419eb0ee2220 100644 --- a/src/darwin/Framework/CHIP/MTRError.h +++ b/src/darwin/Framework/CHIP/MTRError.h @@ -63,19 +63,19 @@ typedef NS_ERROR_ENUM(MTRErrorDomain, MTRErrorCode){ * MTRErrorCodeUnknownSchema means the schema for the given cluster/attribute, * cluster/event, or cluster/command combination is not known. */ - MTRErrorCodeUnknownSchema MTR_NEWLY_AVAILABLE = 12, + MTRErrorCodeUnknownSchema API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 12, /** * MTRErrorCodeSchemaMismatch means that provided data did not match the * expected schema. */ - MTRErrorCodeSchemaMismatch MTR_NEWLY_AVAILABLE = 13, + MTRErrorCodeSchemaMismatch API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 13, /** * MTRErrorCodeTLVDecodeFailed means that the TLV being decoded was malformed in * some way. This can include things like lengths running past the end of * the buffer, strings that are not actually UTF-8, and various other * TLV-level failures. */ - MTRErrorCodeTLVDecodeFailed MTR_NEWLY_AVAILABLE = 14, + MTRErrorCodeTLVDecodeFailed API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 14, }; // clang-format on diff --git a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h index 2adbb29804cc43..f607abb89fe616 100644 --- a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h +++ b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h @@ -16,6 +16,7 @@ */ #import +#import NS_ASSUME_NONNULL_BEGIN @@ -25,9 +26,10 @@ typedef NS_ENUM(NSUInteger, MTROnboardingPayloadType) { MTROnboardingPayloadTypeQRCode = 0, MTROnboardingPayloadTypeManualCode, MTROnboardingPayloadTypeNFC -} MTR_NEWLY_DEPRECATED("MTROnboardingPayloadType is unused"); +} MTR_DEPRECATED("MTROnboardingPayloadType is unused", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); -MTR_NEWLY_DEPRECATED("Please use [MTRSetupPayload setupPayloadWithOnboardingPayload:error:]") +MTR_DEPRECATED("Please use [MTRSetupPayload setupPayloadWithOnboardingPayload:error:]", ios(16.1, 17.0), macos(13.0, 14.0), + watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTROnboardingPayloadParser : NSObject + (MTRSetupPayload * _Nullable)setupPayloadForOnboardingPayload:(NSString *)onboardingPayload diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt index e44945b52ec73e..6ef12738d289ac 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt @@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error {{availability cluster command=command deprecationMessage="This command has been removed" minimalRelease="Fall 2023"}}; {{/if}} @end {{/if}} diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index d614d2f4c0c8c9..f1bb14aa9a88ce 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7047,477 +7047,17 @@ LocalOperation: Local - release: "Fall 2023" - versions: "future" + versions: + ios: "17.0" + macos: "14.0" + watchos: "10.0" + tvos: "17.0" introduced: - clusters: - - AirQuality - # Replaceable Monitoring clusters - - HEPAFilterMonitoring - - ActivatedCarbonFilterMonitoring - # Concentration Measurement clusters - - CarbonDioxideConcentrationMeasurement - - CarbonMonoxideConcentrationMeasurement - - FormaldehydeConcentrationMeasurement - - NitrogenDioxideConcentrationMeasurement - - OzoneConcentrationMeasurement - - PM10ConcentrationMeasurement - - PM1ConcentrationMeasurement - - PM25ConcentrationMeasurement - - RadonConcentrationMeasurement - - TotalVolatileOrganicCompoundsConcentrationMeasurement - - OperationalState - - RefrigeratorAlarm - - TemperatureControl - - SmokeCOAlarm attributes: - Scenes: - - EventList - - SceneTableSize - - RemainingCapacity - OnOff: - - EventList - OnOffSwitchConfiguration: - - EventList - LevelControl: - - EventList - BinaryInputBasic: - - EventList - PulseWidthModulation: - - EventList - Descriptor: - - EventList - Binding: - - EventList - Identify: - - EventList - AccessControl: - - EventList - Actions: - - EventList - OTASoftwareUpdateProvider: - - EventList - OTASoftwareUpdateRequestor: - - EventList - LocalizationConfiguration: - - EventList - TimeFormatLocalization: - - EventList - UnitLocalization: - - EventList - PowerSourceConfiguration: - - EventList - PowerSource: - - EventList - GeneralCommissioning: - - EventList - NetworkCommissioning: - - EventList - DiagnosticLogs: - - EventList - GeneralDiagnostics: - - EventList - SoftwareDiagnostics: - - EventList - ThreadNetworkDiagnostics: - - EventList - WiFiNetworkDiagnostics: - - EventList - EthernetNetworkDiagnostics: - - EventList - TimeSynchronization: - - EventList - Switch: - - EventList - AdministratorCommissioning: - - EventList - OperationalCredentials: - - EventList - GroupKeyManagement: - - EventList - FixedLabel: - - EventList - UserLabel: - - EventList - ProxyConfiguration: - - EventList - ProxyDiscovery: - - EventList - ProxyValid: - - EventList - BooleanState: - - EventList - ModeSelect: - - EventList - DoorLock: - - EventList - WindowCovering: - - EventList - BarrierControl: - - EventList - PumpConfigurationAndControl: - - EventList - FanControl: - - EventList - - AirflowDirection - ThermostatUserInterfaceConfiguration: - - EventList - ColorControl: - - EventList - BallastConfiguration: - - EventList - IlluminanceMeasurement: - - EventList - TemperatureMeasurement: - - EventList - PressureMeasurement: - - EventList - Thermostat: - - EventList - FlowMeasurement: - - EventList - RelativeHumidityMeasurement: - - EventList - OccupancySensing: - - EventList - WakeOnLAN: - - EventList - Channel: - - EventList - Groups: - - EventList - TargetNavigator: - - EventList - MediaPlayback: - - EventList - MediaInput: - - EventList - LowPower: - - EventList - KeypadInput: - - EventList - ContentLauncher: - - EventList - AudioOutput: - - EventList - ApplicationLauncher: - - EventList - ApplicationBasic: - - EventList - AccountLogin: - - EventList - ElectricalMeasurement: - - EventList - UnitTesting: - - EventList - FaultInjection: - - EventList - AirQuality: - - AirQuality - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision BasicInformation: - - EventList - ProductAppearance BridgedDeviceBasicInformation: - - EventList - ProductAppearance - HEPAFilterMonitoring: - - Condition - - DegradationDirection - - ChangeIndication - - InPlaceIndicator - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - ActivatedCarbonFilterMonitoring: - - Condition - - DegradationDirection - - ChangeIndication - - InPlaceIndicator - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - CarbonDioxideConcentrationMeasurement: - - MeasuredValue - - MinMeasuredValue - - MaxMeasuredValue - - PeakMeasuredValue - - PeakMeasuredValueWindow - - AverageMeasuredValue - - AverageMeasuredValueWindow - - Uncertainty - - MeasurementUnit - - MeasurementMedium - - LevelValue - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - CarbonMonoxideConcentrationMeasurement: - - MeasuredValue - - MinMeasuredValue - - MaxMeasuredValue - - PeakMeasuredValue - - PeakMeasuredValueWindow - - AverageMeasuredValue - - AverageMeasuredValueWindow - - Uncertainty - - MeasurementUnit - - MeasurementMedium - - LevelValue - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - FormaldehydeConcentrationMeasurement: - - MeasuredValue - - MinMeasuredValue - - MaxMeasuredValue - - PeakMeasuredValue - - PeakMeasuredValueWindow - - AverageMeasuredValue - - AverageMeasuredValueWindow - - Uncertainty - - MeasurementUnit - - MeasurementMedium - - LevelValue - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - NitrogenDioxideConcentrationMeasurement: - - MeasuredValue - - MinMeasuredValue - - MaxMeasuredValue - - PeakMeasuredValue - - PeakMeasuredValueWindow - - AverageMeasuredValue - - AverageMeasuredValueWindow - - Uncertainty - - MeasurementUnit - - MeasurementMedium - - LevelValue - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - OzoneConcentrationMeasurement: - - MeasuredValue - - MinMeasuredValue - - MaxMeasuredValue - - PeakMeasuredValue - - PeakMeasuredValueWindow - - AverageMeasuredValue - - AverageMeasuredValueWindow - - Uncertainty - - MeasurementUnit - - MeasurementMedium - - LevelValue - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - PM10ConcentrationMeasurement: - - MeasuredValue - - MinMeasuredValue - - MaxMeasuredValue - - PeakMeasuredValue - - PeakMeasuredValueWindow - - AverageMeasuredValue - - AverageMeasuredValueWindow - - Uncertainty - - MeasurementUnit - - MeasurementMedium - - LevelValue - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - PM1ConcentrationMeasurement: - - MeasuredValue - - MinMeasuredValue - - MaxMeasuredValue - - PeakMeasuredValue - - PeakMeasuredValueWindow - - AverageMeasuredValue - - AverageMeasuredValueWindow - - Uncertainty - - MeasurementUnit - - MeasurementMedium - - LevelValue - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - PM25ConcentrationMeasurement: - - MeasuredValue - - MinMeasuredValue - - MaxMeasuredValue - - PeakMeasuredValue - - PeakMeasuredValueWindow - - AverageMeasuredValue - - AverageMeasuredValueWindow - - Uncertainty - - MeasurementUnit - - MeasurementMedium - - LevelValue - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - RadonConcentrationMeasurement: - - MeasuredValue - - MinMeasuredValue - - MaxMeasuredValue - - PeakMeasuredValue - - PeakMeasuredValueWindow - - AverageMeasuredValue - - AverageMeasuredValueWindow - - Uncertainty - - MeasurementUnit - - MeasurementMedium - - LevelValue - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - TotalVolatileOrganicCompoundsConcentrationMeasurement: - - MeasuredValue - - MinMeasuredValue - - MaxMeasuredValue - - PeakMeasuredValue - - PeakMeasuredValueWindow - - AverageMeasuredValue - - AverageMeasuredValueWindow - - Uncertainty - - MeasurementUnit - - MeasurementMedium - - LevelValue - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - OperationalState: - - PhaseList - - CurrentPhase - - CountdownTime - - OperationalStateList - - OperationalState - - OperationalError - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - RefrigeratorAlarm: - - Mask - - State - - Supported - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - TemperatureControl: - - TemperatureSetpoint - - MinTemperature - - MaxTemperature - - Step - - SelectedTemperatureLevel - - SupportedTemperatureLevels - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - SmokeCOAlarm: - - ExpressedState - - SmokeState - - COState - - BatteryAlert - - DeviceMuted - - TestInProgress - - HardwareFaultAlert - - EndOfServiceAlert - - InterconnectSmokeAlarm - - InterconnectCOAlarm - - ContaminationState - - SensitivityLevel - - ExpiryDate - - GeneratedCommandList - - AcceptedCommandList - - AttributeList - - EventList - - FeatureMap - - ClusterRevision - commands: - HEPAFilterMonitoring: - - ResetCondition - ActivatedCarbonFilterMonitoring: - - ResetCondition - FanControl: - - Step - OperationalState: - - Pause - - Stop - - Start - - Resume - - OperationalCommandResponse - TemperatureControl: - - SetTemperature - DoorLock: - - UnboltDoor - SmokeCOAlarm: - - SelfTestRequest - command fields: - DoorLock: - UnboltDoor: - - pinCode - FanControl: - Step: - - direction - - wrap - - lowestOff - OperationalState: - OperationalCommandResponse: - - commandResponseState - TemperatureControl: - SetTemperature: - - targetTemperature - - targetTemperatureLevel structs: AccessControl: - AccessControlTargetStruct @@ -7529,9 +7069,6 @@ - WiFiInterfaceScanResultStruct - ThreadInterfaceScanResultStruct - NetworkInfoStruct - OperationalState: - - OperationalStateStruct - - ErrorStateStruct ThreadNetworkDiagnostics: - NeighborTableStruct - RouteTableStruct @@ -7569,14 +7106,6 @@ NetworkInfoStruct: - networkID - connected - OperationalState: - OperationalStateStruct: - - operationalStateID - - operationalStateLabel - ErrorStateStruct: - - errorStateID - - errorStateLabel - - errorStateDetails ThreadNetworkDiagnostics: NeighborTableStruct: - extAddress @@ -7604,41 +7133,7 @@ - age - allocated - linkEstablished - events: - OperationalState: - - OperationalError - - OperationCompletion - RefrigeratorAlarm: - - Notify - SmokeCOAlarm: - - SmokeAlarm - - COAlarm - - LowBattery - - HardwareFault - - EndOfService - - SelfTestComplete - - AlarmMuted - - MuteEnded - - InterconnectSmokeAlarm - - InterconnectCOAlarm - - AllClear - event fields: - OperationalState: - OperationalError: - - errorState - OperationCompletion: - - completionErrorCode - - totalOperationalTime - - pausedTime - RefrigeratorAlarm: - Notify: - - active - - inactive - - state - - mask enums: - AirQuality: - - AirQualityEnum BasicInformation: - ColorEnum - ProductFinishEnum @@ -7646,74 +7141,9 @@ - ColorEnum - ProductFinishEnum FanControl: - - DirectionEnum - - AirflowDirectionEnum - HEPAFilterMonitoring: - - ChangeIndicationEnum - - DegradationDirectionEnum - ActivatedCarbonFilterMonitoring: - - ChangeIndicationEnum - - DegradationDirectionEnum - CarbonDioxideConcentrationMeasurement: - - LevelValueEnum - - MeasurementUnitEnum - - MeasurementMediumEnum - CarbonMonoxideConcentrationMeasurement: - - LevelValueEnum - - MeasurementUnitEnum - - MeasurementMediumEnum - FormaldehydeConcentrationMeasurement: - - LevelValueEnum - - MeasurementUnitEnum - - MeasurementMediumEnum - NitrogenDioxideConcentrationMeasurement: - - LevelValueEnum - - MeasurementUnitEnum - - MeasurementMediumEnum - OzoneConcentrationMeasurement: - - LevelValueEnum - - MeasurementUnitEnum - - MeasurementMediumEnum - PM10ConcentrationMeasurement: - - LevelValueEnum - - MeasurementUnitEnum - - MeasurementMediumEnum - PM1ConcentrationMeasurement: - - LevelValueEnum - - MeasurementUnitEnum - - MeasurementMediumEnum - PM25ConcentrationMeasurement: - - LevelValueEnum - - MeasurementUnitEnum - - MeasurementMediumEnum - RadonConcentrationMeasurement: - - LevelValueEnum - - MeasurementUnitEnum - - MeasurementMediumEnum - TotalVolatileOrganicCompoundsConcentrationMeasurement: - - LevelValueEnum - - MeasurementUnitEnum - - MeasurementMediumEnum - OperationalState: - - OperationalStateEnum - - ErrorStateEnum - SmokeCOAlarm: - - AlarmStateEnum - - ContaminationStateEnum - - EndOfServiceEnum - - ExpressedStateEnum - - MuteStateEnum - - SensitivityEnum + - FanModeEnum + - FanModeSequenceEnum enum values: - AirQuality: - AirQualityEnum: - - Unknown - - Good - - Fair - - Moderate - - Poor - - VeryPoor - - ExtremelyPoor BasicInformation: ColorEnum: - Black @@ -7775,282 +7205,27 @@ - Fabric - Other FanControl: - DirectionEnum: - - Increase - - Decrease - AirflowDirectionEnum: - - Forward - - Reverse + FanModeEnum: + - Off + - Low + - Medium + - High + - On + - Auto + - Smart + FanModeSequenceEnum: + - OffLowMedHigh + - OffLowHigh + - OffLowMedHighAuto + - OffLowHighAuto + - OffOnAuto + - OffOn NetworkCommissioning: # WiFiBandEnum was originally just named WiFiBand, but we generate # the same API for both of those names, so the name can just # change here. WiFiBandEnum: - 1G - HEPAFilterMonitoring: - ChangeIndicationEnum: - - OK - - Warning - - Critical - DegradationDirectionEnum: - - Up - - Down - ActivatedCarbonFilterMonitoring: - ChangeIndicationEnum: - - OK - - Warning - - Critical - DegradationDirectionEnum: - - Up - - Down - CarbonDioxideConcentrationMeasurement: - LevelValueEnum: - - Unknown - - Low - - Medium - - High - - Critical - MeasurementUnitEnum: - - PPM - - PPB - - PPT - - MGM3 - - UGM3 - - NGM3 - - PM3 - - BQM3 - MeasurementMediumEnum: - - Air - - Water - - Soil - CarbonMonoxideConcentrationMeasurement: - LevelValueEnum: - - Unknown - - Low - - Medium - - High - - Critical - MeasurementUnitEnum: - - PPM - - PPB - - PPT - - MGM3 - - UGM3 - - NGM3 - - PM3 - - BQM3 - MeasurementMediumEnum: - - Air - - Water - - Soil - FormaldehydeConcentrationMeasurement: - LevelValueEnum: - - Unknown - - Low - - Medium - - High - - Critical - MeasurementUnitEnum: - - PPM - - PPB - - PPT - - MGM3 - - UGM3 - - NGM3 - - PM3 - - BQM3 - MeasurementMediumEnum: - - Air - - Water - - Soil - NitrogenDioxideConcentrationMeasurement: - LevelValueEnum: - - Unknown - - Low - - Medium - - High - - Critical - MeasurementUnitEnum: - - PPM - - PPB - - PPT - - MGM3 - - UGM3 - - NGM3 - - PM3 - - BQM3 - MeasurementMediumEnum: - - Air - - Water - - Soil - OzoneConcentrationMeasurement: - LevelValueEnum: - - Unknown - - Low - - Medium - - High - - Critical - MeasurementUnitEnum: - - PPM - - PPB - - PPT - - MGM3 - - UGM3 - - NGM3 - - PM3 - - BQM3 - MeasurementMediumEnum: - - Air - - Water - - Soil - PM10ConcentrationMeasurement: - LevelValueEnum: - - Unknown - - Low - - Medium - - High - - Critical - MeasurementUnitEnum: - - PPM - - PPB - - PPT - - MGM3 - - UGM3 - - NGM3 - - PM3 - - BQM3 - MeasurementMediumEnum: - - Air - - Water - - Soil - PM1ConcentrationMeasurement: - LevelValueEnum: - - Unknown - - Low - - Medium - - High - - Critical - MeasurementUnitEnum: - - PPM - - PPB - - PPT - - MGM3 - - UGM3 - - NGM3 - - PM3 - - BQM3 - MeasurementMediumEnum: - - Air - - Water - - Soil - PM25ConcentrationMeasurement: - LevelValueEnum: - - Unknown - - Low - - Medium - - High - - Critical - MeasurementUnitEnum: - - PPM - - PPB - - PPT - - MGM3 - - UGM3 - - NGM3 - - PM3 - - BQM3 - MeasurementMediumEnum: - - Air - - Water - - Soil - RadonConcentrationMeasurement: - LevelValueEnum: - - Unknown - - Low - - Medium - - High - - Critical - MeasurementUnitEnum: - - PPM - - PPB - - PPT - - MGM3 - - UGM3 - - NGM3 - - PM3 - - BQM3 - MeasurementMediumEnum: - - Air - - Water - - Soil - TotalVolatileOrganicCompoundsConcentrationMeasurement: - LevelValueEnum: - - Unknown - - Low - - Medium - - High - - Critical - MeasurementUnitEnum: - - PPM - - PPB - - PPT - - MGM3 - - UGM3 - - NGM3 - - PM3 - - BQM3 - MeasurementMediumEnum: - - Air - - Water - - Soil - DoorLock: - DlLockState: - - Unlatched - DlLockType: - - Eurocylinder - LockOperationTypeEnum: - - Unlatch - OperationalState: - OperationalStateEnum: - - Stopped - - Running - - Paused - - Error - ErrorStateEnum: - - NoError - - UnableToStartOrResume - - UnableToCompleteOperation - - CommandInvalidInState - SmokeCOAlarm: - AlarmStateEnum: - - Normal - - Warning - - Critical - ContaminationStateEnum: - - Normal - - Low - - Warning - - Critical - EndOfServiceEnum: - - Expired - - Normal - ExpressedStateEnum: - - Normal - - SmokeAlarm - - COAlarm - - BatteryAlert - - Testing - - HardwareFault - - EndOfService - - InterconnectSmoke - - InterconnectCO - MuteStateEnum: - - NotMuted - - Muted - SensitivityEnum: - - High - - Standard - - Low WiFiNetworkDiagnostics: WiFiVersionEnum: - Ah @@ -8059,8 +7234,6 @@ - LightOutput - VisibleIndicator bitmaps: - AirQuality: - - Feature Groups: - Feature - NameSupportBitmap @@ -8072,47 +7245,18 @@ - Feature Scenes: - Feature - HEPAFilterMonitoring: - - Feature - ActivatedCarbonFilterMonitoring: - - Feature - CarbonDioxideConcentrationMeasurement: - - Feature - CarbonMonoxideConcentrationMeasurement: - - Feature - FormaldehydeConcentrationMeasurement: - - Feature - NitrogenDioxideConcentrationMeasurement: - - Feature - OzoneConcentrationMeasurement: - - Feature - PM10ConcentrationMeasurement: - - Feature - PM1ConcentrationMeasurement: - - Feature - PM25ConcentrationMeasurement: - - Feature - RadonConcentrationMeasurement: - - Feature - TotalVolatileOrganicCompoundsConcentrationMeasurement: - - Feature - RefrigeratorAlarm: - - AlarmMap - TemperatureControl: - - Feature - SmokeCOAlarm: - - Feature + FanControl: + - RockBitmap + - WindBitmap bitmap values: - AirQuality: - Feature: - - Fair - - Moderate - - VeryPoor - - ExtremelyPoor FanControl: - Feature: - - Step - - AirflowDirection + RockBitmap: + - RockLeftRight + - RockUpDown + - RockRound + WindBitmap: + - SleepWind + - NaturalWind Groups: Feature: - GroupNames @@ -8130,136 +7274,28 @@ - WPA3Personal PressureMeasurement: Feature: - - Extended - PumpConfigurationAndControl: - Feature: - - ConstantPressure - - CompensatedPressure - - ConstantFlow - - ConstantSpeed - - ConstantTemperature - - Automatic - - LocalOperation - Scenes: - Feature: - - SceneNames - Thermostat: - Feature: - - LocalTemperatureNotExposed - HEPAFilterMonitoring: - Feature: - - Condition - - Warning - ActivatedCarbonFilterMonitoring: - Feature: - - Condition - - Warning - CarbonDioxideConcentrationMeasurement: - Feature: - - NumericMeasurement - - LevelIndication - - MediumLevel - - CriticalLevel - - PeakMeasurement - - AverageMeasurement - CarbonMonoxideConcentrationMeasurement: - Feature: - - NumericMeasurement - - LevelIndication - - MediumLevel - - CriticalLevel - - PeakMeasurement - - AverageMeasurement - FormaldehydeConcentrationMeasurement: - Feature: - - NumericMeasurement - - LevelIndication - - MediumLevel - - CriticalLevel - - PeakMeasurement - - AverageMeasurement - NitrogenDioxideConcentrationMeasurement: - Feature: - - NumericMeasurement - - LevelIndication - - MediumLevel - - CriticalLevel - - PeakMeasurement - - AverageMeasurement - OzoneConcentrationMeasurement: - Feature: - - NumericMeasurement - - LevelIndication - - MediumLevel - - CriticalLevel - - PeakMeasurement - - AverageMeasurement - PM10ConcentrationMeasurement: - Feature: - - NumericMeasurement - - LevelIndication - - MediumLevel - - CriticalLevel - - PeakMeasurement - - AverageMeasurement - PM1ConcentrationMeasurement: - Feature: - - NumericMeasurement - - LevelIndication - - MediumLevel - - CriticalLevel - - PeakMeasurement - - AverageMeasurement - PM25ConcentrationMeasurement: - Feature: - - NumericMeasurement - - LevelIndication - - MediumLevel - - CriticalLevel - - PeakMeasurement - - AverageMeasurement - RadonConcentrationMeasurement: - Feature: - - NumericMeasurement - - LevelIndication - - MediumLevel - - CriticalLevel - - PeakMeasurement - - AverageMeasurement - TotalVolatileOrganicCompoundsConcentrationMeasurement: - Feature: - - NumericMeasurement - - LevelIndication - - MediumLevel - - CriticalLevel - - PeakMeasurement - - AverageMeasurement - DoorLock: - # Feature was originally named DoorLockFeature, but we generate the - # same API for both of those names, so the name can just change - # here. + - Extended + PumpConfigurationAndControl: Feature: - - Unbolt - RefrigeratorAlarm: - AlarmMap: - - DoorOpen - TemperatureControl: + - ConstantPressure + - CompensatedPressure + - ConstantFlow + - ConstantSpeed + - ConstantTemperature + - Automatic + - LocalOperation + Scenes: Feature: - - TemperatureNumber - - TemperatureLevel - - TemperatureStep - SmokeCOAlarm: + - SceneNames + Thermostat: Feature: - - SmokeAlarm - - COAlarm + - LocalTemperatureNotExposed ids: attributes: TimeSynchronization: - TrustedTimeSource - DefaultNTP - NTPServerAvailable - global attributes: - - EventList deprecated: clusters: # We apparently forgot to deprecate BridgedDeviceBasic when we @@ -8280,6 +7316,10 @@ ThreadNetworkDiagnostics: - NeighborTable - RouteTable + enums: + FanControl: + - FanModeType + - FanModeSequenceType bitmaps: Groups: - GroupClusterFeature @@ -8289,6 +7329,9 @@ - PressureFeature PumpConfigurationAndControl: - PumpFeature + FanControl: + - RockSupportMask + - WindSupportMask bitmap values: ModeSelect: Feature: @@ -8312,6 +7355,10 @@ ThreadNetworkDiagnostics: NeighborTableStruct: NeighborTable RouteTableStruct: RouteTable + enums: + FanControl: + FanModeEnum: FanModeType + FanModeSequenceEnum: FanModeSequenceType enum values: TimeSynchronization: TimeSourceEnum: @@ -8340,13 +7387,36 @@ Feature: PressureFeature PumpConfigurationAndControl: Feature: PumpFeature + FanControl: + RockBitmap: RockSupportMask + WindBitmap: WindSupportMask bitmap values: ModeSelect: Feature: OnOff: DEPONOFF provisional: clusters: - # Officially marked provisional: many concentration measurement clusters + ## Not ready at cutoff + - AirQuality + # Replaceable Monitoring clusters + - HEPAFilterMonitoring + - ActivatedCarbonFilterMonitoring + # Concentration Measurement clusters + - CarbonDioxideConcentrationMeasurement + - CarbonMonoxideConcentrationMeasurement + - FormaldehydeConcentrationMeasurement + - NitrogenDioxideConcentrationMeasurement + - OzoneConcentrationMeasurement + - PM10ConcentrationMeasurement + - PM1ConcentrationMeasurement + - PM25ConcentrationMeasurement + - RadonConcentrationMeasurement + - TotalVolatileOrganicCompoundsConcentrationMeasurement + - OperationalState + - RefrigeratorAlarm + - TemperatureControl + - SmokeCOAlarm + ## Officially marked provisional: many concentration measurement clusters - BromateConcentrationMeasurement - BromodichloromethaneConcentrationMeasurement - BromoformConcentrationMeasurement @@ -8373,7 +7443,7 @@ - TotalColiformBacteriaConcentrationMeasurement - TotalTrihalomethanesConcentrationMeasurement - TurbidityConcentrationMeasurement - # Officially marked provisional: many replaceable monitoring clusters + ## Officially marked provisional: many replaceable monitoring clusters - CeramicFilterMonitoring - ElectrostaticFilterMonitoring - UVFilterMonitoring @@ -8384,7 +7454,7 @@ - FuelTankMonitoring - InkCartridgeMonitoring - TonerCartridgeMonitoring - # Not ready to be public API yet. + ## Not ready to be public API yet. - ICDManagement - LaundryWasherMode - RefrigeratorAndTemperatureControlledCabinetMode @@ -8394,6 +7464,205 @@ - LaundryWasherControls - RVCOperationalState - DishwasherAlarm + attributes: + # EventList generally not stable yet. + Scenes: + - EventList + # New scenes bits not stable yet. + - SceneTableSize + - RemainingCapacity + OnOff: + - EventList + OnOffSwitchConfiguration: + - EventList + LevelControl: + - EventList + BinaryInputBasic: + - EventList + PulseWidthModulation: + - EventList + Descriptor: + - EventList + Binding: + - EventList + Identify: + - EventList + AccessControl: + - EventList + Actions: + - EventList + OTASoftwareUpdateProvider: + - EventList + OTASoftwareUpdateRequestor: + - EventList + LocalizationConfiguration: + - EventList + TimeFormatLocalization: + - EventList + UnitLocalization: + - EventList + PowerSourceConfiguration: + - EventList + PowerSource: + - EventList + GeneralCommissioning: + - EventList + NetworkCommissioning: + - EventList + DiagnosticLogs: + - EventList + GeneralDiagnostics: + - EventList + SoftwareDiagnostics: + - EventList + ThreadNetworkDiagnostics: + - EventList + WiFiNetworkDiagnostics: + - EventList + EthernetNetworkDiagnostics: + - EventList + TimeSynchronization: + - EventList + Switch: + - EventList + AdministratorCommissioning: + - EventList + OperationalCredentials: + - EventList + GroupKeyManagement: + - EventList + FixedLabel: + - EventList + UserLabel: + - EventList + ProxyConfiguration: + - EventList + ProxyDiscovery: + - EventList + ProxyValid: + - EventList + BooleanState: + - EventList + ModeSelect: + - EventList + DoorLock: + - EventList + WindowCovering: + - EventList + BarrierControl: + - EventList + PumpConfigurationAndControl: + - EventList + FanControl: + - EventList + # New Fan Control bits not stable yet. + - AirflowDirection + ThermostatUserInterfaceConfiguration: + - EventList + ColorControl: + - EventList + BallastConfiguration: + - EventList + IlluminanceMeasurement: + - EventList + TemperatureMeasurement: + - EventList + PressureMeasurement: + - EventList + Thermostat: + - EventList + FlowMeasurement: + - EventList + RelativeHumidityMeasurement: + - EventList + OccupancySensing: + - EventList + WakeOnLAN: + - EventList + Channel: + - EventList + Groups: + - EventList + TargetNavigator: + - EventList + MediaPlayback: + - EventList + MediaInput: + - EventList + LowPower: + - EventList + KeypadInput: + - EventList + ContentLauncher: + - EventList + AudioOutput: + - EventList + ApplicationLauncher: + - EventList + ApplicationBasic: + - EventList + AccountLogin: + - EventList + ElectricalMeasurement: + - EventList + UnitTesting: + - EventList + FaultInjection: + - EventList + BasicInformation: + - EventList + BridgedDeviceBasicInformation: + - EventList + commands: + FanControl: + # Not stable yet + - Step + DoorLock: + # Not stable yet + - UnboltDoor + enums: + FanControl: + # Not stable yet. + - StepDirectionEnum + - AirflowDirectionEnum + enum values: + DoorLock: + # Not stable yet + DlLockState: + - Unlatched + DlLockType: + - Eurocylinder + LockOperationTypeEnum: + - Unlatch + TimeSynchronization: + TimeSourceEnum: + - NonMatterSNTP + - NonMatterNTP + - MatterSNTP + - MatterNTP + - MixedNTP + - NonMatterSNTPNTS + - NonMatterNTPNTS + - MatterSNTPNTS + - MatterNTPNTS + - MixedNTPNTS + - PTP + - GNSS + bitmap values: + DoorLock: + # Not stable yet + # Feature was originally named DoorLockFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - Unbolt + FanControl: + # Not stable yet + Feature: + - Step + - AirflowDirection + global attributes: + - EventList # Once we actually unmark TimeSynchronization as provisional, all these bits should go away too, and we should instead # mark things as introduced/deprecated as needed. The "ids" entries should go away, in particular. ids: @@ -8417,18 +7686,6 @@ - TimeZoneStatus - TimeFailure - MissingTrustedTimeSource - enum values: - TimeSynchronization: - TimeSourceEnum: - - NonMatterSNTP - - NonMatterNTP - - MatterSNTP - - MatterNTP - - MixedNTP - - NonMatterSNTPNTS - - NonMatterNTPNTS - - MatterSNTPNTS - - MatterNTPNTS - - MixedNTPNTS - - PTP - - GNSS + +- release: "Future" + versions: "future" diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 56b9165a20891f..ea7f7d1e589d4f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -39,9 +39,6 @@ static BOOL AttributeIsSpecifiedInIdentifyCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -69,9 +66,6 @@ static BOOL AttributeIsSpecifiedInGroupsCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -108,21 +102,12 @@ static BOOL AttributeIsSpecifiedInScenesCluster(AttributeId aAttributeId) case Attributes::LastConfiguredBy::Id: { return YES; } - case Attributes::SceneTableSize::Id: { - return YES; - } - case Attributes::RemainingCapacity::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; } @@ -162,9 +147,6 @@ static BOOL AttributeIsSpecifiedInOnOffCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -195,9 +177,6 @@ static BOOL AttributeIsSpecifiedInOnOffSwitchConfigurationCluster(AttributeId aA case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -264,9 +243,6 @@ static BOOL AttributeIsSpecifiedInLevelControlCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -318,9 +294,6 @@ static BOOL AttributeIsSpecifiedInBinaryInputBasicCluster(AttributeId aAttribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -357,9 +330,6 @@ static BOOL AttributeIsSpecifiedInDescriptorCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -387,9 +357,6 @@ static BOOL AttributeIsSpecifiedInBindingCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -429,9 +396,6 @@ static BOOL AttributeIsSpecifiedInAccessControlCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -465,9 +429,6 @@ static BOOL AttributeIsSpecifiedInActionsCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -555,9 +516,6 @@ static BOOL AttributeIsSpecifiedInBasicInformationCluster(AttributeId aAttribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -582,9 +540,6 @@ static BOOL AttributeIsSpecifiedInOTASoftwareUpdateProviderCluster(AttributeId a case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -621,9 +576,6 @@ static BOOL AttributeIsSpecifiedInOTASoftwareUpdateRequestorCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -654,9 +606,6 @@ static BOOL AttributeIsSpecifiedInLocalizationConfigurationCluster(AttributeId a case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -690,9 +639,6 @@ static BOOL AttributeIsSpecifiedInTimeFormatLocalizationCluster(AttributeId aAtt case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -720,9 +666,6 @@ static BOOL AttributeIsSpecifiedInUnitLocalizationCluster(AttributeId aAttribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -750,9 +693,6 @@ static BOOL AttributeIsSpecifiedInPowerSourceConfigurationCluster(AttributeId aA case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -870,9 +810,6 @@ static BOOL AttributeIsSpecifiedInPowerSourceCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -912,9 +849,6 @@ static BOOL AttributeIsSpecifiedInGeneralCommissioningCluster(AttributeId aAttri case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -963,9 +897,6 @@ static BOOL AttributeIsSpecifiedInNetworkCommissioningCluster(AttributeId aAttri case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -990,9 +921,6 @@ static BOOL AttributeIsSpecifiedInDiagnosticLogsCluster(AttributeId aAttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1044,9 +972,6 @@ static BOOL AttributeIsSpecifiedInGeneralDiagnosticsCluster(AttributeId aAttribu case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1083,9 +1008,6 @@ static BOOL AttributeIsSpecifiedInSoftwareDiagnosticsCluster(AttributeId aAttrib case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1299,9 +1221,6 @@ static BOOL AttributeIsSpecifiedInThreadNetworkDiagnosticsCluster(AttributeId aA case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1365,9 +1284,6 @@ static BOOL AttributeIsSpecifiedInWiFiNetworkDiagnosticsCluster(AttributeId aAtt case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1419,9 +1335,6 @@ static BOOL AttributeIsSpecifiedInEthernetNetworkDiagnosticsCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1494,9 +1407,6 @@ static BOOL AttributeIsSpecifiedInBridgedDeviceBasicInformationCluster(Attribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1530,9 +1440,6 @@ static BOOL AttributeIsSpecifiedInSwitchCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1566,9 +1473,6 @@ static BOOL AttributeIsSpecifiedInAdministratorCommissioningCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1611,9 +1515,6 @@ static BOOL AttributeIsSpecifiedInOperationalCredentialsCluster(AttributeId aAtt case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1650,9 +1551,6 @@ static BOOL AttributeIsSpecifiedInGroupKeyManagementCluster(AttributeId aAttribu case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1680,9 +1578,6 @@ static BOOL AttributeIsSpecifiedInFixedLabelCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1710,9 +1605,6 @@ static BOOL AttributeIsSpecifiedInUserLabelCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1740,9 +1632,6 @@ static BOOL AttributeIsSpecifiedInBooleanStateCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1785,9 +1674,6 @@ static BOOL AttributeIsSpecifiedInModeSelectCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1802,158 +1688,116 @@ static BOOL AttributeIsSpecifiedInModeSelectCluster(AttributeId aAttributeId) } } } -static BOOL AttributeIsSpecifiedInTemperatureControlCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInDoorLockCluster(AttributeId aAttributeId) { - using namespace Clusters::TemperatureControl; + using namespace Clusters::DoorLock; switch (aAttributeId) { - case Attributes::TemperatureSetpoint::Id: { - return YES; - } - case Attributes::MinTemperature::Id: { - return YES; - } - case Attributes::MaxTemperature::Id: { - return YES; - } - case Attributes::Step::Id: { - return YES; - } - case Attributes::SelectedTemperatureLevel::Id: { - return YES; - } - case Attributes::SupportedTemperatureLevels::Id: { + case Attributes::LockState::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::LockType::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::ActuatorEnabled::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::DoorState::Id: { return YES; } - case Attributes::AttributeList::Id: { + case Attributes::DoorOpenEvents::Id: { return YES; } - case Attributes::FeatureMap::Id: { + case Attributes::DoorClosedEvents::Id: { return YES; } - case Attributes::ClusterRevision::Id: { + case Attributes::OpenPeriod::Id: { return YES; } - default: { - return NO; - } - } -} -static BOOL AttributeIsSpecifiedInRefrigeratorAlarmCluster(AttributeId aAttributeId) -{ - using namespace Clusters::RefrigeratorAlarm; - switch (aAttributeId) { - case Attributes::Mask::Id: { + case Attributes::NumberOfTotalUsersSupported::Id: { return YES; } - case Attributes::State::Id: { + case Attributes::NumberOfPINUsersSupported::Id: { return YES; } - case Attributes::Supported::Id: { + case Attributes::NumberOfRFIDUsersSupported::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::NumberOfHolidaySchedulesSupported::Id: { return YES; } - case Attributes::AttributeList::Id: { + case Attributes::MaxPINCodeLength::Id: { return YES; } - case Attributes::FeatureMap::Id: { + case Attributes::MinPINCodeLength::Id: { return YES; } - case Attributes::ClusterRevision::Id: { + case Attributes::MaxRFIDCodeLength::Id: { return YES; } - default: { - return NO; - } - } -} -static BOOL AttributeIsSpecifiedInAirQualityCluster(AttributeId aAttributeId) -{ - using namespace Clusters::AirQuality; - switch (aAttributeId) { - case Attributes::AirQuality::Id: { + case Attributes::MinRFIDCodeLength::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::CredentialRulesSupport::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::NumberOfCredentialsSupportedPerUser::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::Language::Id: { return YES; } - case Attributes::AttributeList::Id: { + case Attributes::LEDSettings::Id: { return YES; } - case Attributes::FeatureMap::Id: { + case Attributes::AutoRelockTime::Id: { return YES; } - case Attributes::ClusterRevision::Id: { + case Attributes::SoundVolume::Id: { return YES; } - default: { - return NO; - } - } -} -static BOOL AttributeIsSpecifiedInSmokeCOAlarmCluster(AttributeId aAttributeId) -{ - using namespace Clusters::SmokeCoAlarm; - switch (aAttributeId) { - case Attributes::ExpressedState::Id: { + case Attributes::OperatingMode::Id: { return YES; } - case Attributes::SmokeState::Id: { + case Attributes::SupportedOperatingModes::Id: { return YES; } - case Attributes::COState::Id: { + case Attributes::DefaultConfigurationRegister::Id: { return YES; } - case Attributes::BatteryAlert::Id: { + case Attributes::EnableLocalProgramming::Id: { return YES; } - case Attributes::DeviceMuted::Id: { + case Attributes::EnableOneTouchLocking::Id: { return YES; } - case Attributes::TestInProgress::Id: { + case Attributes::EnableInsideStatusLED::Id: { return YES; } - case Attributes::HardwareFaultAlert::Id: { + case Attributes::EnablePrivacyModeButton::Id: { return YES; } - case Attributes::EndOfServiceAlert::Id: { + case Attributes::LocalProgrammingFeatures::Id: { return YES; } - case Attributes::InterconnectSmokeAlarm::Id: { + case Attributes::WrongCodeEntryLimit::Id: { return YES; } - case Attributes::InterconnectCOAlarm::Id: { + case Attributes::UserCodeTemporaryDisableTime::Id: { return YES; } - case Attributes::ContaminationState::Id: { + case Attributes::SendPINOverTheAir::Id: { return YES; } - case Attributes::SensitivityLevel::Id: { + case Attributes::RequirePINforRemoteOperation::Id: { return YES; } - case Attributes::ExpiryDate::Id: { + case Attributes::ExpiringUserTimeout::Id: { return YES; } case Attributes::GeneratedCommandList::Id: { @@ -1962,9 +1806,6 @@ static BOOL AttributeIsSpecifiedInSmokeCOAlarmCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1979,74 +1820,80 @@ static BOOL AttributeIsSpecifiedInSmokeCOAlarmCluster(AttributeId aAttributeId) } } } -static BOOL AttributeIsSpecifiedInOperationalStateCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInWindowCoveringCluster(AttributeId aAttributeId) { - using namespace Clusters::OperationalState; + using namespace Clusters::WindowCovering; switch (aAttributeId) { - case Attributes::PhaseList::Id: { + case Attributes::Type::Id: { return YES; } - case Attributes::CurrentPhase::Id: { + case Attributes::PhysicalClosedLimitLift::Id: { return YES; } - case Attributes::CountdownTime::Id: { + case Attributes::PhysicalClosedLimitTilt::Id: { return YES; } - case Attributes::OperationalStateList::Id: { + case Attributes::CurrentPositionLift::Id: { return YES; } - case Attributes::OperationalState::Id: { + case Attributes::CurrentPositionTilt::Id: { return YES; } - case Attributes::OperationalError::Id: { + case Attributes::NumberOfActuationsLift::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::NumberOfActuationsTilt::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::ConfigStatus::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::CurrentPositionLiftPercentage::Id: { return YES; } - case Attributes::AttributeList::Id: { + case Attributes::CurrentPositionTiltPercentage::Id: { return YES; } - case Attributes::FeatureMap::Id: { + case Attributes::OperationalStatus::Id: { return YES; } - case Attributes::ClusterRevision::Id: { + case Attributes::TargetPositionLiftPercent100ths::Id: { return YES; } - default: { - return NO; + case Attributes::TargetPositionTiltPercent100ths::Id: { + return YES; } + case Attributes::EndProductType::Id: { + return YES; } -} -static BOOL AttributeIsSpecifiedInHEPAFilterMonitoringCluster(AttributeId aAttributeId) -{ - using namespace Clusters::HepaFilterMonitoring; - switch (aAttributeId) { - case Attributes::Condition::Id: { + case Attributes::CurrentPositionLiftPercent100ths::Id: { + return YES; + } + case Attributes::CurrentPositionTiltPercent100ths::Id: { return YES; } - case Attributes::DegradationDirection::Id: { + case Attributes::InstalledOpenLimitLift::Id: { return YES; } - case Attributes::ChangeIndication::Id: { + case Attributes::InstalledClosedLimitLift::Id: { return YES; } - case Attributes::InPlaceIndicator::Id: { + case Attributes::InstalledOpenLimitTilt::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::InstalledClosedLimitTilt::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::Mode::Id: { + return YES; + } + case Attributes::SafetyStatus::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { return YES; } case Attributes::AttributeList::Id: { @@ -2063,29 +1910,44 @@ static BOOL AttributeIsSpecifiedInHEPAFilterMonitoringCluster(AttributeId aAttri } } } -static BOOL AttributeIsSpecifiedInActivatedCarbonFilterMonitoringCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInBarrierControlCluster(AttributeId aAttributeId) { - using namespace Clusters::ActivatedCarbonFilterMonitoring; + using namespace Clusters::BarrierControl; switch (aAttributeId) { - case Attributes::Condition::Id: { + case Attributes::BarrierMovingState::Id: { return YES; } - case Attributes::DegradationDirection::Id: { + case Attributes::BarrierSafetyStatus::Id: { return YES; } - case Attributes::ChangeIndication::Id: { + case Attributes::BarrierCapabilities::Id: { return YES; } - case Attributes::InPlaceIndicator::Id: { + case Attributes::BarrierOpenEvents::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::BarrierCloseEvents::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::BarrierCommandOpenEvents::Id: { + return YES; + } + case Attributes::BarrierCommandCloseEvents::Id: { + return YES; + } + case Attributes::BarrierOpenPeriod::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::BarrierClosePeriod::Id: { + return YES; + } + case Attributes::BarrierPosition::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { return YES; } case Attributes::AttributeList::Id: { @@ -2102,818 +1964,77 @@ static BOOL AttributeIsSpecifiedInActivatedCarbonFilterMonitoringCluster(Attribu } } } -static BOOL AttributeIsSpecifiedInDoorLockCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInPumpConfigurationAndControlCluster(AttributeId aAttributeId) { - using namespace Clusters::DoorLock; + using namespace Clusters::PumpConfigurationAndControl; switch (aAttributeId) { - case Attributes::LockState::Id: { + case Attributes::MaxPressure::Id: { return YES; } - case Attributes::LockType::Id: { + case Attributes::MaxSpeed::Id: { return YES; } - case Attributes::ActuatorEnabled::Id: { + case Attributes::MaxFlow::Id: { return YES; } - case Attributes::DoorState::Id: { + case Attributes::MinConstPressure::Id: { return YES; } - case Attributes::DoorOpenEvents::Id: { + case Attributes::MaxConstPressure::Id: { return YES; } - case Attributes::DoorClosedEvents::Id: { + case Attributes::MinCompPressure::Id: { return YES; } - case Attributes::OpenPeriod::Id: { + case Attributes::MaxCompPressure::Id: { return YES; } - case Attributes::NumberOfTotalUsersSupported::Id: { + case Attributes::MinConstSpeed::Id: { return YES; } - case Attributes::NumberOfPINUsersSupported::Id: { + case Attributes::MaxConstSpeed::Id: { return YES; } - case Attributes::NumberOfRFIDUsersSupported::Id: { - return YES; - } - case Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id: { - return YES; - } - case Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id: { - return YES; - } - case Attributes::NumberOfHolidaySchedulesSupported::Id: { - return YES; - } - case Attributes::MaxPINCodeLength::Id: { - return YES; - } - case Attributes::MinPINCodeLength::Id: { - return YES; - } - case Attributes::MaxRFIDCodeLength::Id: { - return YES; - } - case Attributes::MinRFIDCodeLength::Id: { - return YES; - } - case Attributes::CredentialRulesSupport::Id: { - return YES; - } - case Attributes::NumberOfCredentialsSupportedPerUser::Id: { - return YES; - } - case Attributes::Language::Id: { - return YES; - } - case Attributes::LEDSettings::Id: { - return YES; - } - case Attributes::AutoRelockTime::Id: { - return YES; - } - case Attributes::SoundVolume::Id: { - return YES; - } - case Attributes::OperatingMode::Id: { - return YES; - } - case Attributes::SupportedOperatingModes::Id: { - return YES; - } - case Attributes::DefaultConfigurationRegister::Id: { - return YES; - } - case Attributes::EnableLocalProgramming::Id: { - return YES; - } - case Attributes::EnableOneTouchLocking::Id: { - return YES; - } - case Attributes::EnableInsideStatusLED::Id: { - return YES; - } - case Attributes::EnablePrivacyModeButton::Id: { - return YES; - } - case Attributes::LocalProgrammingFeatures::Id: { - return YES; - } - case Attributes::WrongCodeEntryLimit::Id: { - return YES; - } - case Attributes::UserCodeTemporaryDisableTime::Id: { - return YES; - } - case Attributes::SendPINOverTheAir::Id: { - return YES; - } - case Attributes::RequirePINforRemoteOperation::Id: { - return YES; - } - case Attributes::ExpiringUserTimeout::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 AttributeIsSpecifiedInWindowCoveringCluster(AttributeId aAttributeId) -{ - using namespace Clusters::WindowCovering; - switch (aAttributeId) { - case Attributes::Type::Id: { - return YES; - } - case Attributes::PhysicalClosedLimitLift::Id: { - return YES; - } - case Attributes::PhysicalClosedLimitTilt::Id: { - return YES; - } - case Attributes::CurrentPositionLift::Id: { - return YES; - } - case Attributes::CurrentPositionTilt::Id: { - return YES; - } - case Attributes::NumberOfActuationsLift::Id: { - return YES; - } - case Attributes::NumberOfActuationsTilt::Id: { - return YES; - } - case Attributes::ConfigStatus::Id: { - return YES; - } - case Attributes::CurrentPositionLiftPercentage::Id: { - return YES; - } - case Attributes::CurrentPositionTiltPercentage::Id: { - return YES; - } - case Attributes::OperationalStatus::Id: { - return YES; - } - case Attributes::TargetPositionLiftPercent100ths::Id: { - return YES; - } - case Attributes::TargetPositionTiltPercent100ths::Id: { - return YES; - } - case Attributes::EndProductType::Id: { - return YES; - } - case Attributes::CurrentPositionLiftPercent100ths::Id: { - return YES; - } - case Attributes::CurrentPositionTiltPercent100ths::Id: { - return YES; - } - case Attributes::InstalledOpenLimitLift::Id: { - return YES; - } - case Attributes::InstalledClosedLimitLift::Id: { - return YES; - } - case Attributes::InstalledOpenLimitTilt::Id: { - return YES; - } - case Attributes::InstalledClosedLimitTilt::Id: { - return YES; - } - case Attributes::Mode::Id: { - return YES; - } - case Attributes::SafetyStatus::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 AttributeIsSpecifiedInBarrierControlCluster(AttributeId aAttributeId) -{ - using namespace Clusters::BarrierControl; - switch (aAttributeId) { - case Attributes::BarrierMovingState::Id: { - return YES; - } - case Attributes::BarrierSafetyStatus::Id: { - return YES; - } - case Attributes::BarrierCapabilities::Id: { - return YES; - } - case Attributes::BarrierOpenEvents::Id: { - return YES; - } - case Attributes::BarrierCloseEvents::Id: { - return YES; - } - case Attributes::BarrierCommandOpenEvents::Id: { - return YES; - } - case Attributes::BarrierCommandCloseEvents::Id: { - return YES; - } - case Attributes::BarrierOpenPeriod::Id: { - return YES; - } - case Attributes::BarrierClosePeriod::Id: { - return YES; - } - case Attributes::BarrierPosition::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 AttributeIsSpecifiedInPumpConfigurationAndControlCluster(AttributeId aAttributeId) -{ - using namespace Clusters::PumpConfigurationAndControl; - switch (aAttributeId) { - case Attributes::MaxPressure::Id: { - return YES; - } - case Attributes::MaxSpeed::Id: { - return YES; - } - case Attributes::MaxFlow::Id: { - return YES; - } - case Attributes::MinConstPressure::Id: { - return YES; - } - case Attributes::MaxConstPressure::Id: { - return YES; - } - case Attributes::MinCompPressure::Id: { - return YES; - } - case Attributes::MaxCompPressure::Id: { - return YES; - } - case Attributes::MinConstSpeed::Id: { - return YES; - } - case Attributes::MaxConstSpeed::Id: { - return YES; - } - case Attributes::MinConstFlow::Id: { - return YES; - } - case Attributes::MaxConstFlow::Id: { - return YES; - } - case Attributes::MinConstTemp::Id: { - return YES; - } - case Attributes::MaxConstTemp::Id: { - return YES; - } - case Attributes::PumpStatus::Id: { - return YES; - } - case Attributes::EffectiveOperationMode::Id: { - return YES; - } - case Attributes::EffectiveControlMode::Id: { - return YES; - } - case Attributes::Capacity::Id: { - return YES; - } - case Attributes::Speed::Id: { - return YES; - } - case Attributes::LifetimeRunningHours::Id: { - return YES; - } - case Attributes::Power::Id: { - return YES; - } - case Attributes::LifetimeEnergyConsumed::Id: { - return YES; - } - case Attributes::OperationMode::Id: { - return YES; - } - case Attributes::ControlMode::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 AttributeIsSpecifiedInThermostatCluster(AttributeId aAttributeId) -{ - using namespace Clusters::Thermostat; - switch (aAttributeId) { - case Attributes::LocalTemperature::Id: { - return YES; - } - case Attributes::OutdoorTemperature::Id: { - return YES; - } - case Attributes::Occupancy::Id: { - return YES; - } - case Attributes::AbsMinHeatSetpointLimit::Id: { - return YES; - } - case Attributes::AbsMaxHeatSetpointLimit::Id: { - return YES; - } - case Attributes::AbsMinCoolSetpointLimit::Id: { - return YES; - } - case Attributes::AbsMaxCoolSetpointLimit::Id: { - return YES; - } - case Attributes::PICoolingDemand::Id: { - return YES; - } - case Attributes::PIHeatingDemand::Id: { - return YES; - } - case Attributes::HVACSystemTypeConfiguration::Id: { - return YES; - } - case Attributes::LocalTemperatureCalibration::Id: { - return YES; - } - case Attributes::OccupiedCoolingSetpoint::Id: { - return YES; - } - case Attributes::OccupiedHeatingSetpoint::Id: { - return YES; - } - case Attributes::UnoccupiedCoolingSetpoint::Id: { - return YES; - } - case Attributes::UnoccupiedHeatingSetpoint::Id: { - return YES; - } - case Attributes::MinHeatSetpointLimit::Id: { - return YES; - } - case Attributes::MaxHeatSetpointLimit::Id: { - return YES; - } - case Attributes::MinCoolSetpointLimit::Id: { - return YES; - } - case Attributes::MaxCoolSetpointLimit::Id: { - return YES; - } - case Attributes::MinSetpointDeadBand::Id: { - return YES; - } - case Attributes::RemoteSensing::Id: { - return YES; - } - case Attributes::ControlSequenceOfOperation::Id: { - return YES; - } - case Attributes::SystemMode::Id: { - return YES; - } - case Attributes::ThermostatRunningMode::Id: { - return YES; - } - case Attributes::StartOfWeek::Id: { - return YES; - } - case Attributes::NumberOfWeeklyTransitions::Id: { - return YES; - } - case Attributes::NumberOfDailyTransitions::Id: { - return YES; - } - case Attributes::TemperatureSetpointHold::Id: { - return YES; - } - case Attributes::TemperatureSetpointHoldDuration::Id: { - return YES; - } - case Attributes::ThermostatProgrammingOperationMode::Id: { - return YES; - } - case Attributes::ThermostatRunningState::Id: { - return YES; - } - case Attributes::SetpointChangeSource::Id: { - return YES; - } - case Attributes::SetpointChangeAmount::Id: { - return YES; - } - case Attributes::SetpointChangeSourceTimestamp::Id: { - return YES; - } - case Attributes::OccupiedSetback::Id: { - return YES; - } - case Attributes::OccupiedSetbackMin::Id: { - return YES; - } - case Attributes::OccupiedSetbackMax::Id: { - return YES; - } - case Attributes::UnoccupiedSetback::Id: { - return YES; - } - case Attributes::UnoccupiedSetbackMin::Id: { - return YES; - } - case Attributes::UnoccupiedSetbackMax::Id: { - return YES; - } - case Attributes::EmergencyHeatDelta::Id: { - return YES; - } - case Attributes::ACType::Id: { - return YES; - } - case Attributes::ACCapacity::Id: { - return YES; - } - case Attributes::ACRefrigerantType::Id: { - return YES; - } - case Attributes::ACCompressorType::Id: { - return YES; - } - case Attributes::ACErrorCode::Id: { - return YES; - } - case Attributes::ACLouverPosition::Id: { - return YES; - } - case Attributes::ACCoilTemperature::Id: { - return YES; - } - case Attributes::ACCapacityformat::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 AttributeIsSpecifiedInFanControlCluster(AttributeId aAttributeId) -{ - using namespace Clusters::FanControl; - switch (aAttributeId) { - case Attributes::FanMode::Id: { - return YES; - } - case Attributes::FanModeSequence::Id: { - return YES; - } - case Attributes::PercentSetting::Id: { - return YES; - } - case Attributes::PercentCurrent::Id: { - return YES; - } - case Attributes::SpeedMax::Id: { - return YES; - } - case Attributes::SpeedSetting::Id: { - return YES; - } - case Attributes::SpeedCurrent::Id: { - return YES; - } - case Attributes::RockSupport::Id: { - return YES; - } - case Attributes::RockSetting::Id: { - return YES; - } - case Attributes::WindSupport::Id: { - return YES; - } - case Attributes::WindSetting::Id: { - return YES; - } - case Attributes::AirflowDirection::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 AttributeIsSpecifiedInThermostatUserInterfaceConfigurationCluster(AttributeId aAttributeId) -{ - using namespace Clusters::ThermostatUserInterfaceConfiguration; - switch (aAttributeId) { - case Attributes::TemperatureDisplayMode::Id: { - return YES; - } - case Attributes::KeypadLockout::Id: { - return YES; - } - case Attributes::ScheduleProgrammingVisibility::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 AttributeIsSpecifiedInColorControlCluster(AttributeId aAttributeId) -{ - using namespace Clusters::ColorControl; - switch (aAttributeId) { - case Attributes::CurrentHue::Id: { - return YES; - } - case Attributes::CurrentSaturation::Id: { - return YES; - } - case Attributes::RemainingTime::Id: { - return YES; - } - case Attributes::CurrentX::Id: { - return YES; - } - case Attributes::CurrentY::Id: { - return YES; - } - case Attributes::DriftCompensation::Id: { - return YES; - } - case Attributes::CompensationText::Id: { - return YES; - } - case Attributes::ColorTemperatureMireds::Id: { - return YES; - } - case Attributes::ColorMode::Id: { - return YES; - } - case Attributes::Options::Id: { - return YES; - } - case Attributes::NumberOfPrimaries::Id: { - return YES; - } - case Attributes::Primary1X::Id: { - return YES; - } - case Attributes::Primary1Y::Id: { - return YES; - } - case Attributes::Primary1Intensity::Id: { - return YES; - } - case Attributes::Primary2X::Id: { - return YES; - } - case Attributes::Primary2Y::Id: { - return YES; - } - case Attributes::Primary2Intensity::Id: { - return YES; - } - case Attributes::Primary3X::Id: { - return YES; - } - case Attributes::Primary3Y::Id: { - return YES; - } - case Attributes::Primary3Intensity::Id: { - return YES; - } - case Attributes::Primary4X::Id: { - return YES; - } - case Attributes::Primary4Y::Id: { - return YES; - } - case Attributes::Primary4Intensity::Id: { - return YES; - } - case Attributes::Primary5X::Id: { - return YES; - } - case Attributes::Primary5Y::Id: { - return YES; - } - case Attributes::Primary5Intensity::Id: { - return YES; - } - case Attributes::Primary6X::Id: { - return YES; - } - case Attributes::Primary6Y::Id: { - return YES; - } - case Attributes::Primary6Intensity::Id: { - return YES; - } - case Attributes::WhitePointX::Id: { - return YES; - } - case Attributes::WhitePointY::Id: { - return YES; - } - case Attributes::ColorPointRX::Id: { - return YES; - } - case Attributes::ColorPointRY::Id: { - return YES; - } - case Attributes::ColorPointRIntensity::Id: { - return YES; - } - case Attributes::ColorPointGX::Id: { - return YES; - } - case Attributes::ColorPointGY::Id: { - return YES; - } - case Attributes::ColorPointGIntensity::Id: { - return YES; - } - case Attributes::ColorPointBX::Id: { - return YES; - } - case Attributes::ColorPointBY::Id: { + case Attributes::MinConstFlow::Id: { return YES; } - case Attributes::ColorPointBIntensity::Id: { + case Attributes::MaxConstFlow::Id: { return YES; } - case Attributes::EnhancedCurrentHue::Id: { + case Attributes::MinConstTemp::Id: { return YES; } - case Attributes::EnhancedColorMode::Id: { + case Attributes::MaxConstTemp::Id: { return YES; } - case Attributes::ColorLoopActive::Id: { + case Attributes::PumpStatus::Id: { return YES; } - case Attributes::ColorLoopDirection::Id: { + case Attributes::EffectiveOperationMode::Id: { return YES; } - case Attributes::ColorLoopTime::Id: { + case Attributes::EffectiveControlMode::Id: { return YES; } - case Attributes::ColorLoopStartEnhancedHue::Id: { + case Attributes::Capacity::Id: { return YES; } - case Attributes::ColorLoopStoredEnhancedHue::Id: { + case Attributes::Speed::Id: { return YES; } - case Attributes::ColorCapabilities::Id: { + case Attributes::LifetimeRunningHours::Id: { return YES; } - case Attributes::ColorTempPhysicalMinMireds::Id: { + case Attributes::Power::Id: { return YES; } - case Attributes::ColorTempPhysicalMaxMireds::Id: { + case Attributes::LifetimeEnergyConsumed::Id: { return YES; } - case Attributes::CoupleColorTempToLevelMinMireds::Id: { + case Attributes::OperationMode::Id: { return YES; } - case Attributes::StartUpColorTemperatureMireds::Id: { + case Attributes::ControlMode::Id: { return YES; } case Attributes::GeneratedCommandList::Id: { @@ -2922,9 +2043,6 @@ static BOOL AttributeIsSpecifiedInColorControlCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2939,185 +2057,155 @@ static BOOL AttributeIsSpecifiedInColorControlCluster(AttributeId aAttributeId) } } } -static BOOL AttributeIsSpecifiedInBallastConfigurationCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInThermostatCluster(AttributeId aAttributeId) { - using namespace Clusters::BallastConfiguration; + using namespace Clusters::Thermostat; switch (aAttributeId) { - case Attributes::PhysicalMinLevel::Id: { - return YES; - } - case Attributes::PhysicalMaxLevel::Id: { + case Attributes::LocalTemperature::Id: { return YES; } - case Attributes::BallastStatus::Id: { + case Attributes::OutdoorTemperature::Id: { return YES; } - case Attributes::MinLevel::Id: { + case Attributes::Occupancy::Id: { return YES; } - case Attributes::MaxLevel::Id: { + case Attributes::AbsMinHeatSetpointLimit::Id: { return YES; } - case Attributes::IntrinsicBallastFactor::Id: { + case Attributes::AbsMaxHeatSetpointLimit::Id: { return YES; } - case Attributes::BallastFactorAdjustment::Id: { + case Attributes::AbsMinCoolSetpointLimit::Id: { return YES; } - case Attributes::LampQuantity::Id: { + case Attributes::AbsMaxCoolSetpointLimit::Id: { return YES; } - case Attributes::LampType::Id: { + case Attributes::PICoolingDemand::Id: { return YES; } - case Attributes::LampManufacturer::Id: { + case Attributes::PIHeatingDemand::Id: { return YES; } - case Attributes::LampRatedHours::Id: { + case Attributes::HVACSystemTypeConfiguration::Id: { return YES; } - case Attributes::LampBurnHours::Id: { + case Attributes::LocalTemperatureCalibration::Id: { return YES; } - case Attributes::LampAlarmMode::Id: { + case Attributes::OccupiedCoolingSetpoint::Id: { return YES; } - case Attributes::LampBurnHoursTripPoint::Id: { + case Attributes::OccupiedHeatingSetpoint::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::UnoccupiedCoolingSetpoint::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::UnoccupiedHeatingSetpoint::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::MinHeatSetpointLimit::Id: { return YES; } - case Attributes::AttributeList::Id: { + case Attributes::MaxHeatSetpointLimit::Id: { return YES; } - case Attributes::FeatureMap::Id: { + case Attributes::MinCoolSetpointLimit::Id: { return YES; } - case Attributes::ClusterRevision::Id: { + case Attributes::MaxCoolSetpointLimit::Id: { return YES; } - default: { - return NO; - } - } -} -static BOOL AttributeIsSpecifiedInIlluminanceMeasurementCluster(AttributeId aAttributeId) -{ - using namespace Clusters::IlluminanceMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { + case Attributes::MinSetpointDeadBand::Id: { return YES; } - case Attributes::MinMeasuredValue::Id: { + case Attributes::RemoteSensing::Id: { return YES; } - case Attributes::MaxMeasuredValue::Id: { + case Attributes::ControlSequenceOfOperation::Id: { return YES; } - case Attributes::Tolerance::Id: { + case Attributes::SystemMode::Id: { return YES; } - case Attributes::LightSensorType::Id: { + case Attributes::ThermostatRunningMode::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::StartOfWeek::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::NumberOfWeeklyTransitions::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::NumberOfDailyTransitions::Id: { return YES; } - case Attributes::AttributeList::Id: { + case Attributes::TemperatureSetpointHold::Id: { return YES; } - case Attributes::FeatureMap::Id: { + case Attributes::TemperatureSetpointHoldDuration::Id: { return YES; } - case Attributes::ClusterRevision::Id: { + case Attributes::ThermostatProgrammingOperationMode::Id: { return YES; } - default: { - return NO; - } - } -} -static BOOL AttributeIsSpecifiedInTemperatureMeasurementCluster(AttributeId aAttributeId) -{ - using namespace Clusters::TemperatureMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { + case Attributes::ThermostatRunningState::Id: { return YES; } - case Attributes::MinMeasuredValue::Id: { + case Attributes::SetpointChangeSource::Id: { return YES; } - case Attributes::MaxMeasuredValue::Id: { + case Attributes::SetpointChangeAmount::Id: { return YES; } - case Attributes::Tolerance::Id: { + case Attributes::SetpointChangeSourceTimestamp::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::OccupiedSetback::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::OccupiedSetbackMin::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::OccupiedSetbackMax::Id: { return YES; } - case Attributes::AttributeList::Id: { + case Attributes::UnoccupiedSetback::Id: { return YES; } - case Attributes::FeatureMap::Id: { + case Attributes::UnoccupiedSetbackMin::Id: { return YES; } - case Attributes::ClusterRevision::Id: { + case Attributes::UnoccupiedSetbackMax::Id: { return YES; } - default: { - return NO; - } - } -} -static BOOL AttributeIsSpecifiedInPressureMeasurementCluster(AttributeId aAttributeId) -{ - using namespace Clusters::PressureMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { + case Attributes::EmergencyHeatDelta::Id: { return YES; } - case Attributes::MinMeasuredValue::Id: { + case Attributes::ACType::Id: { return YES; } - case Attributes::MaxMeasuredValue::Id: { + case Attributes::ACCapacity::Id: { return YES; } - case Attributes::Tolerance::Id: { + case Attributes::ACRefrigerantType::Id: { return YES; } - case Attributes::ScaledValue::Id: { + case Attributes::ACCompressorType::Id: { return YES; } - case Attributes::MinScaledValue::Id: { + case Attributes::ACErrorCode::Id: { return YES; } - case Attributes::MaxScaledValue::Id: { + case Attributes::ACLouverPosition::Id: { return YES; } - case Attributes::ScaledTolerance::Id: { + case Attributes::ACCoilTemperature::Id: { return YES; } - case Attributes::Scale::Id: { + case Attributes::ACCapacityformat::Id: { return YES; } case Attributes::GeneratedCommandList::Id: { @@ -3126,9 +2214,6 @@ static BOOL AttributeIsSpecifiedInPressureMeasurementCluster(AttributeId aAttrib case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3143,59 +2228,41 @@ static BOOL AttributeIsSpecifiedInPressureMeasurementCluster(AttributeId aAttrib } } } -static BOOL AttributeIsSpecifiedInFlowMeasurementCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInFanControlCluster(AttributeId aAttributeId) { - using namespace Clusters::FlowMeasurement; + using namespace Clusters::FanControl; switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - return YES; - } - case Attributes::MinMeasuredValue::Id: { - return YES; - } - case Attributes::MaxMeasuredValue::Id: { - return YES; - } - case Attributes::Tolerance::Id: { + case Attributes::FanMode::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::FanModeSequence::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::PercentSetting::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::PercentCurrent::Id: { return YES; } - case Attributes::AttributeList::Id: { + case Attributes::SpeedMax::Id: { return YES; } - case Attributes::FeatureMap::Id: { + case Attributes::SpeedSetting::Id: { return YES; } - case Attributes::ClusterRevision::Id: { + case Attributes::SpeedCurrent::Id: { return YES; } - default: { - return NO; - } - } -} -static BOOL AttributeIsSpecifiedInRelativeHumidityMeasurementCluster(AttributeId aAttributeId) -{ - using namespace Clusters::RelativeHumidityMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { + case Attributes::RockSupport::Id: { return YES; } - case Attributes::MinMeasuredValue::Id: { + case Attributes::RockSetting::Id: { return YES; } - case Attributes::MaxMeasuredValue::Id: { + case Attributes::WindSupport::Id: { return YES; } - case Attributes::Tolerance::Id: { + case Attributes::WindSetting::Id: { return YES; } case Attributes::GeneratedCommandList::Id: { @@ -3204,9 +2271,6 @@ static BOOL AttributeIsSpecifiedInRelativeHumidityMeasurementCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3221,224 +2285,197 @@ static BOOL AttributeIsSpecifiedInRelativeHumidityMeasurementCluster(AttributeId } } } -static BOOL AttributeIsSpecifiedInOccupancySensingCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInThermostatUserInterfaceConfigurationCluster(AttributeId aAttributeId) { - using namespace Clusters::OccupancySensing; + using namespace Clusters::ThermostatUserInterfaceConfiguration; switch (aAttributeId) { - case Attributes::Occupancy::Id: { - return YES; - } - case Attributes::OccupancySensorType::Id: { + case Attributes::TemperatureDisplayMode::Id: { return YES; } - case Attributes::OccupancySensorTypeBitmap::Id: { + case Attributes::KeypadLockout::Id: { return YES; } - case Attributes::PIROccupiedToUnoccupiedDelay::Id: { + case Attributes::ScheduleProgrammingVisibility::Id: { return YES; } - case Attributes::PIRUnoccupiedToOccupiedDelay::Id: { + case Attributes::GeneratedCommandList::Id: { return YES; } - case Attributes::PIRUnoccupiedToOccupiedThreshold::Id: { + case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: { + case Attributes::AttributeList::Id: { return YES; } - case Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id: { + case Attributes::FeatureMap::Id: { return YES; } - case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id: { + case Attributes::ClusterRevision::Id: { return YES; } - case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { - return YES; + default: { + return NO; } - case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id: { - return YES; } - case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { +} +static BOOL AttributeIsSpecifiedInColorControlCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ColorControl; + switch (aAttributeId) { + case Attributes::CurrentHue::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::CurrentSaturation::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::RemainingTime::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::CurrentX::Id: { return YES; } - case Attributes::AttributeList::Id: { + case Attributes::CurrentY::Id: { return YES; } - case Attributes::FeatureMap::Id: { + case Attributes::DriftCompensation::Id: { return YES; } - case Attributes::ClusterRevision::Id: { + case Attributes::CompensationText::Id: { return YES; } - default: { - return NO; - } - } -} -static BOOL AttributeIsSpecifiedInCarbonMonoxideConcentrationMeasurementCluster(AttributeId aAttributeId) -{ - using namespace Clusters::CarbonMonoxideConcentrationMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { + case Attributes::ColorTemperatureMireds::Id: { return YES; } - case Attributes::MinMeasuredValue::Id: { + case Attributes::ColorMode::Id: { return YES; } - case Attributes::MaxMeasuredValue::Id: { + case Attributes::Options::Id: { return YES; } - case Attributes::PeakMeasuredValue::Id: { + case Attributes::NumberOfPrimaries::Id: { return YES; } - case Attributes::PeakMeasuredValueWindow::Id: { + case Attributes::Primary1X::Id: { return YES; } - case Attributes::AverageMeasuredValue::Id: { + case Attributes::Primary1Y::Id: { return YES; } - case Attributes::AverageMeasuredValueWindow::Id: { + case Attributes::Primary1Intensity::Id: { return YES; } - case Attributes::Uncertainty::Id: { + case Attributes::Primary2X::Id: { return YES; } - case Attributes::MeasurementUnit::Id: { + case Attributes::Primary2Y::Id: { return YES; } - case Attributes::MeasurementMedium::Id: { + case Attributes::Primary2Intensity::Id: { return YES; } - case Attributes::LevelValue::Id: { + case Attributes::Primary3X::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::Primary3Y::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::Primary3Intensity::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::Primary4X::Id: { return YES; } - case Attributes::AttributeList::Id: { + case Attributes::Primary4Y::Id: { return YES; } - case Attributes::FeatureMap::Id: { + case Attributes::Primary4Intensity::Id: { return YES; } - case Attributes::ClusterRevision::Id: { + case Attributes::Primary5X::Id: { return YES; } - default: { - return NO; - } - } -} -static BOOL AttributeIsSpecifiedInCarbonDioxideConcentrationMeasurementCluster(AttributeId aAttributeId) -{ - using namespace Clusters::CarbonDioxideConcentrationMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { + case Attributes::Primary5Y::Id: { return YES; } - case Attributes::MinMeasuredValue::Id: { + case Attributes::Primary5Intensity::Id: { return YES; } - case Attributes::MaxMeasuredValue::Id: { + case Attributes::Primary6X::Id: { return YES; } - case Attributes::PeakMeasuredValue::Id: { + case Attributes::Primary6Y::Id: { return YES; } - case Attributes::PeakMeasuredValueWindow::Id: { + case Attributes::Primary6Intensity::Id: { return YES; } - case Attributes::AverageMeasuredValue::Id: { + case Attributes::WhitePointX::Id: { return YES; } - case Attributes::AverageMeasuredValueWindow::Id: { + case Attributes::WhitePointY::Id: { return YES; } - case Attributes::Uncertainty::Id: { + case Attributes::ColorPointRX::Id: { return YES; } - case Attributes::MeasurementUnit::Id: { + case Attributes::ColorPointRY::Id: { return YES; } - case Attributes::MeasurementMedium::Id: { + case Attributes::ColorPointRIntensity::Id: { return YES; } - case Attributes::LevelValue::Id: { + case Attributes::ColorPointGX::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::ColorPointGY::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::ColorPointGIntensity::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::ColorPointBX::Id: { return YES; } - case Attributes::AttributeList::Id: { + case Attributes::ColorPointBY::Id: { return YES; } - case Attributes::FeatureMap::Id: { + case Attributes::ColorPointBIntensity::Id: { return YES; } - case Attributes::ClusterRevision::Id: { + case Attributes::EnhancedCurrentHue::Id: { return YES; } - default: { - return NO; - } - } -} -static BOOL AttributeIsSpecifiedInNitrogenDioxideConcentrationMeasurementCluster(AttributeId aAttributeId) -{ - using namespace Clusters::NitrogenDioxideConcentrationMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { + case Attributes::EnhancedColorMode::Id: { return YES; } - case Attributes::MinMeasuredValue::Id: { + case Attributes::ColorLoopActive::Id: { return YES; } - case Attributes::MaxMeasuredValue::Id: { + case Attributes::ColorLoopDirection::Id: { return YES; } - case Attributes::PeakMeasuredValue::Id: { + case Attributes::ColorLoopTime::Id: { return YES; } - case Attributes::PeakMeasuredValueWindow::Id: { + case Attributes::ColorLoopStartEnhancedHue::Id: { return YES; } - case Attributes::AverageMeasuredValue::Id: { + case Attributes::ColorLoopStoredEnhancedHue::Id: { return YES; } - case Attributes::AverageMeasuredValueWindow::Id: { + case Attributes::ColorCapabilities::Id: { return YES; } - case Attributes::Uncertainty::Id: { + case Attributes::ColorTempPhysicalMinMireds::Id: { return YES; } - case Attributes::MeasurementUnit::Id: { + case Attributes::ColorTempPhysicalMaxMireds::Id: { return YES; } - case Attributes::MeasurementMedium::Id: { + case Attributes::CoupleColorTempToLevelMinMireds::Id: { return YES; } - case Attributes::LevelValue::Id: { + case Attributes::StartUpColorTemperatureMireds::Id: { return YES; } case Attributes::GeneratedCommandList::Id: { @@ -3447,9 +2484,6 @@ static BOOL AttributeIsSpecifiedInNitrogenDioxideConcentrationMeasurementCluster case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3464,50 +2498,56 @@ static BOOL AttributeIsSpecifiedInNitrogenDioxideConcentrationMeasurementCluster } } } -static BOOL AttributeIsSpecifiedInOzoneConcentrationMeasurementCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInBallastConfigurationCluster(AttributeId aAttributeId) { - using namespace Clusters::OzoneConcentrationMeasurement; + using namespace Clusters::BallastConfiguration; switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { + case Attributes::PhysicalMinLevel::Id: { return YES; } - case Attributes::MinMeasuredValue::Id: { + case Attributes::PhysicalMaxLevel::Id: { return YES; } - case Attributes::MaxMeasuredValue::Id: { + case Attributes::BallastStatus::Id: { + return YES; + } + case Attributes::MinLevel::Id: { return YES; } - case Attributes::PeakMeasuredValue::Id: { + case Attributes::MaxLevel::Id: { return YES; } - case Attributes::PeakMeasuredValueWindow::Id: { + case Attributes::IntrinsicBallastFactor::Id: { return YES; } - case Attributes::AverageMeasuredValue::Id: { + case Attributes::BallastFactorAdjustment::Id: { return YES; } - case Attributes::AverageMeasuredValueWindow::Id: { + case Attributes::LampQuantity::Id: { return YES; } - case Attributes::Uncertainty::Id: { + case Attributes::LampType::Id: { return YES; } - case Attributes::MeasurementUnit::Id: { + case Attributes::LampManufacturer::Id: { return YES; } - case Attributes::MeasurementMedium::Id: { + case Attributes::LampRatedHours::Id: { return YES; } - case Attributes::LevelValue::Id: { + case Attributes::LampBurnHours::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::LampAlarmMode::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::LampBurnHoursTripPoint::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::AcceptedCommandList::Id: { return YES; } case Attributes::AttributeList::Id: { @@ -3524,9 +2564,9 @@ static BOOL AttributeIsSpecifiedInOzoneConcentrationMeasurementCluster(Attribute } } } -static BOOL AttributeIsSpecifiedInPM25ConcentrationMeasurementCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInIlluminanceMeasurementCluster(AttributeId aAttributeId) { - using namespace Clusters::Pm25ConcentrationMeasurement; + using namespace Clusters::IlluminanceMeasurement; switch (aAttributeId) { case Attributes::MeasuredValue::Id: { return YES; @@ -3537,28 +2577,10 @@ static BOOL AttributeIsSpecifiedInPM25ConcentrationMeasurementCluster(AttributeI case Attributes::MaxMeasuredValue::Id: { return YES; } - case Attributes::PeakMeasuredValue::Id: { - return YES; - } - case Attributes::PeakMeasuredValueWindow::Id: { - return YES; - } - case Attributes::AverageMeasuredValue::Id: { - return YES; - } - case Attributes::AverageMeasuredValueWindow::Id: { - return YES; - } - case Attributes::Uncertainty::Id: { - return YES; - } - case Attributes::MeasurementUnit::Id: { - return YES; - } - case Attributes::MeasurementMedium::Id: { + case Attributes::Tolerance::Id: { return YES; } - case Attributes::LevelValue::Id: { + case Attributes::LightSensorType::Id: { return YES; } case Attributes::GeneratedCommandList::Id: { @@ -3567,9 +2589,6 @@ static BOOL AttributeIsSpecifiedInPM25ConcentrationMeasurementCluster(AttributeI case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3584,9 +2603,9 @@ static BOOL AttributeIsSpecifiedInPM25ConcentrationMeasurementCluster(AttributeI } } } -static BOOL AttributeIsSpecifiedInFormaldehydeConcentrationMeasurementCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInTemperatureMeasurementCluster(AttributeId aAttributeId) { - using namespace Clusters::FormaldehydeConcentrationMeasurement; + using namespace Clusters::TemperatureMeasurement; switch (aAttributeId) { case Attributes::MeasuredValue::Id: { return YES; @@ -3597,28 +2616,7 @@ static BOOL AttributeIsSpecifiedInFormaldehydeConcentrationMeasurementCluster(At case Attributes::MaxMeasuredValue::Id: { return YES; } - case Attributes::PeakMeasuredValue::Id: { - return YES; - } - case Attributes::PeakMeasuredValueWindow::Id: { - return YES; - } - case Attributes::AverageMeasuredValue::Id: { - return YES; - } - case Attributes::AverageMeasuredValueWindow::Id: { - return YES; - } - case Attributes::Uncertainty::Id: { - return YES; - } - case Attributes::MeasurementUnit::Id: { - return YES; - } - case Attributes::MeasurementMedium::Id: { - return YES; - } - case Attributes::LevelValue::Id: { + case Attributes::Tolerance::Id: { return YES; } case Attributes::GeneratedCommandList::Id: { @@ -3627,9 +2625,6 @@ static BOOL AttributeIsSpecifiedInFormaldehydeConcentrationMeasurementCluster(At case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3644,9 +2639,9 @@ static BOOL AttributeIsSpecifiedInFormaldehydeConcentrationMeasurementCluster(At } } } -static BOOL AttributeIsSpecifiedInPM1ConcentrationMeasurementCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInPressureMeasurementCluster(AttributeId aAttributeId) { - using namespace Clusters::Pm1ConcentrationMeasurement; + using namespace Clusters::PressureMeasurement; switch (aAttributeId) { case Attributes::MeasuredValue::Id: { return YES; @@ -3657,28 +2652,22 @@ static BOOL AttributeIsSpecifiedInPM1ConcentrationMeasurementCluster(AttributeId case Attributes::MaxMeasuredValue::Id: { return YES; } - case Attributes::PeakMeasuredValue::Id: { - return YES; - } - case Attributes::PeakMeasuredValueWindow::Id: { - return YES; - } - case Attributes::AverageMeasuredValue::Id: { + case Attributes::Tolerance::Id: { return YES; } - case Attributes::AverageMeasuredValueWindow::Id: { + case Attributes::ScaledValue::Id: { return YES; } - case Attributes::Uncertainty::Id: { + case Attributes::MinScaledValue::Id: { return YES; } - case Attributes::MeasurementUnit::Id: { + case Attributes::MaxScaledValue::Id: { return YES; } - case Attributes::MeasurementMedium::Id: { + case Attributes::ScaledTolerance::Id: { return YES; } - case Attributes::LevelValue::Id: { + case Attributes::Scale::Id: { return YES; } case Attributes::GeneratedCommandList::Id: { @@ -3687,9 +2676,6 @@ static BOOL AttributeIsSpecifiedInPM1ConcentrationMeasurementCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3704,9 +2690,9 @@ static BOOL AttributeIsSpecifiedInPM1ConcentrationMeasurementCluster(AttributeId } } } -static BOOL AttributeIsSpecifiedInPM10ConcentrationMeasurementCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInFlowMeasurementCluster(AttributeId aAttributeId) { - using namespace Clusters::Pm10ConcentrationMeasurement; + using namespace Clusters::FlowMeasurement; switch (aAttributeId) { case Attributes::MeasuredValue::Id: { return YES; @@ -3717,28 +2703,7 @@ static BOOL AttributeIsSpecifiedInPM10ConcentrationMeasurementCluster(AttributeI case Attributes::MaxMeasuredValue::Id: { return YES; } - case Attributes::PeakMeasuredValue::Id: { - return YES; - } - case Attributes::PeakMeasuredValueWindow::Id: { - return YES; - } - case Attributes::AverageMeasuredValue::Id: { - return YES; - } - case Attributes::AverageMeasuredValueWindow::Id: { - return YES; - } - case Attributes::Uncertainty::Id: { - return YES; - } - case Attributes::MeasurementUnit::Id: { - return YES; - } - case Attributes::MeasurementMedium::Id: { - return YES; - } - case Attributes::LevelValue::Id: { + case Attributes::Tolerance::Id: { return YES; } case Attributes::GeneratedCommandList::Id: { @@ -3747,9 +2712,6 @@ static BOOL AttributeIsSpecifiedInPM10ConcentrationMeasurementCluster(AttributeI case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3764,9 +2726,9 @@ static BOOL AttributeIsSpecifiedInPM10ConcentrationMeasurementCluster(AttributeI } } } -static BOOL AttributeIsSpecifiedInTotalVolatileOrganicCompoundsConcentrationMeasurementCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInRelativeHumidityMeasurementCluster(AttributeId aAttributeId) { - using namespace Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement; + using namespace Clusters::RelativeHumidityMeasurement; switch (aAttributeId) { case Attributes::MeasuredValue::Id: { return YES; @@ -3777,28 +2739,7 @@ static BOOL AttributeIsSpecifiedInTotalVolatileOrganicCompoundsConcentrationMeas case Attributes::MaxMeasuredValue::Id: { return YES; } - case Attributes::PeakMeasuredValue::Id: { - return YES; - } - case Attributes::PeakMeasuredValueWindow::Id: { - return YES; - } - case Attributes::AverageMeasuredValue::Id: { - return YES; - } - case Attributes::AverageMeasuredValueWindow::Id: { - return YES; - } - case Attributes::Uncertainty::Id: { - return YES; - } - case Attributes::MeasurementUnit::Id: { - return YES; - } - case Attributes::MeasurementMedium::Id: { - return YES; - } - case Attributes::LevelValue::Id: { + case Attributes::Tolerance::Id: { return YES; } case Attributes::GeneratedCommandList::Id: { @@ -3807,9 +2748,6 @@ static BOOL AttributeIsSpecifiedInTotalVolatileOrganicCompoundsConcentrationMeas case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3824,50 +2762,50 @@ static BOOL AttributeIsSpecifiedInTotalVolatileOrganicCompoundsConcentrationMeas } } } -static BOOL AttributeIsSpecifiedInRadonConcentrationMeasurementCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInOccupancySensingCluster(AttributeId aAttributeId) { - using namespace Clusters::RadonConcentrationMeasurement; + using namespace Clusters::OccupancySensing; switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { + case Attributes::Occupancy::Id: { return YES; } - case Attributes::MinMeasuredValue::Id: { + case Attributes::OccupancySensorType::Id: { return YES; } - case Attributes::MaxMeasuredValue::Id: { + case Attributes::OccupancySensorTypeBitmap::Id: { return YES; } - case Attributes::PeakMeasuredValue::Id: { + case Attributes::PIROccupiedToUnoccupiedDelay::Id: { return YES; } - case Attributes::PeakMeasuredValueWindow::Id: { + case Attributes::PIRUnoccupiedToOccupiedDelay::Id: { return YES; } - case Attributes::AverageMeasuredValue::Id: { + case Attributes::PIRUnoccupiedToOccupiedThreshold::Id: { return YES; } - case Attributes::AverageMeasuredValueWindow::Id: { + case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: { return YES; } - case Attributes::Uncertainty::Id: { + case Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id: { return YES; } - case Attributes::MeasurementUnit::Id: { + case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id: { return YES; } - case Attributes::MeasurementMedium::Id: { + case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { return YES; } - case Attributes::LevelValue::Id: { + case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::GeneratedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::AcceptedCommandList::Id: { return YES; } case Attributes::AttributeList::Id: { @@ -3897,9 +2835,6 @@ static BOOL AttributeIsSpecifiedInWakeOnLANCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3933,9 +2868,6 @@ static BOOL AttributeIsSpecifiedInChannelCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3966,9 +2898,6 @@ static BOOL AttributeIsSpecifiedInTargetNavigatorCluster(AttributeId aAttributeI case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4014,9 +2943,6 @@ static BOOL AttributeIsSpecifiedInMediaPlaybackCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4047,9 +2973,6 @@ static BOOL AttributeIsSpecifiedInMediaInputCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4074,9 +2997,6 @@ static BOOL AttributeIsSpecifiedInLowPowerCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4101,9 +3021,6 @@ static BOOL AttributeIsSpecifiedInKeypadInputCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4134,9 +3051,6 @@ static BOOL AttributeIsSpecifiedInContentLauncherCluster(AttributeId aAttributeI case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4167,9 +3081,6 @@ static BOOL AttributeIsSpecifiedInAudioOutputCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4200,9 +3111,6 @@ static BOOL AttributeIsSpecifiedInApplicationLauncherCluster(AttributeId aAttrib case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4251,9 +3159,6 @@ static BOOL AttributeIsSpecifiedInApplicationBasicCluster(AttributeId aAttribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4278,9 +3183,6 @@ static BOOL AttributeIsSpecifiedInAccountLoginCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4689,9 +3591,6 @@ static BOOL AttributeIsSpecifiedInElectricalMeasurementCluster(AttributeId aAttr case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4962,9 +3861,6 @@ static BOOL AttributeIsSpecifiedInUnitTestingCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5091,27 +3987,6 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::ModeSelect::Id: { return AttributeIsSpecifiedInModeSelectCluster(aAttributeId); } - case Clusters::TemperatureControl::Id: { - return AttributeIsSpecifiedInTemperatureControlCluster(aAttributeId); - } - case Clusters::RefrigeratorAlarm::Id: { - return AttributeIsSpecifiedInRefrigeratorAlarmCluster(aAttributeId); - } - case Clusters::AirQuality::Id: { - return AttributeIsSpecifiedInAirQualityCluster(aAttributeId); - } - case Clusters::SmokeCoAlarm::Id: { - return AttributeIsSpecifiedInSmokeCOAlarmCluster(aAttributeId); - } - case Clusters::OperationalState::Id: { - return AttributeIsSpecifiedInOperationalStateCluster(aAttributeId); - } - case Clusters::HepaFilterMonitoring::Id: { - return AttributeIsSpecifiedInHEPAFilterMonitoringCluster(aAttributeId); - } - case Clusters::ActivatedCarbonFilterMonitoring::Id: { - return AttributeIsSpecifiedInActivatedCarbonFilterMonitoringCluster(aAttributeId); - } case Clusters::DoorLock::Id: { return AttributeIsSpecifiedInDoorLockCluster(aAttributeId); } @@ -5157,36 +4032,6 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::OccupancySensing::Id: { return AttributeIsSpecifiedInOccupancySensingCluster(aAttributeId); } - case Clusters::CarbonMonoxideConcentrationMeasurement::Id: { - return AttributeIsSpecifiedInCarbonMonoxideConcentrationMeasurementCluster(aAttributeId); - } - case Clusters::CarbonDioxideConcentrationMeasurement::Id: { - return AttributeIsSpecifiedInCarbonDioxideConcentrationMeasurementCluster(aAttributeId); - } - case Clusters::NitrogenDioxideConcentrationMeasurement::Id: { - return AttributeIsSpecifiedInNitrogenDioxideConcentrationMeasurementCluster(aAttributeId); - } - case Clusters::OzoneConcentrationMeasurement::Id: { - return AttributeIsSpecifiedInOzoneConcentrationMeasurementCluster(aAttributeId); - } - case Clusters::Pm25ConcentrationMeasurement::Id: { - return AttributeIsSpecifiedInPM25ConcentrationMeasurementCluster(aAttributeId); - } - case Clusters::FormaldehydeConcentrationMeasurement::Id: { - return AttributeIsSpecifiedInFormaldehydeConcentrationMeasurementCluster(aAttributeId); - } - case Clusters::Pm1ConcentrationMeasurement::Id: { - return AttributeIsSpecifiedInPM1ConcentrationMeasurementCluster(aAttributeId); - } - case Clusters::Pm10ConcentrationMeasurement::Id: { - return AttributeIsSpecifiedInPM10ConcentrationMeasurementCluster(aAttributeId); - } - case Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id: { - return AttributeIsSpecifiedInTotalVolatileOrganicCompoundsConcentrationMeasurementCluster(aAttributeId); - } - case Clusters::RadonConcentrationMeasurement::Id: { - return AttributeIsSpecifiedInRadonConcentrationMeasurementCluster(aAttributeId); - } case Clusters::WakeOnLan::Id: { return AttributeIsSpecifiedInWakeOnLANCluster(aAttributeId); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index abe0229ec96592..3957568c1dc375 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -109,32 +109,6 @@ static id _Nullable DecodeAttributeValueForIdentifyCluster(AttributeId aAttribut } 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; @@ -258,32 +232,6 @@ static id _Nullable DecodeAttributeValueForGroupsCluster(AttributeId aAttributeI } 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; @@ -414,28 +362,6 @@ static id _Nullable DecodeAttributeValueForScenesCluster(AttributeId aAttributeI } return value; } - case Attributes::SceneTableSize::Id: { - using TypeInfo = Attributes::SceneTableSize::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RemainingCapacity::Id: { - using TypeInfo = Attributes::RemainingCapacity::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; @@ -488,32 +414,6 @@ static id _Nullable DecodeAttributeValueForScenesCluster(AttributeId aAttributeI } 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; @@ -685,32 +585,6 @@ static id _Nullable DecodeAttributeValueForOnOffCluster(AttributeId aAttributeId } 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; @@ -846,32 +720,6 @@ static id _Nullable DecodeAttributeValueForOnOffSwitchConfigurationCluster( } 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; @@ -1163,32 +1011,6 @@ static id _Nullable DecodeAttributeValueForLevelControlCluster( } 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; @@ -1416,32 +1238,6 @@ static id _Nullable DecodeAttributeValueForBinaryInputBasicCluster( } 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; @@ -1661,32 +1457,6 @@ static id _Nullable DecodeAttributeValueForDescriptorCluster( } 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; @@ -1846,32 +1616,6 @@ static id _Nullable DecodeAttributeValueForBindingCluster(AttributeId aAttribute } 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; @@ -2130,8 +1874,8 @@ static id _Nullable DecodeAttributeValueForAccessControlCluster( } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -2156,34 +1900,8 @@ static id _Nullable DecodeAttributeValueForAccessControlCluster( } 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; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -2371,32 +2089,6 @@ static id _Nullable DecodeAttributeValueForActionsCluster(AttributeId aAttribute } 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; @@ -2809,32 +2501,6 @@ static id _Nullable DecodeAttributeValueForBasicInformationCluster( } 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; @@ -2948,32 +2614,6 @@ static id _Nullable DecodeAttributeValueForOTASoftwareUpdateProviderCluster( } 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; @@ -3153,32 +2793,6 @@ static id _Nullable DecodeAttributeValueForOTASoftwareUpdateRequestorCluster( } 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; @@ -3339,32 +2953,6 @@ static id _Nullable DecodeAttributeValueForLocalizationConfigurationCluster( } 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; @@ -3526,32 +3114,6 @@ static id _Nullable DecodeAttributeValueForTimeFormatLocalizationCluster( } 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; @@ -3676,32 +3238,6 @@ static id _Nullable DecodeAttributeValueForUnitLocalizationCluster( } 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; @@ -3841,32 +3377,6 @@ static id _Nullable DecodeAttributeValueForPowerSourceConfigurationCluster( } 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; @@ -4418,32 +3928,6 @@ static id _Nullable DecodeAttributeValueForPowerSourceCluster( } 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; @@ -4614,32 +4098,6 @@ static id _Nullable DecodeAttributeValueForGeneralCommissioningCluster( } 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; @@ -4870,8 +4328,8 @@ static id _Nullable DecodeAttributeValueForNetworkCommissioningCluster( } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -4896,34 +4354,8 @@ static id _Nullable DecodeAttributeValueForNetworkCommissioningCluster( } 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; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -5009,32 +4441,6 @@ static id _Nullable DecodeAttributeValueForDiagnosticLogsCluster( } 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; @@ -5360,32 +4766,6 @@ static id _Nullable DecodeAttributeValueForGeneralDiagnosticsCluster( } 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; @@ -5584,32 +4964,6 @@ static id _Nullable DecodeAttributeValueForSoftwareDiagnosticsCluster( } 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; @@ -6580,32 +5934,6 @@ static id _Nullable DecodeAttributeValueForThreadNetworkDiagnosticsCluster( } 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; @@ -6914,32 +6242,6 @@ static id _Nullable DecodeAttributeValueForWiFiNetworkDiagnosticsCluster( } 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; @@ -7164,32 +6466,6 @@ static id _Nullable DecodeAttributeValueForEthernetNetworkDiagnosticsCluster( } 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; @@ -7540,32 +6816,6 @@ static id _Nullable DecodeAttributeValueForBridgedDeviceBasicInformationCluster( } 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; @@ -7711,32 +6961,6 @@ static id _Nullable DecodeAttributeValueForSwitchCluster(AttributeId aAttributeI } 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; @@ -7891,32 +7115,6 @@ static id _Nullable DecodeAttributeValueForAdministratorCommissioningCluster( } 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; @@ -8159,8 +7357,8 @@ static id _Nullable DecodeAttributeValueForOperationalCredentialsCluster( } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8185,34 +7383,8 @@ static id _Nullable DecodeAttributeValueForOperationalCredentialsCluster( } 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; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8403,32 +7575,6 @@ static id _Nullable DecodeAttributeValueForGroupKeyManagementCluster( } 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; @@ -8580,32 +7726,6 @@ static id _Nullable DecodeAttributeValueForFixedLabelCluster( } 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; @@ -8756,32 +7876,6 @@ static id _Nullable DecodeAttributeValueForUserLabelCluster(AttributeId aAttribu } 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; @@ -8906,32 +8000,6 @@ static id _Nullable DecodeAttributeValueForBooleanStateCluster( } 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; @@ -9168,32 +8236,6 @@ static id _Nullable DecodeAttributeValueForModeSelectCluster( } 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; @@ -9250,375 +8292,256 @@ static id _Nullable DecodeAttributeValueForModeSelectCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForTemperatureControlCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::TemperatureControl; + using namespace Clusters::DoorLock; switch (aAttributeId) { - case Attributes::TemperatureSetpoint::Id: { - using TypeInfo = Attributes::TemperatureSetpoint::TypeInfo; + case Attributes::LockState::Id: { + using TypeInfo = Attributes::LockState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + } return value; } - case Attributes::MinTemperature::Id: { - using TypeInfo = Attributes::MinTemperature::TypeInfo; + case Attributes::LockType::Id: { + using TypeInfo = Attributes::LockType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::MaxTemperature::Id: { - using TypeInfo = Attributes::MaxTemperature::TypeInfo; + case Attributes::ActuatorEnabled::Id: { + using TypeInfo = Attributes::ActuatorEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::Step::Id: { - using TypeInfo = Attributes::Step::TypeInfo; + case Attributes::DoorState::Id: { + using TypeInfo = Attributes::DoorState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + } return value; } - case Attributes::SelectedTemperatureLevel::Id: { - using TypeInfo = Attributes::SelectedTemperatureLevel::TypeInfo; + case Attributes::DoorOpenEvents::Id: { + using TypeInfo = Attributes::DoorOpenEvents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::SupportedTemperatureLevels::Id: { - using TypeInfo = Attributes::SupportedTemperatureLevels::TypeInfo; + case Attributes::DoorClosedEvents::Id: { + using TypeInfo = Attributes::DoorClosedEvents::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::OpenPeriod::Id: { + using TypeInfo = Attributes::OpenPeriod::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::NumberOfTotalUsersSupported::Id: { + using TypeInfo = Attributes::NumberOfTotalUsersSupported::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; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::NumberOfPINUsersSupported::Id: { + using TypeInfo = Attributes::NumberOfPINUsersSupported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::NumberOfRFIDUsersSupported::Id: { + using TypeInfo = Attributes::NumberOfRFIDUsersSupported::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id: { + using TypeInfo = Attributes::NumberOfWeekDaySchedulesSupportedPerUser::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id: { + using TypeInfo = Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::NumberOfHolidaySchedulesSupported::Id: { + using TypeInfo = Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForRefrigeratorAlarmCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::RefrigeratorAlarm; - switch (aAttributeId) { - case Attributes::Mask::Id: { - using TypeInfo = Attributes::Mask::TypeInfo; + case Attributes::MaxPINCodeLength::Id: { + using TypeInfo = Attributes::MaxPINCodeLength::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::State::Id: { - using TypeInfo = Attributes::State::TypeInfo; + case Attributes::MinPINCodeLength::Id: { + using TypeInfo = Attributes::MinPINCodeLength::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::Supported::Id: { - using TypeInfo = Attributes::Supported::TypeInfo; + case Attributes::MaxRFIDCodeLength::Id: { + using TypeInfo = Attributes::MaxRFIDCodeLength::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::MinRFIDCodeLength::Id: { + using TypeInfo = Attributes::MinRFIDCodeLength::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::CredentialRulesSupport::Id: { + using TypeInfo = Attributes::CredentialRulesSupport::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; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::NumberOfCredentialsSupportedPerUser::Id: { + using TypeInfo = Attributes::NumberOfCredentialsSupportedPerUser::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::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::Language::Id: { + using TypeInfo = Attributes::Language::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; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::LEDSettings::Id: { + using TypeInfo = Attributes::LEDSettings::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::AutoRelockTime::Id: { + using TypeInfo = Attributes::AutoRelockTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -9628,32 +8551,19 @@ static id _Nullable DecodeAttributeValueForRefrigeratorAlarmCluster( value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::SoundVolume::Id: { + using TypeInfo = Attributes::SoundVolume::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForAirQualityCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::AirQuality; - switch (aAttributeId) { - case Attributes::AirQuality::Id: { - using TypeInfo = Attributes::AirQuality::TypeInfo; + case Attributes::OperatingMode::Id: { + using TypeInfo = Attributes::OperatingMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -9663,202 +8573,52 @@ static id _Nullable DecodeAttributeValueForAirQualityCluster( value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::SupportedOperatingModes::Id: { + using TypeInfo = Attributes::SupportedOperatingModes::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::DefaultConfigurationRegister::Id: { + using TypeInfo = Attributes::DefaultConfigurationRegister::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; 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 DecodeAttributeValueForSmokeCOAlarmCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::SmokeCoAlarm; - switch (aAttributeId) { - case Attributes::ExpressedState::Id: { - using TypeInfo = Attributes::ExpressedState::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::SmokeState::Id: { - using TypeInfo = Attributes::SmokeState::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::COState::Id: { - using TypeInfo = Attributes::COState::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::BatteryAlert::Id: { - using TypeInfo = Attributes::BatteryAlert::TypeInfo; + case Attributes::EnableLocalProgramming::Id: { + using TypeInfo = Attributes::EnableLocalProgramming::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::DeviceMuted::Id: { - using TypeInfo = Attributes::DeviceMuted::TypeInfo; + case Attributes::EnableOneTouchLocking::Id: { + using TypeInfo = Attributes::EnableOneTouchLocking::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::TestInProgress::Id: { - using TypeInfo = Attributes::TestInProgress::TypeInfo; + case Attributes::EnableInsideStatusLED::Id: { + using TypeInfo = Attributes::EnableInsideStatusLED::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -9868,8 +8628,8 @@ static id _Nullable DecodeAttributeValueForSmokeCOAlarmCluster( value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::HardwareFaultAlert::Id: { - using TypeInfo = Attributes::HardwareFaultAlert::TypeInfo; + case Attributes::EnablePrivacyModeButton::Id: { + using TypeInfo = Attributes::EnablePrivacyModeButton::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -9879,70 +8639,70 @@ static id _Nullable DecodeAttributeValueForSmokeCOAlarmCluster( value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::EndOfServiceAlert::Id: { - using TypeInfo = Attributes::EndOfServiceAlert::TypeInfo; + case Attributes::LocalProgrammingFeatures::Id: { + using TypeInfo = Attributes::LocalProgrammingFeatures::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } - case Attributes::InterconnectSmokeAlarm::Id: { - using TypeInfo = Attributes::InterconnectSmokeAlarm::TypeInfo; + case Attributes::WrongCodeEntryLimit::Id: { + using TypeInfo = Attributes::WrongCodeEntryLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::InterconnectCOAlarm::Id: { - using TypeInfo = Attributes::InterconnectCOAlarm::TypeInfo; + case Attributes::UserCodeTemporaryDisableTime::Id: { + using TypeInfo = Attributes::UserCodeTemporaryDisableTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ContaminationState::Id: { - using TypeInfo = Attributes::ContaminationState::TypeInfo; + case Attributes::SendPINOverTheAir::Id: { + using TypeInfo = Attributes::SendPINOverTheAir::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::SensitivityLevel::Id: { - using TypeInfo = Attributes::SensitivityLevel::TypeInfo; + case Attributes::RequirePINforRemoteOperation::Id: { + using TypeInfo = Attributes::RequirePINforRemoteOperation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::ExpiryDate::Id: { - using TypeInfo = Attributes::ExpiryDate::TypeInfo; + case Attributes::ExpiringUserTimeout::Id: { + using TypeInfo = Attributes::ExpiringUserTimeout::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } case Attributes::GeneratedCommandList::Id: { @@ -9997,32 +8757,6 @@ static id _Nullable DecodeAttributeValueForSmokeCOAlarmCluster( } 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; @@ -10079,48 +8813,46 @@ static id _Nullable DecodeAttributeValueForSmokeCOAlarmCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForOperationalStateCluster( +static id _Nullable DecodeAttributeValueForWindowCoveringCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::OperationalState; + using namespace Clusters::WindowCovering; switch (aAttributeId) { - case Attributes::PhaseList::Id: { - using TypeInfo = Attributes::PhaseList::TypeInfo; + case Attributes::Type::Id: { + using TypeInfo = Attributes::Type::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - auto iter_1 = cppValue.Value().begin(); - while (iter_1.Next()) { - auto & entry_1 = iter_1.GetValue(); - NSString * newElement_1; - newElement_1 = AsString(entry_1); - if (newElement_1 == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - [array_1 addObject:newElement_1]; - } - CHIP_ERROR err = iter_1.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_1; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::PhysicalClosedLimitLift::Id: { + using TypeInfo = Attributes::PhysicalClosedLimitLift::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::PhysicalClosedLimitTilt::Id: { + using TypeInfo = Attributes::PhysicalClosedLimitTilt::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::CurrentPhase::Id: { - using TypeInfo = Attributes::CurrentPhase::TypeInfo; + case Attributes::CurrentPositionLift::Id: { + using TypeInfo = Attributes::CurrentPositionLift::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10130,12 +8862,12 @@ static id _Nullable DecodeAttributeValueForOperationalStateCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::CountdownTime::Id: { - using TypeInfo = Attributes::CountdownTime::TypeInfo; + case Attributes::CurrentPositionTilt::Id: { + using TypeInfo = Attributes::CurrentPositionTilt::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10145,218 +8877,157 @@ static id _Nullable DecodeAttributeValueForOperationalStateCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::OperationalStateList::Id: { - using TypeInfo = Attributes::OperationalStateList::TypeInfo; + case Attributes::NumberOfActuationsLift::Id: { + using TypeInfo = Attributes::NumberOfActuationsLift::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(); - MTROperationalStateClusterOperationalStateStruct * newElement_0; - newElement_0 = [MTROperationalStateClusterOperationalStateStruct new]; - newElement_0.operationalStateID = [NSNumber numberWithUnsignedChar:entry_0.operationalStateID]; - if (entry_0.operationalStateLabel.HasValue()) { - newElement_0.operationalStateLabel = AsString(entry_0.operationalStateLabel.Value()); - if (newElement_0.operationalStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - newElement_0.operationalStateLabel = nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::OperationalState::Id: { - using TypeInfo = Attributes::OperationalState::TypeInfo; + case Attributes::NumberOfActuationsTilt::Id: { + using TypeInfo = Attributes::NumberOfActuationsTilt::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - MTROperationalStateClusterOperationalStateStruct * _Nonnull value; - value = [MTROperationalStateClusterOperationalStateStruct new]; - value.operationalStateID = [NSNumber numberWithUnsignedChar:cppValue.operationalStateID]; - if (cppValue.operationalStateLabel.HasValue()) { - value.operationalStateLabel = AsString(cppValue.operationalStateLabel.Value()); - if (value.operationalStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - value.operationalStateLabel = nil; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::ConfigStatus::Id: { + using TypeInfo = Attributes::ConfigStatus::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } - case Attributes::OperationalError::Id: { - using TypeInfo = Attributes::OperationalError::TypeInfo; + case Attributes::CurrentPositionLiftPercentage::Id: { + using TypeInfo = Attributes::CurrentPositionLiftPercentage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - MTROperationalStateClusterErrorStateStruct * _Nonnull value; - value = [MTROperationalStateClusterErrorStateStruct new]; - value.errorStateID = [NSNumber numberWithUnsignedChar:cppValue.errorStateID]; - if (cppValue.errorStateLabel.HasValue()) { - value.errorStateLabel = AsString(cppValue.errorStateLabel.Value()); - if (value.errorStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; } else { - value.errorStateLabel = nil; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } - if (cppValue.errorStateDetails.HasValue()) { - value.errorStateDetails = AsString(cppValue.errorStateDetails.Value()); - if (value.errorStateDetails == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } + return value; + } + case Attributes::CurrentPositionTiltPercentage::Id: { + using TypeInfo = Attributes::CurrentPositionTiltPercentage::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.errorStateDetails = nil; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::OperationalStatus::Id: { + using TypeInfo = Attributes::OperationalStatus::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::TargetPositionLiftPercent100ths::Id: { + using TypeInfo = Attributes::TargetPositionLiftPercent100ths::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; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::TargetPositionTiltPercent100ths::Id: { + using TypeInfo = Attributes::TargetPositionTiltPercent100ths::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; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::EndProductType::Id: { + using TypeInfo = Attributes::EndProductType::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; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::CurrentPositionLiftPercent100ths::Id: { + using TypeInfo = Attributes::CurrentPositionLiftPercent100ths::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::CurrentPositionTiltPercent100ths::Id: { + using TypeInfo = Attributes::CurrentPositionTiltPercent100ths::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::InstalledOpenLimitLift::Id: { + using TypeInfo = Attributes::InstalledOpenLimitLift::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10366,91 +9037,63 @@ static id _Nullable DecodeAttributeValueForOperationalStateCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForHEPAFilterMonitoringCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::HepaFilterMonitoring; - switch (aAttributeId) { - case Attributes::Condition::Id: { - using TypeInfo = Attributes::Condition::TypeInfo; + case Attributes::InstalledClosedLimitLift::Id: { + using TypeInfo = Attributes::InstalledClosedLimitLift::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::DegradationDirection::Id: { - using TypeInfo = Attributes::DegradationDirection::TypeInfo; + case Attributes::InstalledOpenLimitTilt::Id: { + using TypeInfo = Attributes::InstalledOpenLimitTilt::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ChangeIndication::Id: { - using TypeInfo = Attributes::ChangeIndication::TypeInfo; + case Attributes::InstalledClosedLimitTilt::Id: { + using TypeInfo = Attributes::InstalledClosedLimitTilt::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::InPlaceIndicator::Id: { - using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; + case Attributes::Mode::Id: { + using TypeInfo = Attributes::Mode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::SafetyStatus::Id: { + using TypeInfo = Attributes::SafetyStatus::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10475,8 +9118,8 @@ static id _Nullable DecodeAttributeValueForHEPAFilterMonitoringCluster( } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10557,13 +9200,13 @@ static id _Nullable DecodeAttributeValueForHEPAFilterMonitoringCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluster( +static id _Nullable DecodeAttributeValueForBarrierControlCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::ActivatedCarbonFilterMonitoring; + using namespace Clusters::BarrierControl; switch (aAttributeId) { - case Attributes::Condition::Id: { - using TypeInfo = Attributes::Condition::TypeInfo; + case Attributes::BarrierMovingState::Id: { + using TypeInfo = Attributes::BarrierMovingState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10573,73 +9216,113 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::DegradationDirection::Id: { - using TypeInfo = Attributes::DegradationDirection::TypeInfo; + case Attributes::BarrierSafetyStatus::Id: { + using TypeInfo = Attributes::BarrierSafetyStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ChangeIndication::Id: { - using TypeInfo = Attributes::ChangeIndication::TypeInfo; + case Attributes::BarrierCapabilities::Id: { + using TypeInfo = Attributes::BarrierCapabilities::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::InPlaceIndicator::Id: { - using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; + case Attributes::BarrierOpenEvents::Id: { + using TypeInfo = Attributes::BarrierOpenEvents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::BarrierCloseEvents::Id: { + using TypeInfo = Attributes::BarrierCloseEvents::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; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::BarrierCommandOpenEvents::Id: { + using TypeInfo = Attributes::BarrierCommandOpenEvents::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::BarrierCommandCloseEvents::Id: { + using TypeInfo = Attributes::BarrierCommandCloseEvents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::BarrierOpenPeriod::Id: { + using TypeInfo = Attributes::BarrierOpenPeriod::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::BarrierClosePeriod::Id: { + using TypeInfo = Attributes::BarrierClosePeriod::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::BarrierPosition::Id: { + using TypeInfo = Attributes::BarrierPosition::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(); @@ -10658,8 +9341,8 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10740,12 +9423,13 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForPumpConfigurationAndControlCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::DoorLock; + using namespace Clusters::PumpConfigurationAndControl; switch (aAttributeId) { - case Attributes::LockState::Id: { - using TypeInfo = Attributes::LockState::TypeInfo; + case Attributes::MaxPressure::Id: { + using TypeInfo = Attributes::MaxPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10755,34 +9439,42 @@ static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttribut if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } - case Attributes::LockType::Id: { - using TypeInfo = Attributes::LockType::TypeInfo; + case Attributes::MaxSpeed::Id: { + using TypeInfo = Attributes::MaxSpeed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::ActuatorEnabled::Id: { - using TypeInfo = Attributes::ActuatorEnabled::TypeInfo; + case Attributes::MaxFlow::Id: { + using TypeInfo = Attributes::MaxFlow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::DoorState::Id: { - using TypeInfo = Attributes::DoorState::TypeInfo; + case Attributes::MinConstPressure::Id: { + using TypeInfo = Attributes::MinConstPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10792,226 +9484,255 @@ static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttribut if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } - case Attributes::DoorOpenEvents::Id: { - using TypeInfo = Attributes::DoorOpenEvents::TypeInfo; + case Attributes::MaxConstPressure::Id: { + using TypeInfo = Attributes::MaxConstPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } - case Attributes::DoorClosedEvents::Id: { - using TypeInfo = Attributes::DoorClosedEvents::TypeInfo; + case Attributes::MinCompPressure::Id: { + using TypeInfo = Attributes::MinCompPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } - case Attributes::OpenPeriod::Id: { - using TypeInfo = Attributes::OpenPeriod::TypeInfo; + case Attributes::MaxCompPressure::Id: { + using TypeInfo = Attributes::MaxCompPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } - case Attributes::NumberOfTotalUsersSupported::Id: { - using TypeInfo = Attributes::NumberOfTotalUsersSupported::TypeInfo; + case Attributes::MinConstSpeed::Id: { + using TypeInfo = Attributes::MinConstSpeed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::NumberOfPINUsersSupported::Id: { - using TypeInfo = Attributes::NumberOfPINUsersSupported::TypeInfo; + case Attributes::MaxConstSpeed::Id: { + using TypeInfo = Attributes::MaxConstSpeed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::NumberOfRFIDUsersSupported::Id: { - using TypeInfo = Attributes::NumberOfRFIDUsersSupported::TypeInfo; + case Attributes::MinConstFlow::Id: { + using TypeInfo = Attributes::MinConstFlow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id: { - using TypeInfo = Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + case Attributes::MaxConstFlow::Id: { + using TypeInfo = Attributes::MaxConstFlow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id: { - using TypeInfo = Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + case Attributes::MinConstTemp::Id: { + using TypeInfo = Attributes::MinConstTemp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } - case Attributes::NumberOfHolidaySchedulesSupported::Id: { - using TypeInfo = Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + case Attributes::MaxConstTemp::Id: { + using TypeInfo = Attributes::MaxConstTemp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } - case Attributes::MaxPINCodeLength::Id: { - using TypeInfo = Attributes::MaxPINCodeLength::TypeInfo; + case Attributes::PumpStatus::Id: { + using TypeInfo = Attributes::PumpStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::MinPINCodeLength::Id: { - using TypeInfo = Attributes::MinPINCodeLength::TypeInfo; + case Attributes::EffectiveOperationMode::Id: { + using TypeInfo = Attributes::EffectiveOperationMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::MaxRFIDCodeLength::Id: { - using TypeInfo = Attributes::MaxRFIDCodeLength::TypeInfo; + case Attributes::EffectiveControlMode::Id: { + using TypeInfo = Attributes::EffectiveControlMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::MinRFIDCodeLength::Id: { - using TypeInfo = Attributes::MinRFIDCodeLength::TypeInfo; + case Attributes::Capacity::Id: { + using TypeInfo = Attributes::Capacity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } - case Attributes::CredentialRulesSupport::Id: { - using TypeInfo = Attributes::CredentialRulesSupport::TypeInfo; + case Attributes::Speed::Id: { + using TypeInfo = Attributes::Speed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::NumberOfCredentialsSupportedPerUser::Id: { - using TypeInfo = Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + case Attributes::LifetimeRunningHours::Id: { + using TypeInfo = Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } return value; } - case Attributes::Language::Id: { - using TypeInfo = Attributes::Language::TypeInfo; + case Attributes::Power::Id: { + using TypeInfo = Attributes::Power::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::LEDSettings::Id: { - using TypeInfo = Attributes::LEDSettings::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 numberWithUnsignedInt:cppValue.Value()]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::AutoRelockTime::Id: { - using TypeInfo = Attributes::AutoRelockTime::TypeInfo; + case Attributes::LifetimeEnergyConsumed::Id: { + using TypeInfo = Attributes::LifetimeEnergyConsumed::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::SoundVolume::Id: { - using TypeInfo = Attributes::SoundVolume::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 numberWithUnsignedInt:cppValue.Value()]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::OperatingMode::Id: { - using TypeInfo = Attributes::OperatingMode::TypeInfo; + case Attributes::OperationMode::Id: { + using TypeInfo = Attributes::OperationMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11021,136 +9742,15 @@ static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttribut value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::SupportedOperatingModes::Id: { - using TypeInfo = Attributes::SupportedOperatingModes::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; - return value; - } - case Attributes::DefaultConfigurationRegister::Id: { - using TypeInfo = Attributes::DefaultConfigurationRegister::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; - return value; - } - case Attributes::EnableLocalProgramming::Id: { - using TypeInfo = Attributes::EnableLocalProgramming::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::EnableOneTouchLocking::Id: { - using TypeInfo = Attributes::EnableOneTouchLocking::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::EnableInsideStatusLED::Id: { - using TypeInfo = Attributes::EnableInsideStatusLED::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::EnablePrivacyModeButton::Id: { - using TypeInfo = Attributes::EnablePrivacyModeButton::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::LocalProgrammingFeatures::Id: { - using TypeInfo = Attributes::LocalProgrammingFeatures::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; - return value; - } - case Attributes::WrongCodeEntryLimit::Id: { - using TypeInfo = Attributes::WrongCodeEntryLimit::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::UserCodeTemporaryDisableTime::Id: { - using TypeInfo = Attributes::UserCodeTemporaryDisableTime::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::SendPINOverTheAir::Id: { - using TypeInfo = Attributes::SendPINOverTheAir::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::RequirePINforRemoteOperation::Id: { - using TypeInfo = Attributes::RequirePINforRemoteOperation::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::ExpiringUserTimeout::Id: { - using TypeInfo = Attributes::ExpiringUserTimeout::TypeInfo; + case Attributes::ControlMode::Id: { + using TypeInfo = Attributes::ControlMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::GeneratedCommandList::Id: { @@ -11205,32 +9805,6 @@ static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttribut } 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; @@ -11287,46 +9861,13 @@ static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttribut *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForWindowCoveringCluster( +static id _Nullable DecodeAttributeValueForThermostatCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::WindowCovering; + using namespace Clusters::Thermostat; switch (aAttributeId) { - case Attributes::Type::Id: { - using TypeInfo = Attributes::Type::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::PhysicalClosedLimitLift::Id: { - using TypeInfo = Attributes::PhysicalClosedLimitLift::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::PhysicalClosedLimitTilt::Id: { - using TypeInfo = Attributes::PhysicalClosedLimitTilt::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::CurrentPositionLift::Id: { - using TypeInfo = Attributes::CurrentPositionLift::TypeInfo; + case Attributes::LocalTemperature::Id: { + using TypeInfo = Attributes::LocalTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11336,12 +9877,12 @@ static id _Nullable DecodeAttributeValueForWindowCoveringCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } - case Attributes::CurrentPositionTilt::Id: { - using TypeInfo = Attributes::CurrentPositionTilt::TypeInfo; + case Attributes::OutdoorTemperature::Id: { + using TypeInfo = Attributes::OutdoorTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11351,362 +9892,265 @@ static id _Nullable DecodeAttributeValueForWindowCoveringCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } - case Attributes::NumberOfActuationsLift::Id: { - using TypeInfo = Attributes::NumberOfActuationsLift::TypeInfo; + case Attributes::Occupancy::Id: { + using TypeInfo = Attributes::Occupancy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::NumberOfActuationsTilt::Id: { - using TypeInfo = Attributes::NumberOfActuationsTilt::TypeInfo; + case Attributes::AbsMinHeatSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMinHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::ConfigStatus::Id: { - using TypeInfo = Attributes::ConfigStatus::TypeInfo; + case Attributes::AbsMaxHeatSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMaxHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::CurrentPositionLiftPercentage::Id: { - using TypeInfo = Attributes::CurrentPositionLiftPercentage::TypeInfo; + case Attributes::AbsMinCoolSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMinCoolSetpointLimit::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()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::CurrentPositionTiltPercentage::Id: { - using TypeInfo = Attributes::CurrentPositionTiltPercentage::TypeInfo; + case Attributes::AbsMaxCoolSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMaxCoolSetpointLimit::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()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::OperationalStatus::Id: { - using TypeInfo = Attributes::OperationalStatus::TypeInfo; + case Attributes::PICoolingDemand::Id: { + using TypeInfo = Attributes::PICoolingDemand::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::TargetPositionLiftPercent100ths::Id: { - using TypeInfo = Attributes::TargetPositionLiftPercent100ths::TypeInfo; + case Attributes::PIHeatingDemand::Id: { + using TypeInfo = Attributes::PIHeatingDemand::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::TargetPositionTiltPercent100ths::Id: { - using TypeInfo = Attributes::TargetPositionTiltPercent100ths::TypeInfo; + case Attributes::HVACSystemTypeConfiguration::Id: { + using TypeInfo = Attributes::HVACSystemTypeConfiguration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::EndProductType::Id: { - using TypeInfo = Attributes::EndProductType::TypeInfo; + case Attributes::LocalTemperatureCalibration::Id: { + using TypeInfo = Attributes::LocalTemperatureCalibration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithChar:cppValue]; return value; } - case Attributes::CurrentPositionLiftPercent100ths::Id: { - using TypeInfo = Attributes::CurrentPositionLiftPercent100ths::TypeInfo; + case Attributes::OccupiedCoolingSetpoint::Id: { + using TypeInfo = Attributes::OccupiedCoolingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::CurrentPositionTiltPercent100ths::Id: { - using TypeInfo = Attributes::CurrentPositionTiltPercent100ths::TypeInfo; + case Attributes::OccupiedHeatingSetpoint::Id: { + using TypeInfo = Attributes::OccupiedHeatingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::InstalledOpenLimitLift::Id: { - using TypeInfo = Attributes::InstalledOpenLimitLift::TypeInfo; + case Attributes::UnoccupiedCoolingSetpoint::Id: { + using TypeInfo = Attributes::UnoccupiedCoolingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::InstalledClosedLimitLift::Id: { - using TypeInfo = Attributes::InstalledClosedLimitLift::TypeInfo; + case Attributes::UnoccupiedHeatingSetpoint::Id: { + using TypeInfo = Attributes::UnoccupiedHeatingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::InstalledOpenLimitTilt::Id: { - using TypeInfo = Attributes::InstalledOpenLimitTilt::TypeInfo; + case Attributes::MinHeatSetpointLimit::Id: { + using TypeInfo = Attributes::MinHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::InstalledClosedLimitTilt::Id: { - using TypeInfo = Attributes::InstalledClosedLimitTilt::TypeInfo; + case Attributes::MaxHeatSetpointLimit::Id: { + using TypeInfo = Attributes::MaxHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::Mode::Id: { - using TypeInfo = Attributes::Mode::TypeInfo; + case Attributes::MinCoolSetpointLimit::Id: { + using TypeInfo = Attributes::MinCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::SafetyStatus::Id: { - using TypeInfo = Attributes::SafetyStatus::TypeInfo; + case Attributes::MaxCoolSetpointLimit::Id: { + using TypeInfo = Attributes::MaxCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::MinSetpointDeadBand::Id: { + using TypeInfo = Attributes::MinSetpointDeadBand::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::RemoteSensing::Id: { + using TypeInfo = Attributes::RemoteSensing::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::ControlSequenceOfOperation::Id: { + using TypeInfo = Attributes::ControlSequenceOfOperation::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::SystemMode::Id: { + using TypeInfo = Attributes::SystemMode::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::ThermostatRunningMode::Id: { + using TypeInfo = Attributes::ThermostatRunningMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::StartOfWeek::Id: { + using TypeInfo = Attributes::StartOfWeek::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForBarrierControlCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::BarrierControl; - switch (aAttributeId) { - case Attributes::BarrierMovingState::Id: { - using TypeInfo = Attributes::BarrierMovingState::TypeInfo; + case Attributes::NumberOfWeeklyTransitions::Id: { + using TypeInfo = Attributes::NumberOfWeeklyTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11716,19 +10160,19 @@ static id _Nullable DecodeAttributeValueForBarrierControlCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::BarrierSafetyStatus::Id: { - using TypeInfo = Attributes::BarrierSafetyStatus::TypeInfo; + case Attributes::NumberOfDailyTransitions::Id: { + using TypeInfo = Attributes::NumberOfDailyTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::BarrierCapabilities::Id: { - using TypeInfo = Attributes::BarrierCapabilities::TypeInfo; + case Attributes::TemperatureSetpointHold::Id: { + using TypeInfo = Attributes::TemperatureSetpointHold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11738,63 +10182,34 @@ static id _Nullable DecodeAttributeValueForBarrierControlCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::BarrierOpenEvents::Id: { - using TypeInfo = Attributes::BarrierOpenEvents::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::BarrierCloseEvents::Id: { - using TypeInfo = Attributes::BarrierCloseEvents::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::BarrierCommandOpenEvents::Id: { - using TypeInfo = Attributes::BarrierCommandOpenEvents::TypeInfo; + case Attributes::TemperatureSetpointHoldDuration::Id: { + using TypeInfo = Attributes::TemperatureSetpointHoldDuration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::BarrierCommandCloseEvents::Id: { - using TypeInfo = Attributes::BarrierCommandCloseEvents::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::BarrierOpenPeriod::Id: { - using TypeInfo = Attributes::BarrierOpenPeriod::TypeInfo; + case Attributes::ThermostatProgrammingOperationMode::Id: { + using TypeInfo = Attributes::ThermostatProgrammingOperationMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::BarrierClosePeriod::Id: { - using TypeInfo = Attributes::BarrierClosePeriod::TypeInfo; + case Attributes::ThermostatRunningState::Id: { + using TypeInfo = Attributes::ThermostatRunningState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11804,8 +10219,8 @@ static id _Nullable DecodeAttributeValueForBarrierControlCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::BarrierPosition::Id: { - using TypeInfo = Attributes::BarrierPosition::TypeInfo; + case Attributes::SetpointChangeSource::Id: { + using TypeInfo = Attributes::SetpointChangeSource::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11815,147 +10230,8 @@ static id _Nullable DecodeAttributeValueForBarrierControlCluster( 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 DecodeAttributeValueForPumpConfigurationAndControlCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::PumpConfigurationAndControl; - switch (aAttributeId) { - case Attributes::MaxPressure::Id: { - using TypeInfo = Attributes::MaxPressure::TypeInfo; + case Attributes::SetpointChangeAmount::Id: { + using TypeInfo = Attributes::SetpointChangeAmount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11969,53 +10245,19 @@ static id _Nullable DecodeAttributeValueForPumpConfigurationAndControlCluster( } return value; } - case Attributes::MaxSpeed::Id: { - using TypeInfo = Attributes::MaxSpeed::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxFlow::Id: { - using TypeInfo = Attributes::MaxFlow::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MinConstPressure::Id: { - using TypeInfo = Attributes::MinConstPressure::TypeInfo; + case Attributes::SetpointChangeSourceTimestamp::Id: { + using TypeInfo = Attributes::SetpointChangeSourceTimestamp::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 numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::MaxConstPressure::Id: { - using TypeInfo = Attributes::MaxConstPressure::TypeInfo; + case Attributes::OccupiedSetback::Id: { + using TypeInfo = Attributes::OccupiedSetback::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -12025,12 +10267,12 @@ static id _Nullable DecodeAttributeValueForPumpConfigurationAndControlCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::MinCompPressure::Id: { - using TypeInfo = Attributes::MinCompPressure::TypeInfo; + case Attributes::OccupiedSetbackMin::Id: { + using TypeInfo = Attributes::OccupiedSetbackMin::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -12040,3754 +10282,83 @@ static id _Nullable DecodeAttributeValueForPumpConfigurationAndControlCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::MaxCompPressure::Id: { - using TypeInfo = Attributes::MaxCompPressure::TypeInfo; + case Attributes::OccupiedSetbackMax::Id: { + using TypeInfo = Attributes::OccupiedSetbackMax::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::MinConstSpeed::Id: { - using TypeInfo = Attributes::MinConstSpeed::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxConstSpeed::Id: { - using TypeInfo = Attributes::MaxConstSpeed::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MinConstFlow::Id: { - using TypeInfo = Attributes::MinConstFlow::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxConstFlow::Id: { - using TypeInfo = Attributes::MaxConstFlow::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MinConstTemp::Id: { - using TypeInfo = Attributes::MinConstTemp::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxConstTemp::Id: { - using TypeInfo = Attributes::MaxConstTemp::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::PumpStatus::Id: { - using TypeInfo = Attributes::PumpStatus::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; - return value; - } - case Attributes::EffectiveOperationMode::Id: { - using TypeInfo = Attributes::EffectiveOperationMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::EffectiveControlMode::Id: { - using TypeInfo = Attributes::EffectiveControlMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::Capacity::Id: { - using TypeInfo = Attributes::Capacity::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::Speed::Id: { - using TypeInfo = Attributes::Speed::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::LifetimeRunningHours::Id: { - using TypeInfo = Attributes::LifetimeRunningHours::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 numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::Power::Id: { - using TypeInfo = Attributes::Power::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 numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::LifetimeEnergyConsumed::Id: { - using TypeInfo = Attributes::LifetimeEnergyConsumed::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 numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::OperationMode::Id: { - using TypeInfo = Attributes::OperationMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::ControlMode::Id: { - using TypeInfo = Attributes::ControlMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::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 DecodeAttributeValueForThermostatCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Thermostat; - switch (aAttributeId) { - case Attributes::LocalTemperature::Id: { - using TypeInfo = Attributes::LocalTemperature::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::OutdoorTemperature::Id: { - using TypeInfo = Attributes::OutdoorTemperature::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::Occupancy::Id: { - using TypeInfo = Attributes::Occupancy::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::AbsMinHeatSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMinHeatSetpointLimit::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::AbsMaxHeatSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::AbsMinCoolSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMinCoolSetpointLimit::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::AbsMaxCoolSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::PICoolingDemand::Id: { - using TypeInfo = Attributes::PICoolingDemand::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::PIHeatingDemand::Id: { - using TypeInfo = Attributes::PIHeatingDemand::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::HVACSystemTypeConfiguration::Id: { - using TypeInfo = Attributes::HVACSystemTypeConfiguration::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::LocalTemperatureCalibration::Id: { - using TypeInfo = Attributes::LocalTemperatureCalibration::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; - return value; - } - case Attributes::OccupiedCoolingSetpoint::Id: { - using TypeInfo = Attributes::OccupiedCoolingSetpoint::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::OccupiedHeatingSetpoint::Id: { - using TypeInfo = Attributes::OccupiedHeatingSetpoint::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::UnoccupiedCoolingSetpoint::Id: { - using TypeInfo = Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::UnoccupiedHeatingSetpoint::Id: { - using TypeInfo = Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::MinHeatSetpointLimit::Id: { - using TypeInfo = Attributes::MinHeatSetpointLimit::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::MaxHeatSetpointLimit::Id: { - using TypeInfo = Attributes::MaxHeatSetpointLimit::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::MinCoolSetpointLimit::Id: { - using TypeInfo = Attributes::MinCoolSetpointLimit::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::MaxCoolSetpointLimit::Id: { - using TypeInfo = Attributes::MaxCoolSetpointLimit::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::MinSetpointDeadBand::Id: { - using TypeInfo = Attributes::MinSetpointDeadBand::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; - return value; - } - case Attributes::RemoteSensing::Id: { - using TypeInfo = Attributes::RemoteSensing::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::ControlSequenceOfOperation::Id: { - using TypeInfo = Attributes::ControlSequenceOfOperation::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::SystemMode::Id: { - using TypeInfo = Attributes::SystemMode::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::ThermostatRunningMode::Id: { - using TypeInfo = Attributes::ThermostatRunningMode::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::StartOfWeek::Id: { - using TypeInfo = Attributes::StartOfWeek::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::NumberOfWeeklyTransitions::Id: { - using TypeInfo = Attributes::NumberOfWeeklyTransitions::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::NumberOfDailyTransitions::Id: { - using TypeInfo = Attributes::NumberOfDailyTransitions::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::TemperatureSetpointHold::Id: { - using TypeInfo = Attributes::TemperatureSetpointHold::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::TemperatureSetpointHoldDuration::Id: { - using TypeInfo = Attributes::TemperatureSetpointHoldDuration::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::ThermostatProgrammingOperationMode::Id: { - using TypeInfo = Attributes::ThermostatProgrammingOperationMode::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::ThermostatRunningState::Id: { - using TypeInfo = Attributes::ThermostatRunningState::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::SetpointChangeSource::Id: { - using TypeInfo = Attributes::SetpointChangeSource::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::SetpointChangeAmount::Id: { - using TypeInfo = Attributes::SetpointChangeAmount::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::SetpointChangeSourceTimestamp::Id: { - using TypeInfo = Attributes::SetpointChangeSourceTimestamp::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::OccupiedSetback::Id: { - using TypeInfo = Attributes::OccupiedSetback::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::OccupiedSetbackMin::Id: { - using TypeInfo = Attributes::OccupiedSetbackMin::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::OccupiedSetbackMax::Id: { - using TypeInfo = Attributes::OccupiedSetbackMax::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::UnoccupiedSetback::Id: { - using TypeInfo = Attributes::UnoccupiedSetback::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::UnoccupiedSetbackMin::Id: { - using TypeInfo = Attributes::UnoccupiedSetbackMin::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::UnoccupiedSetbackMax::Id: { - using TypeInfo = Attributes::UnoccupiedSetbackMax::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::EmergencyHeatDelta::Id: { - using TypeInfo = Attributes::EmergencyHeatDelta::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::ACType::Id: { - using TypeInfo = Attributes::ACType::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::ACCapacity::Id: { - using TypeInfo = Attributes::ACCapacity::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ACRefrigerantType::Id: { - using TypeInfo = Attributes::ACRefrigerantType::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::ACCompressorType::Id: { - using TypeInfo = Attributes::ACCompressorType::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::ACErrorCode::Id: { - using TypeInfo = Attributes::ACErrorCode::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::ACLouverPosition::Id: { - using TypeInfo = Attributes::ACLouverPosition::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::ACCoilTemperature::Id: { - using TypeInfo = Attributes::ACCoilTemperature::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::ACCapacityformat::Id: { - using TypeInfo = Attributes::ACCapacityformat::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 DecodeAttributeValueForFanControlCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::FanControl; - switch (aAttributeId) { - case Attributes::FanMode::Id: { - using TypeInfo = Attributes::FanMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::FanModeSequence::Id: { - using TypeInfo = Attributes::FanModeSequence::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::PercentSetting::Id: { - using TypeInfo = Attributes::PercentSetting::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::PercentCurrent::Id: { - using TypeInfo = Attributes::PercentCurrent::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::SpeedMax::Id: { - using TypeInfo = Attributes::SpeedMax::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::SpeedSetting::Id: { - using TypeInfo = Attributes::SpeedSetting::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::SpeedCurrent::Id: { - using TypeInfo = Attributes::SpeedCurrent::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::RockSupport::Id: { - using TypeInfo = Attributes::RockSupport::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; - return value; - } - case Attributes::RockSetting::Id: { - using TypeInfo = Attributes::RockSetting::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; - return value; - } - case Attributes::WindSupport::Id: { - using TypeInfo = Attributes::WindSupport::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; - return value; - } - case Attributes::WindSetting::Id: { - using TypeInfo = Attributes::WindSetting::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; - return value; - } - case Attributes::AirflowDirection::Id: { - using TypeInfo = Attributes::AirflowDirection::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::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 DecodeAttributeValueForThermostatUserInterfaceConfigurationCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::ThermostatUserInterfaceConfiguration; - switch (aAttributeId) { - case Attributes::TemperatureDisplayMode::Id: { - using TypeInfo = Attributes::TemperatureDisplayMode::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::KeypadLockout::Id: { - using TypeInfo = Attributes::KeypadLockout::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::ScheduleProgrammingVisibility::Id: { - using TypeInfo = Attributes::ScheduleProgrammingVisibility::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 DecodeAttributeValueForColorControlCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::ColorControl; - switch (aAttributeId) { - case Attributes::CurrentHue::Id: { - using TypeInfo = Attributes::CurrentHue::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::CurrentSaturation::Id: { - using TypeInfo = Attributes::CurrentSaturation::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::RemainingTime::Id: { - using TypeInfo = Attributes::RemainingTime::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::CurrentX::Id: { - using TypeInfo = Attributes::CurrentX::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::CurrentY::Id: { - using TypeInfo = Attributes::CurrentY::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::DriftCompensation::Id: { - using TypeInfo = Attributes::DriftCompensation::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::CompensationText::Id: { - using TypeInfo = Attributes::CompensationText::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::ColorTemperatureMireds::Id: { - using TypeInfo = Attributes::ColorTemperatureMireds::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorMode::Id: { - using TypeInfo = Attributes::ColorMode::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::Options::Id: { - using TypeInfo = Attributes::Options::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::NumberOfPrimaries::Id: { - using TypeInfo = Attributes::NumberOfPrimaries::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::Primary1X::Id: { - using TypeInfo = Attributes::Primary1X::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary1Y::Id: { - using TypeInfo = Attributes::Primary1Y::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary1Intensity::Id: { - using TypeInfo = Attributes::Primary1Intensity::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::Primary2X::Id: { - using TypeInfo = Attributes::Primary2X::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary2Y::Id: { - using TypeInfo = Attributes::Primary2Y::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary2Intensity::Id: { - using TypeInfo = Attributes::Primary2Intensity::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::Primary3X::Id: { - using TypeInfo = Attributes::Primary3X::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary3Y::Id: { - using TypeInfo = Attributes::Primary3Y::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary3Intensity::Id: { - using TypeInfo = Attributes::Primary3Intensity::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::Primary4X::Id: { - using TypeInfo = Attributes::Primary4X::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary4Y::Id: { - using TypeInfo = Attributes::Primary4Y::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary4Intensity::Id: { - using TypeInfo = Attributes::Primary4Intensity::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::Primary5X::Id: { - using TypeInfo = Attributes::Primary5X::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary5Y::Id: { - using TypeInfo = Attributes::Primary5Y::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary5Intensity::Id: { - using TypeInfo = Attributes::Primary5Intensity::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::Primary6X::Id: { - using TypeInfo = Attributes::Primary6X::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary6Y::Id: { - using TypeInfo = Attributes::Primary6Y::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary6Intensity::Id: { - using TypeInfo = Attributes::Primary6Intensity::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::WhitePointX::Id: { - using TypeInfo = Attributes::WhitePointX::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::WhitePointY::Id: { - using TypeInfo = Attributes::WhitePointY::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorPointRX::Id: { - using TypeInfo = Attributes::ColorPointRX::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorPointRY::Id: { - using TypeInfo = Attributes::ColorPointRY::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorPointRIntensity::Id: { - using TypeInfo = Attributes::ColorPointRIntensity::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::ColorPointGX::Id: { - using TypeInfo = Attributes::ColorPointGX::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorPointGY::Id: { - using TypeInfo = Attributes::ColorPointGY::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorPointGIntensity::Id: { - using TypeInfo = Attributes::ColorPointGIntensity::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::ColorPointBX::Id: { - using TypeInfo = Attributes::ColorPointBX::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorPointBY::Id: { - using TypeInfo = Attributes::ColorPointBY::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorPointBIntensity::Id: { - using TypeInfo = Attributes::ColorPointBIntensity::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::EnhancedCurrentHue::Id: { - using TypeInfo = Attributes::EnhancedCurrentHue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::EnhancedColorMode::Id: { - using TypeInfo = Attributes::EnhancedColorMode::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::ColorLoopActive::Id: { - using TypeInfo = Attributes::ColorLoopActive::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::ColorLoopDirection::Id: { - using TypeInfo = Attributes::ColorLoopDirection::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::ColorLoopTime::Id: { - using TypeInfo = Attributes::ColorLoopTime::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorLoopStartEnhancedHue::Id: { - using TypeInfo = Attributes::ColorLoopStartEnhancedHue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorLoopStoredEnhancedHue::Id: { - using TypeInfo = Attributes::ColorLoopStoredEnhancedHue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorCapabilities::Id: { - using TypeInfo = Attributes::ColorCapabilities::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorTempPhysicalMinMireds::Id: { - using TypeInfo = Attributes::ColorTempPhysicalMinMireds::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorTempPhysicalMaxMireds::Id: { - using TypeInfo = Attributes::ColorTempPhysicalMaxMireds::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::CoupleColorTempToLevelMinMireds::Id: { - using TypeInfo = Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::StartUpColorTemperatureMireds::Id: { - using TypeInfo = Attributes::StartUpColorTemperatureMireds::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForBallastConfigurationCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::BallastConfiguration; - switch (aAttributeId) { - case Attributes::PhysicalMinLevel::Id: { - using TypeInfo = Attributes::PhysicalMinLevel::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::PhysicalMaxLevel::Id: { - using TypeInfo = Attributes::PhysicalMaxLevel::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::BallastStatus::Id: { - using TypeInfo = Attributes::BallastStatus::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::MinLevel::Id: { - using TypeInfo = Attributes::MinLevel::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::MaxLevel::Id: { - using TypeInfo = Attributes::MaxLevel::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::IntrinsicBallastFactor::Id: { - using TypeInfo = Attributes::IntrinsicBallastFactor::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::BallastFactorAdjustment::Id: { - using TypeInfo = Attributes::BallastFactorAdjustment::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::LampQuantity::Id: { - using TypeInfo = Attributes::LampQuantity::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::LampType::Id: { - using TypeInfo = Attributes::LampType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::LampManufacturer::Id: { - using TypeInfo = Attributes::LampManufacturer::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::LampRatedHours::Id: { - using TypeInfo = Attributes::LampRatedHours::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 numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::LampBurnHours::Id: { - using TypeInfo = Attributes::LampBurnHours::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 numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::LampAlarmMode::Id: { - using TypeInfo = Attributes::LampAlarmMode::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::LampBurnHoursTripPoint::Id: { - using TypeInfo = Attributes::LampBurnHoursTripPoint::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 numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForIlluminanceMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::IlluminanceMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::LightSensorType::Id: { - using TypeInfo = Attributes::LightSensorType::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:chip::to_underlying(cppValue.Value())]; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForTemperatureMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::TemperatureMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::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 DecodeAttributeValueForPressureMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::PressureMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ScaledValue::Id: { - using TypeInfo = Attributes::ScaledValue::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::MinScaledValue::Id: { - using TypeInfo = Attributes::MinScaledValue::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxScaledValue::Id: { - using TypeInfo = Attributes::MaxScaledValue::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 numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::ScaledTolerance::Id: { - using TypeInfo = Attributes::ScaledTolerance::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Scale::Id: { - using TypeInfo = Attributes::Scale::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; - return value; - } - case Attributes::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 DecodeAttributeValueForFlowMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::FlowMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::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 DecodeAttributeValueForRelativeHumidityMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::RelativeHumidityMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::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 DecodeAttributeValueForOccupancySensingCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::OccupancySensing; - switch (aAttributeId) { - case Attributes::Occupancy::Id: { - using TypeInfo = Attributes::Occupancy::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()]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } - case Attributes::OccupancySensorType::Id: { - using TypeInfo = Attributes::OccupancySensorType::TypeInfo; + case Attributes::UnoccupiedSetback::Id: { + using TypeInfo = Attributes::UnoccupiedSetback::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::OccupancySensorTypeBitmap::Id: { - using TypeInfo = Attributes::OccupancySensorTypeBitmap::TypeInfo; + case Attributes::UnoccupiedSetbackMin::Id: { + using TypeInfo = Attributes::UnoccupiedSetbackMin::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::PIROccupiedToUnoccupiedDelay::Id: { - using TypeInfo = Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; + case Attributes::UnoccupiedSetbackMax::Id: { + using TypeInfo = Attributes::UnoccupiedSetbackMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::PIRUnoccupiedToOccupiedDelay::Id: { - using TypeInfo = Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; + case Attributes::EmergencyHeatDelta::Id: { + using TypeInfo = Attributes::EmergencyHeatDelta::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::PIRUnoccupiedToOccupiedThreshold::Id: { - using TypeInfo = Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; + case Attributes::ACType::Id: { + using TypeInfo = Attributes::ACType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15797,8 +10368,8 @@ static id _Nullable DecodeAttributeValueForOccupancySensingCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: { - using TypeInfo = Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + case Attributes::ACCapacity::Id: { + using TypeInfo = Attributes::ACCapacity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15808,19 +10379,19 @@ static id _Nullable DecodeAttributeValueForOccupancySensingCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id: { - using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + case Attributes::ACRefrigerantType::Id: { + using TypeInfo = Attributes::ACRefrigerantType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id: { - using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + case Attributes::ACCompressorType::Id: { + using TypeInfo = Attributes::ACCompressorType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15830,67 +10401,56 @@ static id _Nullable DecodeAttributeValueForOccupancySensingCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { - using TypeInfo = Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + case Attributes::ACErrorCode::Id: { + using TypeInfo = Attributes::ACErrorCode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id: { - using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + case Attributes::ACLouverPosition::Id: { + using TypeInfo = Attributes::ACLouverPosition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { - using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + case Attributes::ACCoilTemperature::Id: { + using TypeInfo = Attributes::ACCoilTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ACCapacityformat::Id: { + using TypeInfo = Attributes::ACCapacityformat::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15915,8 +10475,8 @@ static id _Nullable DecodeAttributeValueForOccupancySensingCluster( } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15997,28 +10557,35 @@ static id _Nullable DecodeAttributeValueForOccupancySensingCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForCarbonMonoxideConcentrationMeasurementCluster( +static id _Nullable DecodeAttributeValueForFanControlCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::CarbonMonoxideConcentrationMeasurement; + using namespace Clusters::FanControl; switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::FanMode::Id: { + using TypeInfo = Attributes::FanMode::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 numberWithFloat:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::FanModeSequence::Id: { + using TypeInfo = Attributes::FanModeSequence::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::PercentSetting::Id: { + using TypeInfo = Attributes::PercentSetting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16028,12 +10595,34 @@ static id _Nullable DecodeAttributeValueForCarbonMonoxideConcentrationMeasuremen if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::PercentCurrent::Id: { + using TypeInfo = Attributes::PercentCurrent::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::SpeedMax::Id: { + using TypeInfo = Attributes::SpeedMax::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::SpeedSetting::Id: { + using TypeInfo = Attributes::SpeedSetting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16043,53 +10632,145 @@ static id _Nullable DecodeAttributeValueForCarbonMonoxideConcentrationMeasuremen if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::SpeedCurrent::Id: { + using TypeInfo = Attributes::SpeedCurrent::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::RockSupport::Id: { + using TypeInfo = Attributes::RockSupport::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::RockSetting::Id: { + using TypeInfo = Attributes::RockSetting::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::WindSupport::Id: { + using TypeInfo = Attributes::WindSupport::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::WindSetting::Id: { + using TypeInfo = Attributes::WindSetting::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + 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::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } - return value; - } - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::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; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16099,48 +10780,61 @@ static id _Nullable DecodeAttributeValueForCarbonMonoxideConcentrationMeasuremen value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForThermostatUserInterfaceConfigurationCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ThermostatUserInterfaceConfiguration; + switch (aAttributeId) { + case Attributes::TemperatureDisplayMode::Id: { + using TypeInfo = Attributes::TemperatureDisplayMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::KeypadLockout::Id: { + using TypeInfo = Attributes::KeypadLockout::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::ScheduleProgrammingVisibility::Id: { + using TypeInfo = Attributes::ScheduleProgrammingVisibility::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } case Attributes::GeneratedCommandList::Id: { @@ -16195,32 +10889,6 @@ static id _Nullable DecodeAttributeValueForCarbonMonoxideConcentrationMeasuremen } 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; @@ -16277,269 +10945,228 @@ static id _Nullable DecodeAttributeValueForCarbonMonoxideConcentrationMeasuremen *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForCarbonDioxideConcentrationMeasurementCluster( +static id _Nullable DecodeAttributeValueForColorControlCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::CarbonDioxideConcentrationMeasurement; + using namespace Clusters::ColorControl; switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::CurrentHue::Id: { + using TypeInfo = Attributes::CurrentHue::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 numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::CurrentSaturation::Id: { + using TypeInfo = Attributes::CurrentSaturation::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 numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::RemainingTime::Id: { + using TypeInfo = Attributes::RemainingTime::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 numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::CurrentX::Id: { + using TypeInfo = Attributes::CurrentX::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 numberWithFloat:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::CurrentY::Id: { + using TypeInfo = Attributes::CurrentY::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::DriftCompensation::Id: { + using TypeInfo = Attributes::DriftCompensation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::CompensationText::Id: { + using TypeInfo = Attributes::CompensationText::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 numberWithFloat:cppValue.Value()]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::ColorTemperatureMireds::Id: { + using TypeInfo = Attributes::ColorTemperatureMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + case Attributes::ColorMode::Id: { + using TypeInfo = Attributes::ColorMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + case Attributes::Options::Id: { + using TypeInfo = Attributes::Options::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::NumberOfPrimaries::Id: { + using TypeInfo = Attributes::NumberOfPrimaries::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::Primary1X::Id: { + using TypeInfo = Attributes::Primary1X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::Primary1Y::Id: { + using TypeInfo = Attributes::Primary1Y::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::Primary1Intensity::Id: { + using TypeInfo = Attributes::Primary1Intensity::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; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::Primary2X::Id: { + using TypeInfo = Attributes::Primary2X::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; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::Primary2Y::Id: { + using TypeInfo = Attributes::Primary2Y::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::Primary2Intensity::Id: { + using TypeInfo = Attributes::Primary2Intensity::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; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::Primary3X::Id: { + using TypeInfo = Attributes::Primary3X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::Primary3Y::Id: { + using TypeInfo = Attributes::Primary3Y::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16549,21 +11176,8 @@ static id _Nullable DecodeAttributeValueForCarbonDioxideConcentrationMeasurement value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForNitrogenDioxideConcentrationMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::NitrogenDioxideConcentrationMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::Primary3Intensity::Id: { + using TypeInfo = Attributes::Primary3Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16573,27 +11187,34 @@ static id _Nullable DecodeAttributeValueForNitrogenDioxideConcentrationMeasureme if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::Primary4X::Id: { + using TypeInfo = Attributes::Primary4X::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 numberWithFloat:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::Primary4Y::Id: { + using TypeInfo = Attributes::Primary4Y::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::Primary4Intensity::Id: { + using TypeInfo = Attributes::Primary4Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16603,38 +11224,34 @@ static id _Nullable DecodeAttributeValueForNitrogenDioxideConcentrationMeasureme if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::Primary5X::Id: { + using TypeInfo = Attributes::Primary5X::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 numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::Primary5Y::Id: { + using TypeInfo = Attributes::Primary5Y::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::Primary5Intensity::Id: { + using TypeInfo = Attributes::Primary5Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16644,182 +11261,156 @@ static id _Nullable DecodeAttributeValueForNitrogenDioxideConcentrationMeasureme if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::Primary6X::Id: { + using TypeInfo = Attributes::Primary6X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + case Attributes::Primary6Y::Id: { + using TypeInfo = Attributes::Primary6Y::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + case Attributes::Primary6Intensity::Id: { + using TypeInfo = Attributes::Primary6Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::WhitePointX::Id: { + using TypeInfo = Attributes::WhitePointX::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::WhitePointY::Id: { + using TypeInfo = Attributes::WhitePointY::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ColorPointRX::Id: { + using TypeInfo = Attributes::ColorPointRX::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; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::ColorPointRY::Id: { + using TypeInfo = Attributes::ColorPointRY::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ColorPointRIntensity::Id: { + using TypeInfo = Attributes::ColorPointRIntensity::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; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::ColorPointGX::Id: { + using TypeInfo = Attributes::ColorPointGX::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::ColorPointGY::Id: { + using TypeInfo = Attributes::ColorPointGY::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; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::ColorPointGIntensity::Id: { + using TypeInfo = Attributes::ColorPointGIntensity::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::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::ColorPointBX::Id: { + using TypeInfo = Attributes::ColorPointBX::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::ColorPointBY::Id: { + using TypeInfo = Attributes::ColorPointBY::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16829,21 +11420,8 @@ static id _Nullable DecodeAttributeValueForNitrogenDioxideConcentrationMeasureme value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForOzoneConcentrationMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::OzoneConcentrationMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::ColorPointBIntensity::Id: { + using TypeInfo = Attributes::ColorPointBIntensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16853,164 +11431,148 @@ static id _Nullable DecodeAttributeValueForOzoneConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::EnhancedCurrentHue::Id: { + using TypeInfo = Attributes::EnhancedCurrentHue::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 numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::EnhancedColorMode::Id: { + using TypeInfo = Attributes::EnhancedColorMode::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 numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::ColorLoopActive::Id: { + using TypeInfo = Attributes::ColorLoopActive::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 numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::ColorLoopDirection::Id: { + using TypeInfo = Attributes::ColorLoopDirection::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::ColorLoopTime::Id: { + using TypeInfo = Attributes::ColorLoopTime::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 numberWithFloat:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::ColorLoopStartEnhancedHue::Id: { + using TypeInfo = Attributes::ColorLoopStartEnhancedHue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::ColorLoopStoredEnhancedHue::Id: { + using TypeInfo = Attributes::ColorLoopStoredEnhancedHue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + case Attributes::ColorCapabilities::Id: { + using TypeInfo = Attributes::ColorCapabilities::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + case Attributes::ColorTempPhysicalMinMireds::Id: { + using TypeInfo = Attributes::ColorTempPhysicalMinMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::ColorTempPhysicalMaxMireds::Id: { + using TypeInfo = Attributes::ColorTempPhysicalMaxMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::CoupleColorTempToLevelMinMireds::Id: { + using TypeInfo = Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::StartUpColorTemperatureMireds::Id: { + using TypeInfo = Attributes::StartUpColorTemperatureMireds::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; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17035,8 +11597,8 @@ static id _Nullable DecodeAttributeValueForOzoneConcentrationMeasurementCluster( } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17117,43 +11679,68 @@ static id _Nullable DecodeAttributeValueForOzoneConcentrationMeasurementCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForPM25ConcentrationMeasurementCluster( +static id _Nullable DecodeAttributeValueForBallastConfigurationCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::Pm25ConcentrationMeasurement; + using namespace Clusters::BallastConfiguration; switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::PhysicalMinLevel::Id: { + using TypeInfo = Attributes::PhysicalMinLevel::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 numberWithFloat:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::PhysicalMaxLevel::Id: { + using TypeInfo = Attributes::PhysicalMaxLevel::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::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::BallastStatus::Id: { + using TypeInfo = Attributes::BallastStatus::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 numberWithFloat:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::MinLevel::Id: { + using TypeInfo = Attributes::MinLevel::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::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::MaxLevel::Id: { + using TypeInfo = Attributes::MaxLevel::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::IntrinsicBallastFactor::Id: { + using TypeInfo = Attributes::IntrinsicBallastFactor::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17163,12 +11750,12 @@ static id _Nullable DecodeAttributeValueForPM25ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::BallastFactorAdjustment::Id: { + using TypeInfo = Attributes::BallastFactorAdjustment::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17178,119 +11765,111 @@ static id _Nullable DecodeAttributeValueForPM25ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::LampQuantity::Id: { + using TypeInfo = Attributes::LampQuantity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::LampType::Id: { + using TypeInfo = Attributes::LampType::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 numberWithFloat:cppValue.Value()]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::LampManufacturer::Id: { + using TypeInfo = Attributes::LampManufacturer::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::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; return value; } - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + case Attributes::LampRatedHours::Id: { + using TypeInfo = Attributes::LampRatedHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } return value; } - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::LampBurnHours::Id: { + using TypeInfo = Attributes::LampBurnHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } return value; } - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::LampAlarmMode::Id: { + using TypeInfo = Attributes::LampAlarmMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::LampBurnHoursTripPoint::Id: { + using TypeInfo = Attributes::LampBurnHoursTripPoint::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; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17315,8 +11894,8 @@ static id _Nullable DecodeAttributeValueForPM25ConcentrationMeasurementCluster( } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17397,10 +11976,10 @@ static id _Nullable DecodeAttributeValueForPM25ConcentrationMeasurementCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForFormaldehydeConcentrationMeasurementCluster( +static id _Nullable DecodeAttributeValueForIlluminanceMeasurementCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::FormaldehydeConcentrationMeasurement; + using namespace Clusters::IlluminanceMeasurement; switch (aAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; @@ -17413,7 +11992,7 @@ static id _Nullable DecodeAttributeValueForFormaldehydeConcentrationMeasurementC if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } @@ -17428,7 +12007,7 @@ static id _Nullable DecodeAttributeValueForFormaldehydeConcentrationMeasurementC if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } @@ -17443,38 +12022,23 @@ static id _Nullable DecodeAttributeValueForFormaldehydeConcentrationMeasurementC if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } - return value; - } - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::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 numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::LightSensorType::Id: { + using TypeInfo = Attributes::LightSensorType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17484,63 +12048,8 @@ static id _Nullable DecodeAttributeValueForFormaldehydeConcentrationMeasurementC if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } - return value; - } - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::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::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; - return value; - } - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::GeneratedCommandList::Id: { @@ -17595,32 +12104,6 @@ static id _Nullable DecodeAttributeValueForFormaldehydeConcentrationMeasurementC } 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; @@ -17677,10 +12160,10 @@ static id _Nullable DecodeAttributeValueForFormaldehydeConcentrationMeasurementC *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( +static id _Nullable DecodeAttributeValueForTemperatureMeasurementCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::Pm1ConcentrationMeasurement; + using namespace Clusters::TemperatureMeasurement; switch (aAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; @@ -17693,7 +12176,7 @@ static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } @@ -17708,7 +12191,7 @@ static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } @@ -17723,134 +12206,23 @@ static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } - return value; - } - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::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 numberWithFloat:cppValue.Value()]; - } - return value; - } - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::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::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::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 numberWithFloat:cppValue.Value()]; - } - return value; - } - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::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::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; - return value; - } - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + value = [NSNumber numberWithShort:cppValue.Value()]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::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; + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17875,8 +12247,8 @@ static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17957,10 +12329,10 @@ static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( +static id _Nullable DecodeAttributeValueForPressureMeasurementCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::Pm10ConcentrationMeasurement; + using namespace Clusters::PressureMeasurement; switch (aAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; @@ -17973,7 +12345,7 @@ static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } @@ -17988,7 +12360,7 @@ static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } @@ -18003,38 +12375,23 @@ static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } - return value; - } - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::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 numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::ScaledValue::Id: { + using TypeInfo = Attributes::ScaledValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18044,63 +12401,60 @@ static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::MinScaledValue::Id: { + using TypeInfo = Attributes::MinScaledValue::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::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::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 numberWithShort:cppValue.Value()]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; return value; } - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + case Attributes::MaxScaledValue::Id: { + using TypeInfo = Attributes::MaxScaledValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::ScaledTolerance::Id: { + using TypeInfo = Attributes::ScaledTolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::Scale::Id: { + using TypeInfo = Attributes::Scale::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithChar:cppValue]; return value; } case Attributes::GeneratedCommandList::Id: { @@ -18155,32 +12509,6 @@ static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( } 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; @@ -18237,10 +12565,10 @@ static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForTotalVolatileOrganicCompoundsConcentrationMeasurementCluster( +static id _Nullable DecodeAttributeValueForFlowMeasurementCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement; + using namespace Clusters::FlowMeasurement; switch (aAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; @@ -18253,7 +12581,7 @@ static id _Nullable DecodeAttributeValueForTotalVolatileOrganicCompoundsConcentr if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } @@ -18268,7 +12596,7 @@ static id _Nullable DecodeAttributeValueForTotalVolatileOrganicCompoundsConcentr if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } @@ -18283,53 +12611,101 @@ static id _Nullable DecodeAttributeValueForTotalVolatileOrganicCompoundsConcentr if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::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 numberWithFloat:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + 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::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18339,78 +12715,88 @@ static id _Nullable DecodeAttributeValueForTotalVolatileOrganicCompoundsConcentr value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForRelativeHumidityMeasurementCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::RelativeHumidityMeasurement; + switch (aAttributeId) { + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18435,8 +12821,8 @@ static id _Nullable DecodeAttributeValueForTotalVolatileOrganicCompoundsConcentr } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18517,180 +12903,145 @@ static id _Nullable DecodeAttributeValueForTotalVolatileOrganicCompoundsConcentr *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForRadonConcentrationMeasurementCluster( +static id _Nullable DecodeAttributeValueForOccupancySensingCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::RadonConcentrationMeasurement; + using namespace Clusters::OccupancySensing; switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::Occupancy::Id: { + using TypeInfo = Attributes::Occupancy::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 numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::OccupancySensorType::Id: { + using TypeInfo = Attributes::OccupancySensorType::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 numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::OccupancySensorTypeBitmap::Id: { + using TypeInfo = Attributes::OccupancySensorTypeBitmap::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 numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::PIROccupiedToUnoccupiedDelay::Id: { + using TypeInfo = Attributes::PIROccupiedToUnoccupiedDelay::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 numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::PIRUnoccupiedToOccupiedDelay::Id: { + using TypeInfo = Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::PIRUnoccupiedToOccupiedThreshold::Id: { + using TypeInfo = Attributes::PIRUnoccupiedToOccupiedThreshold::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 numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: { + using TypeInfo = Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + case Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id: { + using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id: { + using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { + using TypeInfo = Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id: { + using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { + using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::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; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18715,8 +13066,8 @@ static id _Nullable DecodeAttributeValueForRadonConcentrationMeasurementCluster( } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18869,32 +13220,6 @@ static id _Nullable DecodeAttributeValueForWakeOnLANCluster(AttributeId aAttribu } 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; @@ -19154,32 +13479,6 @@ static id _Nullable DecodeAttributeValueForChannelCluster(AttributeId aAttribute } 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; @@ -19337,32 +13636,6 @@ static id _Nullable DecodeAttributeValueForTargetNavigatorCluster( } 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; @@ -19579,32 +13852,6 @@ static id _Nullable DecodeAttributeValueForMediaPlaybackCluster( } 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; @@ -19689,49 +13936,12 @@ static id _Nullable DecodeAttributeValueForMediaInputCluster( *aError = err; return nil; } - newElement_0.descriptionString = AsString(entry_0.description); - if (newElement_0.descriptionString == 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::CurrentInput::Id: { - using TypeInfo = Attributes::CurrentInput::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]; + newElement_0.descriptionString = AsString(entry_0.description); + if (newElement_0.descriptionString == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -19743,8 +13953,19 @@ static id _Nullable DecodeAttributeValueForMediaInputCluster( } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::CurrentInput::Id: { + using TypeInfo = Attributes::CurrentInput::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) { @@ -19769,8 +13990,8 @@ static id _Nullable DecodeAttributeValueForMediaInputCluster( } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -19907,32 +14128,6 @@ static id _Nullable DecodeAttributeValueForLowPowerCluster(AttributeId aAttribut } 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; @@ -20046,32 +14241,6 @@ static id _Nullable DecodeAttributeValueForKeypadInputCluster( } 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; @@ -20227,32 +14396,6 @@ static id _Nullable DecodeAttributeValueForContentLauncherCluster( } 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; @@ -20411,32 +14554,6 @@ static id _Nullable DecodeAttributeValueForAudioOutputCluster( } 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; @@ -20604,32 +14721,6 @@ static id _Nullable DecodeAttributeValueForApplicationLauncherCluster( } 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; @@ -20868,32 +14959,6 @@ static id _Nullable DecodeAttributeValueForApplicationBasicCluster( } 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; @@ -21007,32 +15072,6 @@ static id _Nullable DecodeAttributeValueForAccountLoginCluster( } 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; @@ -22554,32 +16593,6 @@ static id _Nullable DecodeAttributeValueForElectricalMeasurementCluster( } 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; @@ -24105,32 +18118,6 @@ static id _Nullable DecodeAttributeValueForUnitTestingCluster( } 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; @@ -24299,27 +18286,6 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::ModeSelect::Id: { return DecodeAttributeValueForModeSelectCluster(aPath.mAttributeId, aReader, aError); } - case Clusters::TemperatureControl::Id: { - return DecodeAttributeValueForTemperatureControlCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::RefrigeratorAlarm::Id: { - return DecodeAttributeValueForRefrigeratorAlarmCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::AirQuality::Id: { - return DecodeAttributeValueForAirQualityCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::SmokeCoAlarm::Id: { - return DecodeAttributeValueForSmokeCOAlarmCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::OperationalState::Id: { - return DecodeAttributeValueForOperationalStateCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::HepaFilterMonitoring::Id: { - return DecodeAttributeValueForHEPAFilterMonitoringCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::ActivatedCarbonFilterMonitoring::Id: { - return DecodeAttributeValueForActivatedCarbonFilterMonitoringCluster(aPath.mAttributeId, aReader, aError); - } case Clusters::DoorLock::Id: { return DecodeAttributeValueForDoorLockCluster(aPath.mAttributeId, aReader, aError); } @@ -24365,37 +18331,6 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::OccupancySensing::Id: { return DecodeAttributeValueForOccupancySensingCluster(aPath.mAttributeId, aReader, aError); } - case Clusters::CarbonMonoxideConcentrationMeasurement::Id: { - return DecodeAttributeValueForCarbonMonoxideConcentrationMeasurementCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::CarbonDioxideConcentrationMeasurement::Id: { - return DecodeAttributeValueForCarbonDioxideConcentrationMeasurementCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::NitrogenDioxideConcentrationMeasurement::Id: { - return DecodeAttributeValueForNitrogenDioxideConcentrationMeasurementCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::OzoneConcentrationMeasurement::Id: { - return DecodeAttributeValueForOzoneConcentrationMeasurementCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::Pm25ConcentrationMeasurement::Id: { - return DecodeAttributeValueForPM25ConcentrationMeasurementCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::FormaldehydeConcentrationMeasurement::Id: { - return DecodeAttributeValueForFormaldehydeConcentrationMeasurementCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::Pm1ConcentrationMeasurement::Id: { - return DecodeAttributeValueForPM1ConcentrationMeasurementCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::Pm10ConcentrationMeasurement::Id: { - return DecodeAttributeValueForPM10ConcentrationMeasurementCluster(aPath.mAttributeId, aReader, aError); - } - case Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id: { - return DecodeAttributeValueForTotalVolatileOrganicCompoundsConcentrationMeasurementCluster( - aPath.mAttributeId, aReader, aError); - } - case Clusters::RadonConcentrationMeasurement::Id: { - return DecodeAttributeValueForRadonConcentrationMeasurementCluster(aPath.mAttributeId, aReader, aError); - } case Clusters::WakeOnLan::Id: { return DecodeAttributeValueForWakeOnLANCluster(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 708cf759bcc382..10f9d304312ea2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -109,18 +109,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -269,18 +257,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -501,30 +477,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeRemainingCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeRemainingCapacityWithClusterStateCache:(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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params @@ -553,18 +505,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -788,18 +728,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -914,18 +842,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -1301,18 +1217,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -1547,18 +1451,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -1691,18 +1583,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -1806,18 +1686,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -1990,18 +1858,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -2212,18 +2068,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -2556,18 +2400,21 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeProductAppearanceWithCompletion: + (void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + NSError * _Nullable error))completion + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -2597,18 +2444,6 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -2719,18 +2554,6 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -2883,18 +2706,6 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -3013,18 +2824,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -3165,18 +2964,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -3283,18 +3070,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -3390,18 +3165,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -3896,18 +3659,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -4105,18 +3856,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -4367,18 +4106,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -4472,18 +4199,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -4695,18 +4410,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -4855,18 +4558,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -5786,18 +5477,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -6058,18 +5737,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -6271,18 +5938,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -6537,13 +6192,14 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (void)readAttributeProductAppearanceWithCompletion: (void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + NSError * _Nullable error))completion API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)( MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + (void) readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint @@ -6551,7 +6207,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) completion: (void (^)( MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + NSError * _Nullable error))completion + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -6581,18 +6238,6 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -6719,18 +6364,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -6881,18 +6514,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -7131,18 +6752,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -7232,7 +6841,7 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)keySetReadAllIndicesWithCompletion: (void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion @@ -7323,18 +6932,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -7431,18 +7028,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -7545,18 +7130,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -7652,18 +7225,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -7843,18 +7404,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -7898,4136 +7447,1253 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end /** - * Cluster Temperature Control + * Cluster Door Lock * - * Attributes and commands for configuring the temperature control, and reporting temperature. + * An interface to a generic way to secure a door */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterTemperatureControl : MTRCluster +API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRBaseClusterDoorLock : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** - * Command SetTemperature + * Command LockDoor * - * Set Temperature + * This command causes the lock device to lock the door. */ -- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeStepWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSupportedTemperatureLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _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 Refrigerator Alarm - * - * Attributes and commands for configuring the Refrigerator alarm. - */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterRefrigeratorAlarm : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSupportedWithClusterStateCache:(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 Air Quality - * - * Attributes for reporting air quality classification - */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterAirQuality : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAirQualityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAirQualityWithClusterStateCache:(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 Smoke CO Alarm - * - * This cluster provides an interface for observing and managing the state of smoke and CO alarms. - */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterSmokeCOAlarm : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -/** - * Command SelfTestRequest - * - * This command SHALL initiate a device self-test. - */ -- (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)selfTestRequestWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeExpressedStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeExpressedStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeSmokeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSmokeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeCOStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeCOStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeBatteryAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeBatteryAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeDeviceMutedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeDeviceMutedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeTestInProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeTestInProgressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeHardwareFaultAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeHardwareFaultAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeEndOfServiceAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeEndOfServiceAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeInterconnectSmokeAlarmWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeInterconnectSmokeAlarmWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeInterconnectCOAlarmWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeInterconnectCOAlarmWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeContaminationStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeContaminationStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeSensitivityLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeExpiryDateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeExpiryDateWithClusterStateCache:(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 Operational State - * - * This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state - * machine is a part of the operation. - */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterOperationalState : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -/** - * Command Pause - * - * Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. - */ -- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)pauseWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * Command Stop - * - * Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. - */ -- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)stopWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * Command Start - * - * Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it - * can be started. - */ -- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)startWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * Command Resume - * - * Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the - * point when it was paused by means outside of this cluster (for example by manual button press). - */ -- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)resumeWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeOperationalStateWithCompletion:(void (^)(MTROperationalStateClusterOperationalStateStruct * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROperationalStateClusterOperationalStateStruct * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(MTROperationalStateClusterOperationalStateStruct * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTROperationalStateClusterErrorStateStruct * _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 HEPA Filter Monitoring - * - * Attributes and commands for monitoring HEPA filters in a device - */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterHEPAFilterMonitoring : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -/** - * Command ResetCondition - * - * Reset the condition of the replaceable to the non degraded state - */ -- (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)resetConditionWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeConditionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeInPlaceIndicatorWithClusterStateCache:(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 Activated Carbon Filter Monitoring - * - * Attributes and commands for monitoring activated carbon filters in a device - */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterActivatedCarbonFilterMonitoring : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -/** - * Command ResetCondition - * - * Reset the condition of the replaceable to the non degraded state - */ -- (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterResetConditionParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)resetConditionWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeConditionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeInPlaceIndicatorWithClusterStateCache:(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 Door Lock - * - * An interface to a generic way to secure a door - */ -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterDoorLock : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -/** - * Command LockDoor - * - * This command causes the lock device to lock the door. - */ -- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command UnlockDoor - * - * This command causes the lock device to unlock the door. - */ -- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command UnlockWithTimeout - * - * This command causes the lock device to unlock the door with a timeout parameter. - */ -- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command SetWeekDaySchedule - * - * Set a weekly repeating schedule for a specified user. - */ -- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command GetWeekDaySchedule - * - * Retrieve the specific weekly schedule for the specific user. - */ -- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params - completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command ClearWeekDaySchedule - * - * Clear the specific weekly schedule or all weekly schedules for the specific user. - */ -- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command SetYearDaySchedule - * - * Set a time-specific schedule ID for a specified user. - */ -- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command GetYearDaySchedule - * - * Returns the year day schedule data for the specified schedule and user indexes. - */ -- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params - completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command ClearYearDaySchedule - * - * Clears the specific year day schedule or all year day schedules for the specific user. - */ -- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command SetHolidaySchedule - * - * Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. - */ -- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command GetHolidaySchedule - * - * Get the holiday schedule for the specified index. - */ -- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params - completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command ClearHolidaySchedule - * - * Clears the holiday schedule or all holiday schedules. - */ -- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command SetUser - * - * Set User into the lock. - */ -- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command GetUser - * - * Retrieve User. - */ -- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params - completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command ClearUser - * - * Clears a User or all Users. - */ -- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command SetCredential - * - * Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. - */ -- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params - completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command GetCredentialStatus - * - * Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. - */ -- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params - completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command ClearCredential - * - * Clear one, one type, or all credentials except ProgrammingPIN credential. - */ -- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command UnboltDoor - * - * This command causes the lock device to unlock the door without pulling the latch. - */ -- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLockStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLockTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeActuatorEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDoorStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDoorOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDoorClosedEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeNumberOfTotalUsersSupportedWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeNumberOfPINUsersSupportedWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNumberOfPINUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeCredentialRulesSupportWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCredentialRulesSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLanguageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLEDSettingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAutoRelockTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSoundVolumeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeSupportedOperatingModesWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSupportedOperatingModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeDefaultConfigurationRegisterWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDefaultConfigurationRegisterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEnableLocalProgrammingWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEnableLocalProgrammingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEnableOneTouchLockingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEnableInsideStatusLEDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEnablePrivacyModeButtonWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEnablePrivacyModeButtonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeLocalProgrammingFeaturesWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLocalProgrammingFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeWrongCodeEntryLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSendPINOverTheAirWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeRequirePINforRemoteOperationWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRequirePINforRemoteOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Window Covering - * - * Provides an interface for controlling and adjusting automatic window coverings. - */ -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterWindowCovering : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -/** - * Command UpOrOpen - * - * Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt - */ -- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)upOrOpenWithCompletion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command DownOrClose - * - * Moves window covering to InstalledClosedLimitLift and InstalledCloseLimitTilt - */ -- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)downOrCloseWithCompletion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command StopMotion - * - * Stop any adjusting of window covering - */ -- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)stopMotionWithCompletion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command GoToLiftValue - * - * Go to lift value specified - */ -- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command GoToLiftPercentage - * - * Go to lift percentage specified - */ -- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command GoToTiltValue - * - * Go to tilt value specified - */ -- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command GoToTiltPercentage - * - * Go to tilt percentage specified - */ -- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributePhysicalClosedLimitLiftWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePhysicalClosedLimitLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributePhysicalClosedLimitTiltWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePhysicalClosedLimitTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCurrentPositionLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCurrentPositionTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeNumberOfActuationsLiftWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNumberOfActuationsLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeNumberOfActuationsTiltWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNumberOfActuationsTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeConfigStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeCurrentPositionLiftPercentageWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCurrentPositionLiftPercentageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeCurrentPositionTiltPercentageWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCurrentPositionTiltPercentageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOperationalStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeTargetPositionLiftPercent100thsWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeTargetPositionLiftPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeTargetPositionTiltPercent100thsWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeTargetPositionTiltPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEndProductTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCurrentPositionLiftPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCurrentPositionTiltPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeInstalledOpenLimitLiftWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInstalledOpenLimitLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeInstalledClosedLimitLiftWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInstalledClosedLimitLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeInstalledOpenLimitTiltWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInstalledOpenLimitTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeInstalledClosedLimitTiltWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInstalledClosedLimitTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Barrier Control - * - * This cluster provides control of a barrier (garage door). - */ -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterBarrierControl : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -/** - * Command BarrierControlGoToPercent - * - * Command to instruct a barrier to go to a percent open state. - */ -- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command BarrierControlStop - * - * Command that instructs the barrier to stop moving. - */ -- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierMovingStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierCommandOpenEventsWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierCommandOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierCommandCloseEventsWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierCommandCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierClosePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Pump Configuration and Control - * - * An interface for configuring and controlling pumps. - */ -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterPumpConfigurationAndControl : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePumpStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEffectiveOperationModeWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEffectiveOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEffectiveControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLifetimeRunningHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeLifetimeEnergyConsumedWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLifetimeEnergyConsumedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command UnlockDoor + * + * This command causes the lock device to unlock the door. + */ +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command UnlockWithTimeout + * + * This command causes the lock device to unlock the door with a timeout parameter. + */ +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command SetWeekDaySchedule + * + * Set a weekly repeating schedule for a specified user. + */ +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +/** + * Command GetWeekDaySchedule + * + * Retrieve the specific weekly schedule for the specific user. + */ +- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params + completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +/** + * Command ClearWeekDaySchedule + * + * Clear the specific weekly schedule or all weekly schedules for the specific user. + */ +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +/** + * Command SetYearDaySchedule + * + * Set a time-specific schedule ID for a specified user. + */ +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +/** + * Command GetYearDaySchedule + * + * Returns the year day schedule data for the specified schedule and user indexes. + */ +- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params + completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +/** + * Command ClearYearDaySchedule + * + * Clears the specific year day schedule or all year day schedules for the specific user. + */ +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +/** + * Command SetHolidaySchedule + * + * Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. + */ +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - /** - * Cluster Thermostat + * Command GetHolidaySchedule * - * An interface for configuring and controlling the functionality of a thermostat. + * Get the holiday schedule for the specified index. */ -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterThermostat : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER +- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params + completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - /** - * Command SetpointRaiseLower + * Command ClearHolidaySchedule * - * Command description for SetpointRaiseLower + * Clears the holiday schedule or all holiday schedules. */ -- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params - completion:(MTRStatusCompletion)completion +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** - * Command SetWeeklySchedule + * Command SetUser * - * Command description for SetWeeklySchedule + * Set User into the lock. */ -- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** - * Command GetWeeklySchedule + * Command GetUser * - * Command description for GetWeeklySchedule + * Retrieve User. */ -- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params - completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params + completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** - * Command ClearWeeklySchedule + * Command ClearUser * - * The Clear Weekly Schedule command is used to clear the weekly schedule. + * Clears a User or all Users. */ -- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command SetCredential + * + * Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. + */ +- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params + completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion +/** + * Command GetCredentialStatus + * + * Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. + */ +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params + completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command ClearCredential + * + * Clear one, one type, or all credentials except ProgrammingPIN credential. + */ +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLocalTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLockStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOutdoorTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLockTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeActuatorEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeDoorStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAbsMinHeatSetpointLimitWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeDoorOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAbsMinCoolSetpointLimitWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeDoorClosedEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePICoolingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeHVACSystemTypeConfigurationWithCompletion: +- (void)readAttributeNumberOfTotalUsersSupportedWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLocalTemperatureCalibrationWithCompletion: +- (void)readAttributeNumberOfPINUsersSupportedWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeNumberOfPINUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLocalTemperatureCalibrationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeOccupiedCoolingSetpointWithCompletion: +- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeOccupiedHeatingSetpointWithCompletion: +- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeMaxPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMinPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeUnoccupiedCoolingSetpointWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeMaxRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeMinRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeUnoccupiedHeatingSetpointWithCompletion: +- (void)readAttributeCredentialRulesSupportWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeCredentialRulesSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLanguageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLEDSettingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAutoRelockTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinSetpointDeadBandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoundVolumeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRemoteSensingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeControlSequenceOfOperationWithCompletion: +- (void)readAttributeSupportedOperatingModesWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeSupportedOperatingModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeDefaultConfigurationRegisterWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeDefaultConfigurationRegisterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeEnableLocalProgrammingWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeControlSequenceOfOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeEnableLocalProgrammingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSystemModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnableOneTouchLockingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams *)params +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeThermostatRunningModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeEnableInsideStatusLEDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeEnablePrivacyModeButtonWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeStartOfWeekWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeNumberOfWeeklyTransitionsWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeEnablePrivacyModeButtonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeNumberOfDailyTransitionsWithCompletion: +- (void)readAttributeLocalProgrammingFeaturesWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams *)params +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNumberOfDailyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeLocalProgrammingFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeTemperatureSetpointHoldWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeTemperatureSetpointHoldWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeWrongCodeEntryLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeTemperatureSetpointHoldDurationWithCompletion: +- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeTemperatureSetpointHoldDurationWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeThermostatProgrammingOperationModeWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeThermostatProgrammingOperationModeWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeSendPINOverTheAirWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeThermostatRunningStateWithCompletion: +- (void)readAttributeRequirePINforRemoteOperationWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeRequirePINforRemoteOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeThermostatRunningStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSetpointChangeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSetpointChangeAmountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeSetpointChangeSourceTimestampWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSetpointChangeSourceTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams *)params + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Window Covering + * + * Provides an interface for controlling and adjusting automatic window coverings. + */ +API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRBaseClusterWindowCovering : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +/** + * Command UpOrOpen + * + * Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt + */ +- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)upOrOpenWithCompletion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command DownOrClose + * + * Moves window covering to InstalledClosedLimitLift and InstalledCloseLimitTilt + */ +- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)downOrCloseWithCompletion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command StopMotion + * + * Stop any adjusting of window covering + */ +- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)stopMotionWithCompletion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command GoToLiftValue + * + * Go to lift value specified + */ +- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command GoToLiftPercentage + * + * Go to lift percentage specified + */ +- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +/** + * Command GoToTiltValue + * + * Go to tilt value specified + */ +- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command GoToTiltPercentage + * + * Go to tilt percentage specified + */ +- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalClosedLimitLiftWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributePhysicalClosedLimitLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributePhysicalClosedLimitTiltWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeUnoccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePhysicalClosedLimitTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeUnoccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeUnoccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)readAttributeNumberOfActuationsLiftWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEmergencyHeatDeltaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfActuationsLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)readAttributeNumberOfActuationsTiltWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeACTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfActuationsTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeConfigStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeCurrentPositionLiftPercentageWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeACCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeCurrentPositionLiftPercentageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionTiltPercentageWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeCurrentPositionTiltPercentageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams *)params + +- (void)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeACRefrigerantTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeOperationalStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTargetPositionLiftPercent100thsWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeTargetPositionLiftPercent100thsWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeTargetPositionTiltPercent100thsWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeACCompressorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeTargetPositionTiltPercent100thsWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeEndProductTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeACErrorCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeCurrentPositionLiftPercent100thsWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeCurrentPositionTiltPercent100thsWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeInstalledOpenLimitLiftWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeACLouverPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInstalledOpenLimitLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeInstalledClosedLimitLiftWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInstalledClosedLimitLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeInstalledOpenLimitTiltWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInstalledOpenLimitTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInstalledClosedLimitTiltWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeACCoilTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInstalledClosedLimitTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeACCapacityformatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion @@ -12058,18 +8724,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -12113,12 +8767,12 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end /** - * Cluster Fan Control + * Cluster Barrier Control * - * An interface for controlling a fan in a heating/cooling system. + * This cluster provides control of a barrier (garage door). */ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterFanControl : MTRCluster +@interface MTRBaseClusterBarrierControl : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID @@ -12126,204 +8780,205 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** - * Command Step + * Command BarrierControlGoToPercent * - * The Step command speeds up or slows down the fan, in steps. + * Command to instruct a barrier to go to a percent open state. */ -- (void)stepWithParams:(MTRFanControlClusterStepParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +/** + * Command BarrierControlStop + * + * Command that instructs the barrier to stop moving. + */ +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFanModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeBarrierMovingStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeBarrierSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFanModeSequenceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeBarrierCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePercentSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePercentCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSpeedMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierCommandOpenEventsWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSpeedSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierCommandOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeBarrierCommandCloseEventsWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRockSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierCommandCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRockSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeWindSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion ++ (void)readAttributeBarrierClosePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + +- (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeWindSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBarrierPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAirflowDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAirflowDirectionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAirflowDirectionWithClusterStateCache:(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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params @@ -12352,18 +9007,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -12407,1048 +9050,971 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end /** - * Cluster Thermostat User Interface Configuration + * Cluster Pump Configuration and Control * - * An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). + * An interface for configuring and controlling pumps. */ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterThermostatUserInterfaceConfiguration : MTRCluster +@interface MTRBaseClusterPumpConfigurationAndControl : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeTemperatureDisplayModeWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeTemperatureDisplayModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeMaxPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeMaxSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeKeypadLockoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeMaxFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeScheduleProgrammingVisibilityWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeMinConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + +- (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeScheduleProgrammingVisibilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeMaxConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeMinConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeMaxConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Color Control - * - * Attributes and commands for controlling the color properties of a color-capable light. - */ -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterColorControl : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER +- (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -/** - * Command MoveToHue - * - * Move to specified hue. - */ -- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command MoveHue - * - * Move hue up or down at specified rate. - */ -- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command StepHue - * - * Step hue up or down by specified size at specified rate. - */ -- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command MoveToSaturation - * - * Move to specified saturation. - */ -- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command MoveSaturation - * - * Move saturation up or down at specified rate. - */ -- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command StepSaturation - * - * Step saturation up or down by specified size at specified rate. - */ -- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command MoveToHueAndSaturation - * - * Move to hue and saturation. - */ -- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command MoveToColor - * - * Move to specified color. - */ -- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command MoveColor - * - * Moves the color. - */ -- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command StepColor - * - * Steps the lighting to a specific color. - */ -- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command MoveToColorTemperature - * - * Move to a specific color temperature. - */ -- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeMinConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command EnhancedMoveToHue - * - * Command description for EnhancedMoveToHue - */ -- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command EnhancedMoveHue - * - * Command description for EnhancedMoveHue - */ -- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command EnhancedStepHue - * - * Command description for EnhancedStepHue - */ -- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command EnhancedMoveToHueAndSaturation - * - * Command description for EnhancedMoveToHueAndSaturation - */ -- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params - completion:(MTRStatusCompletion)completion + +- (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command ColorLoopSet - * - * Command description for ColorLoopSet - */ -- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command StopMoveStep - * - * Command description for StopMoveStep - */ -- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params - completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command MoveColorTemperature - * - * Command description for MoveColorTemperature - */ -- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command StepColorTemperature - * - * Command description for StepColorTemperature - */ -- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeMaxConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributePumpStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEffectiveOperationModeWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCurrentSaturationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEffectiveOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEffectiveControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCurrentXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCurrentYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDriftCompensationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeLifetimeRunningHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCompensationTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorTemperatureMiredsWithCompletion: +- (void)readAttributeLifetimeEnergyConsumedWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams *)params +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeLifetimeEnergyConsumedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNumberOfPrimariesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary1XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary1YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary1IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary2XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Thermostat + * + * An interface for configuring and controlling the functionality of a thermostat. + */ +API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRBaseClusterThermostat : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +/** + * Command SetpointRaiseLower + * + * Command description for SetpointRaiseLower + */ +- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command SetWeeklySchedule + * + * Command description for SetWeeklySchedule + */ +- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command GetWeeklySchedule + * + * Command description for GetWeeklySchedule + */ +- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params + completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary2YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +/** + * Command ClearWeeklySchedule + * + * The Clear Weekly Schedule command is used to clear the weekly schedule. + */ +- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary2IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocalTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary3XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOutdoorTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary3YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary3IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary4XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary4YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary4IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary5XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePICoolingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary5YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeHVACSystemTypeConfigurationWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary5IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary6XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLocalTemperatureCalibrationWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary6YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePrimary6IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocalTemperatureCalibrationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedCoolingSetpointWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeWhitePointXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedHeatingSetpointWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeWhitePointYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorPointRXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorPointRYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorPointRIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorPointGXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorPointGYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorPointGIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorPointBXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorPointBYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorPointBIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEnhancedCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeMinSetpointDeadBandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeRemoteSensingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeControlSequenceOfOperationWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEnhancedColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeControlSequenceOfOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorLoopActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeSystemModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThermostatRunningModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorLoopTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartOfWeekWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorLoopStartEnhancedHueWithCompletion: +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorLoopStartEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorLoopStoredEnhancedHueWithCompletion: +- (void)readAttributeNumberOfDailyTransitionsWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNumberOfDailyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTemperatureSetpointHoldWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeColorTempPhysicalMinMiredsWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeTemperatureSetpointHoldWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion: +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache: ++ (void)readAttributeTemperatureSetpointHoldDurationWithClusterStateCache: (MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -13456,372 +10022,354 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeStartUpColorTemperatureMiredsWithCompletion: +- (void)readAttributeThermostatProgrammingOperationModeWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeThermostatProgrammingOperationModeWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThermostatRunningStateWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeThermostatRunningStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeSetpointChangeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSetpointChangeAmountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 +- (void)readAttributeSetpointChangeSourceTimestampWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSetpointChangeSourceTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeOccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Ballast Configuration - * - * Attributes and commands for configuring a lighting ballast. - */ -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterBallastConfiguration : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePhysicalMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePhysicalMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBallastStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion ++ (void)readAttributeUnoccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + +- (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeIntrinsicBallastFactorWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeIntrinsicBallastFactorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeIntrinsicBallastFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeEmergencyHeatDeltaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeBallastFactorAdjustmentWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBallastFactorAdjustmentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeACTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLampQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeACCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLampTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACRefrigerantTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLampManufacturerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeACCompressorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLampRatedHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACErrorCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLampBurnHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACLouverPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLampAlarmModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACCoilTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLampBurnHoursTripPointWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLampBurnHoursTripPointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeACCapacityformatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion @@ -13852,18 +10400,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -13907,224 +10443,191 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end /** - * Cluster Illuminance Measurement + * Cluster Fan Control * - * Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. + * An interface for controlling a fan in a heating/cooling system. */ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterIlluminanceMeasurement : MTRCluster +@interface MTRBaseClusterFanControl : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFanModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLightSensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeFanModeSequenceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePercentSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePercentCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRockSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Temperature Measurement - * - * Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. - */ -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterTemperatureMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER +- (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeRockSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWindSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWindSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion @@ -14155,18 +10658,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -14210,127 +10701,80 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end /** - * Cluster Pressure Measurement + * Cluster Thermostat User Interface Configuration * - * Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. + * An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterPressureMeasurement : MTRCluster +@interface MTRBaseClusterThermostatUserInterfaceConfiguration : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTemperatureDisplayModeWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureDisplayModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeScaledToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeKeypadLockoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScheduleProgrammingVisibilityWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeScaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeScheduleProgrammingVisibilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion @@ -14361,18 +10805,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -14416,1081 +10848,983 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end /** - * Cluster Flow Measurement + * Cluster Color Control * - * Attributes and commands for configuring the measurement of flow, and reporting flow measurements. + * Attributes and commands for controlling the color properties of a color-capable light. */ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterFlowMeasurement : MTRCluster +@interface MTRBaseClusterColorControl : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +/** + * Command MoveToHue + * + * Move to specified hue. + */ +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command MoveHue + * + * Move hue up or down at specified rate. + */ +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command StepHue + * + * Step hue up or down by specified size at specified rate. + */ +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command MoveToSaturation + * + * Move to specified saturation. + */ +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command MoveSaturation + * + * Move saturation up or down at specified rate. + */ +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command StepSaturation + * + * Step saturation up or down by specified size at specified rate. + */ +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command MoveToHueAndSaturation + * + * Move to hue and saturation. + */ +- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command MoveToColor + * + * Move to specified color. + */ +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command MoveColor + * + * Moves the color. + */ +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command StepColor + * + * Steps the lighting to a specific color. + */ +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command MoveToColorTemperature + * + * Move to a specific color temperature. + */ +- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command EnhancedMoveToHue + * + * Command description for EnhancedMoveToHue + */ +- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command EnhancedMoveHue + * + * Command description for EnhancedMoveHue + */ +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command EnhancedStepHue + * + * Command description for EnhancedStepHue + */ +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command EnhancedMoveToHueAndSaturation + * + * Command description for EnhancedMoveToHueAndSaturation + */ +- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command ColorLoopSet + * + * Command description for ColorLoopSet + */ +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command StopMoveStep + * + * Command description for StopMoveStep + */ +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command MoveColorTemperature + * + * Command description for MoveColorTemperature + */ +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command StepColorTemperature + * + * Command description for StepColorTemperature + */ +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeCurrentSaturationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeCurrentYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeDriftCompensationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeCompensationTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorTemperatureMiredsWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfPrimariesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params +- (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePrimary1XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary1YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary1IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary2XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Relative Humidity Measurement - * - * Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. - */ -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterRelativeHumidityMeasurement : MTRCluster +- (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePrimary2YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER +- (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePrimary2IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary3XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary3YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary3IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributePrimary4XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary4YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary4IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params +- (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePrimary5XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary5YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary5IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Occupancy Sensing - * - * Attributes and commands for configuring occupancy sensing, and reporting occupancy status. - */ -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterOccupancySensing : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER ++ (void)readAttributePrimary6XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributePrimary6YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOccupancySensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary6IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeOccupancySensorTypeBitmapWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOccupancySensorTypeBitmapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeWhitePointXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePIROccupiedToUnoccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeWhitePointYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePIRUnoccupiedToOccupiedDelayWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePIRUnoccupiedToOccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeColorPointRXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePIRUnoccupiedToOccupiedThresholdWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeColorPointRYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeColorPointRIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeColorPointGXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeColorPointGYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeColorPointGIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeColorPointBXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeColorPointBYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeColorPointBIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnhancedCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnhancedColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params +- (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeColorLoopActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -/** - * Cluster Carbon Monoxide Concentration Measurement - * - * Attributes for reporting carbon monoxide concentration measurements - */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterCarbonMonoxideConcentrationMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; +- (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params +- (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeColorLoopTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeColorLoopStartEnhancedHueWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeColorLoopStartEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams *)params +- (void)readAttributeColorLoopStoredEnhancedHueWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeLevelValueWithClusterStateCache:(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 Carbon Dioxide Concentration Measurement - * - * Attributes for reporting carbon dioxide concentration measurements - */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterCarbonDioxideConcentrationMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams *)params +- (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeColorCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams *)params +- (void)readAttributeColorTempPhysicalMinMiredsWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributeStartUpColorTemperatureMiredsWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (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; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -15498,441 +11832,332 @@ MTR_NEWLY_AVAILABLE @end /** - * Cluster Nitrogen Dioxide Concentration Measurement + * Cluster Ballast Configuration * - * Attributes for reporting nitrogen dioxide concentration measurements + * Attributes and commands for configuring a lighting ballast. */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterNitrogenDioxideConcentrationMeasurement : MTRCluster +API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRBaseClusterBallastConfiguration : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params +- (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePhysicalMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params +- (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePhysicalMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeBallastStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeIntrinsicBallastFactorWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeIntrinsicBallastFactorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeIntrinsicBallastFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeBallastFactorAdjustmentWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeBallastFactorAdjustmentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeLampQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (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)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeLampTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)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)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeLampManufacturerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)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)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeLampRatedHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params +- (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeLampBurnHoursWithClusterStateCache:(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 Ozone Concentration Measurement - * - * Attributes for reporting ozone concentration measurements - */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterOzoneConcentrationMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params +- (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeLampAlarmModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributeLampBurnHoursTripPointWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeLampBurnHoursTripPointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (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; + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -15940,220 +12165,145 @@ MTR_NEWLY_AVAILABLE @end /** - * Cluster PM2.5 Concentration Measurement + * Cluster Illuminance Measurement * - * Attributes for reporting PM2.5 concentration measurements + * Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterPM25ConcentrationMeasurement : MTRCluster +API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRBaseClusterIlluminanceMeasurement : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams *)params +- (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeLightSensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (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; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -16161,220 +12311,132 @@ MTR_NEWLY_AVAILABLE @end /** - * Cluster Formaldehyde Concentration Measurement + * Cluster Temperature Measurement * - * Attributes for reporting formaldehyde concentration measurements + * Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterFormaldehydeConcentrationMeasurement : MTRCluster +API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRBaseClusterTemperatureMeasurement : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (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; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -16382,220 +12444,193 @@ MTR_NEWLY_AVAILABLE @end /** - * Cluster PM1 Concentration Measurement + * Cluster Pressure Measurement * - * Attributes for reporting PM1 concentration measurements + * Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterPM1ConcentrationMeasurement : MTRCluster +API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRBaseClusterPressureMeasurement : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams *)params +- (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeMinScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams *)params +- (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeMaxScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeScaledToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeScaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (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; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -16603,220 +12638,132 @@ MTR_NEWLY_AVAILABLE @end /** - * Cluster PM10 Concentration Measurement + * Cluster Flow Measurement * - * Attributes for reporting PM10 concentration measurements + * Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterPM10ConcentrationMeasurement : MTRCluster +API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRBaseClusterFlowMeasurement : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (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; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -16824,220 +12771,132 @@ MTR_NEWLY_AVAILABLE @end /** - * Cluster Total Volatile Organic Compounds Concentration Measurement + * Cluster Relative Humidity Measurement * - * Attributes for reporting total volatile organic compounds concentration measurements + * Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement : MTRCluster +API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRBaseClusterRelativeHumidityMeasurement : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (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; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -17045,220 +12904,337 @@ MTR_NEWLY_AVAILABLE @end /** - * Cluster Radon Concentration Measurement + * Cluster Occupancy Sensing * - * Attributes for reporting radon concentration measurements + * Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterRadonConcentrationMeasurement : MTRCluster +API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRBaseClusterOccupancySensing : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeOccupancySensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeOccupancySensorTypeBitmapWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeOccupancySensorTypeBitmapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePIROccupiedToUnoccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributePIRUnoccupiedToOccupiedDelayWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePIRUnoccupiedToOccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePIRUnoccupiedToOccupiedThresholdWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (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; + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -17318,18 +13294,6 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -17483,18 +13447,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -17612,18 +13564,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -17917,18 +13857,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -18070,18 +13998,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -18174,18 +14090,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -18278,18 +14182,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -18426,18 +14318,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -18561,18 +14441,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -18719,18 +14587,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -18918,18 +14774,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -19045,18 +14889,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -21003,18 +16835,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -22947,18 +18767,6 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_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 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -23015,8 +18823,8 @@ MTR_DEPRECATED( @interface MTRBaseClusterOtaSoftwareUpdateRequestor : MTRBaseClusterOTASoftwareUpdateRequestor @end -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -MTR_NEWLY_DEPRECATED("Please use MTRBaseClusterBridgedDeviceBasicInformation") +MTR_DEPRECATED("Please use MTRBaseClusterBridgedDeviceBasicInformation", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), + tvos(16.1, 17.0)) @interface MTRBaseClusterBridgedDeviceBasic : MTRBaseClusterBridgedDeviceBasicInformation @end @@ -23043,13 +18851,13 @@ typedef NS_ENUM(uint8_t, MTRIdentifyEffectVariant) { typedef NS_ENUM(uint8_t, MTRIdentifyType) { MTRIdentifyTypeNone API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRIdentifyTypeLightOutput MTR_NEWLY_AVAILABLE = 0x01, - MTRIdentifyTypeVisibleLight API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRIdentifyTypeLightOutput") + MTRIdentifyTypeLightOutput API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRIdentifyTypeVisibleLight MTR_DEPRECATED( + "Please use MTRIdentifyTypeLightOutput", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x01, - MTRIdentifyTypeVisibleIndicator MTR_NEWLY_AVAILABLE = 0x02, - MTRIdentifyTypeVisibleLED API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRIdentifyTypeVisibleIndicator") + MTRIdentifyTypeVisibleIndicator API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRIdentifyTypeVisibleLED MTR_DEPRECATED( + "Please use MTRIdentifyTypeVisibleIndicator", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x02, MTRIdentifyTypeAudibleBeep API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, MTRIdentifyTypeDisplay API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, @@ -23057,22 +18865,22 @@ typedef NS_ENUM(uint8_t, MTRIdentifyType) { } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint32_t, MTRGroupsFeature) { - MTRGroupsFeatureGroupNames MTR_NEWLY_AVAILABLE = 0x1, -} MTR_NEWLY_AVAILABLE; + MTRGroupsFeatureGroupNames API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_OPTIONS(uint32_t, MTRGroupsGroupClusterFeature) { - MTRGroupsGroupClusterFeatureGroupNames API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRGroupsFeatureGroupNames") + MTRGroupsGroupClusterFeatureGroupNames MTR_DEPRECATED( + "Please use MTRGroupsFeatureGroupNames", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_NEWLY_DEPRECATED("Please use MTRGroupsFeature"); +} MTR_DEPRECATED("Please use MTRGroupsFeature", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); typedef NS_OPTIONS(uint8_t, MTRGroupsNameSupportBitmap) { - MTRGroupsNameSupportBitmapGroupNames MTR_NEWLY_AVAILABLE = 0x80, -} MTR_NEWLY_AVAILABLE; + MTRGroupsNameSupportBitmapGroupNames API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x80, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_OPTIONS(uint32_t, MTRScenesFeature) { - MTRScenesFeatureSceneNames MTR_NEWLY_AVAILABLE = 0x1, -} MTR_NEWLY_AVAILABLE; + MTRScenesFeatureSceneNames API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_OPTIONS(uint8_t, MTRScenesCopyMode) { MTRScenesCopyModeCopyAllScenes API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, @@ -23228,37 +19036,37 @@ typedef NS_OPTIONS(uint16_t, MTRActionsCommandBits) { } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRBasicInformationColor) { - MTRBasicInformationColorBlack MTR_NEWLY_AVAILABLE = 0x00, - MTRBasicInformationColorNavy MTR_NEWLY_AVAILABLE = 0x01, - MTRBasicInformationColorGreen MTR_NEWLY_AVAILABLE = 0x02, - MTRBasicInformationColorTeal MTR_NEWLY_AVAILABLE = 0x03, - MTRBasicInformationColorMaroon MTR_NEWLY_AVAILABLE = 0x04, - MTRBasicInformationColorPurple MTR_NEWLY_AVAILABLE = 0x05, - MTRBasicInformationColorOlive MTR_NEWLY_AVAILABLE = 0x06, - MTRBasicInformationColorGray MTR_NEWLY_AVAILABLE = 0x07, - MTRBasicInformationColorBlue MTR_NEWLY_AVAILABLE = 0x08, - MTRBasicInformationColorLime MTR_NEWLY_AVAILABLE = 0x09, - MTRBasicInformationColorAqua MTR_NEWLY_AVAILABLE = 0x0A, - MTRBasicInformationColorRed MTR_NEWLY_AVAILABLE = 0x0B, - MTRBasicInformationColorFuchsia MTR_NEWLY_AVAILABLE = 0x0C, - MTRBasicInformationColorYellow MTR_NEWLY_AVAILABLE = 0x0D, - MTRBasicInformationColorWhite MTR_NEWLY_AVAILABLE = 0x0E, - MTRBasicInformationColorNickel MTR_NEWLY_AVAILABLE = 0x0F, - MTRBasicInformationColorChrome MTR_NEWLY_AVAILABLE = 0x10, - MTRBasicInformationColorBrass MTR_NEWLY_AVAILABLE = 0x11, - MTRBasicInformationColorCopper MTR_NEWLY_AVAILABLE = 0x12, - MTRBasicInformationColorSilver MTR_NEWLY_AVAILABLE = 0x13, - MTRBasicInformationColorGold MTR_NEWLY_AVAILABLE = 0x14, -} MTR_NEWLY_AVAILABLE; + MTRBasicInformationColorBlack API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, + MTRBasicInformationColorNavy API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRBasicInformationColorGreen API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRBasicInformationColorTeal API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, + MTRBasicInformationColorMaroon API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, + MTRBasicInformationColorPurple API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, + MTRBasicInformationColorOlive API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x06, + MTRBasicInformationColorGray API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x07, + MTRBasicInformationColorBlue API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x08, + MTRBasicInformationColorLime API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x09, + MTRBasicInformationColorAqua API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0A, + MTRBasicInformationColorRed API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0B, + MTRBasicInformationColorFuchsia API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0C, + MTRBasicInformationColorYellow API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0D, + MTRBasicInformationColorWhite API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0E, + MTRBasicInformationColorNickel API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0F, + MTRBasicInformationColorChrome API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x10, + MTRBasicInformationColorBrass API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x11, + MTRBasicInformationColorCopper API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x12, + MTRBasicInformationColorSilver API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x13, + MTRBasicInformationColorGold API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x14, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_ENUM(uint8_t, MTRBasicInformationProductFinish) { - MTRBasicInformationProductFinishOther MTR_NEWLY_AVAILABLE = 0x00, - MTRBasicInformationProductFinishMatte MTR_NEWLY_AVAILABLE = 0x01, - MTRBasicInformationProductFinishSatin MTR_NEWLY_AVAILABLE = 0x02, - MTRBasicInformationProductFinishPolished MTR_NEWLY_AVAILABLE = 0x03, - MTRBasicInformationProductFinishRugged MTR_NEWLY_AVAILABLE = 0x04, - MTRBasicInformationProductFinishFabric MTR_NEWLY_AVAILABLE = 0x05, -} MTR_NEWLY_AVAILABLE; + MTRBasicInformationProductFinishOther API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, + MTRBasicInformationProductFinishMatte API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRBasicInformationProductFinishSatin API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRBasicInformationProductFinishPolished API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, + MTRBasicInformationProductFinishRugged API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, + MTRBasicInformationProductFinishFabric API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderOTAApplyUpdateAction) { MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, @@ -23732,7 +19540,7 @@ typedef NS_ENUM(uint8_t, MTRNetworkCommissioningWiFiBand) { MTRNetworkCommissioningWiFiBand5G API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, MTRNetworkCommissioningWiFiBand6G API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, MTRNetworkCommissioningWiFiBand60G API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRNetworkCommissioningWiFiBand1G MTR_NEWLY_AVAILABLE = 0x05, + MTRNetworkCommissioningWiFiBand1G API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint32_t, MTRNetworkCommissioningFeature) { @@ -23742,45 +19550,47 @@ typedef NS_OPTIONS(uint32_t, MTRNetworkCommissioningFeature) { } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint8_t, MTRNetworkCommissioningWiFiSecurityBitmap) { - MTRNetworkCommissioningWiFiSecurityBitmapUnencrypted MTR_NEWLY_AVAILABLE = 0x1, - MTRNetworkCommissioningWiFiSecurityBitmapWEP MTR_NEWLY_AVAILABLE = 0x2, - MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal MTR_NEWLY_AVAILABLE = 0x4, - MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal MTR_NEWLY_AVAILABLE = 0x8, - MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal MTR_NEWLY_AVAILABLE = 0x10, -} MTR_NEWLY_AVAILABLE; + MTRNetworkCommissioningWiFiSecurityBitmapUnencrypted API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, + MTRNetworkCommissioningWiFiSecurityBitmapWEP API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x2, + MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x4, + MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x8, + MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x10, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_OPTIONS(uint8_t, MTRNetworkCommissioningWiFiSecurity) { - MTRNetworkCommissioningWiFiSecurityUnencrypted API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapUnencrypted") + MTRNetworkCommissioningWiFiSecurityUnencrypted MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapUnencrypted", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, - MTRNetworkCommissioningWiFiSecurityWEP API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - MTR_NEWLY_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWEP") + MTRNetworkCommissioningWiFiSecurityWEP MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWEP", + ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x2, MTRNetworkCommissioningWiFiSecurityWepPersonal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWEP", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, - MTRNetworkCommissioningWiFiSecurityWPAPersonal API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - MTR_NEWLY_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal") + MTRNetworkCommissioningWiFiSecurityWPAPersonal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal", + ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x4, MTRNetworkCommissioningWiFiSecurityWpaPersonal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4, - MTRNetworkCommissioningWiFiSecurityWPA2Personal API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - MTR_NEWLY_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal") + MTRNetworkCommissioningWiFiSecurityWPA2Personal MTR_DEPRECATED( + "Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), + tvos(16.4, 17.0)) = 0x8, MTRNetworkCommissioningWiFiSecurityWpa2Personal MTR_DEPRECATED( "Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x8, - MTRNetworkCommissioningWiFiSecurityWPA3Personal API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - MTR_NEWLY_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal") + MTRNetworkCommissioningWiFiSecurityWPA3Personal MTR_DEPRECATED( + "Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), + tvos(16.4, 17.0)) = 0x10, MTRNetworkCommissioningWiFiSecurityWpa3Personal MTR_DEPRECATED( "Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x10, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmap"); +} MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmap", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), + tvos(16.1, 17.0)); typedef NS_ENUM(uint8_t, MTRDiagnosticLogsIntent) { MTRDiagnosticLogsIntentEndUserSupport API_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, @@ -24096,7 +19906,7 @@ typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsWiFiVersion) { MTRWiFiNetworkDiagnosticsWiFiVersionN API_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, MTRWiFiNetworkDiagnosticsWiFiVersionAc API_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x04, MTRWiFiNetworkDiagnosticsWiFiVersionAx API_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x05, - MTRWiFiNetworkDiagnosticsWiFiVersionAh MTR_NEWLY_AVAILABLE = 0x06, + MTRWiFiNetworkDiagnosticsWiFiVersionAh API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x06, } API_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsWiFiVersionType) { @@ -24225,37 +20035,37 @@ typedef NS_ENUM(uint8_t, MTRTimeSynchronizationTimeSource) { } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRBridgedDeviceBasicInformationColor) { - MTRBridgedDeviceBasicInformationColorBlack MTR_NEWLY_AVAILABLE = 0x00, - MTRBridgedDeviceBasicInformationColorNavy MTR_NEWLY_AVAILABLE = 0x01, - MTRBridgedDeviceBasicInformationColorGreen MTR_NEWLY_AVAILABLE = 0x02, - MTRBridgedDeviceBasicInformationColorTeal MTR_NEWLY_AVAILABLE = 0x03, - MTRBridgedDeviceBasicInformationColorMaroon MTR_NEWLY_AVAILABLE = 0x04, - MTRBridgedDeviceBasicInformationColorPurple MTR_NEWLY_AVAILABLE = 0x05, - MTRBridgedDeviceBasicInformationColorOlive MTR_NEWLY_AVAILABLE = 0x06, - MTRBridgedDeviceBasicInformationColorGray MTR_NEWLY_AVAILABLE = 0x07, - MTRBridgedDeviceBasicInformationColorBlue MTR_NEWLY_AVAILABLE = 0x08, - MTRBridgedDeviceBasicInformationColorLime MTR_NEWLY_AVAILABLE = 0x09, - MTRBridgedDeviceBasicInformationColorAqua MTR_NEWLY_AVAILABLE = 0x0A, - MTRBridgedDeviceBasicInformationColorRed MTR_NEWLY_AVAILABLE = 0x0B, - MTRBridgedDeviceBasicInformationColorFuchsia MTR_NEWLY_AVAILABLE = 0x0C, - MTRBridgedDeviceBasicInformationColorYellow MTR_NEWLY_AVAILABLE = 0x0D, - MTRBridgedDeviceBasicInformationColorWhite MTR_NEWLY_AVAILABLE = 0x0E, - MTRBridgedDeviceBasicInformationColorNickel MTR_NEWLY_AVAILABLE = 0x0F, - MTRBridgedDeviceBasicInformationColorChrome MTR_NEWLY_AVAILABLE = 0x10, - MTRBridgedDeviceBasicInformationColorBrass MTR_NEWLY_AVAILABLE = 0x11, - MTRBridgedDeviceBasicInformationColorCopper MTR_NEWLY_AVAILABLE = 0x12, - MTRBridgedDeviceBasicInformationColorSilver MTR_NEWLY_AVAILABLE = 0x13, - MTRBridgedDeviceBasicInformationColorGold MTR_NEWLY_AVAILABLE = 0x14, -} MTR_NEWLY_AVAILABLE; + MTRBridgedDeviceBasicInformationColorBlack API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, + MTRBridgedDeviceBasicInformationColorNavy API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRBridgedDeviceBasicInformationColorGreen API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRBridgedDeviceBasicInformationColorTeal API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, + MTRBridgedDeviceBasicInformationColorMaroon API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, + MTRBridgedDeviceBasicInformationColorPurple API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, + MTRBridgedDeviceBasicInformationColorOlive API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x06, + MTRBridgedDeviceBasicInformationColorGray API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x07, + MTRBridgedDeviceBasicInformationColorBlue API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x08, + MTRBridgedDeviceBasicInformationColorLime API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x09, + MTRBridgedDeviceBasicInformationColorAqua API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0A, + MTRBridgedDeviceBasicInformationColorRed API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0B, + MTRBridgedDeviceBasicInformationColorFuchsia API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0C, + MTRBridgedDeviceBasicInformationColorYellow API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0D, + MTRBridgedDeviceBasicInformationColorWhite API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0E, + MTRBridgedDeviceBasicInformationColorNickel API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0F, + MTRBridgedDeviceBasicInformationColorChrome API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x10, + MTRBridgedDeviceBasicInformationColorBrass API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x11, + MTRBridgedDeviceBasicInformationColorCopper API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x12, + MTRBridgedDeviceBasicInformationColorSilver API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x13, + MTRBridgedDeviceBasicInformationColorGold API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x14, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_ENUM(uint8_t, MTRBridgedDeviceBasicInformationProductFinish) { - MTRBridgedDeviceBasicInformationProductFinishOther MTR_NEWLY_AVAILABLE = 0x00, - MTRBridgedDeviceBasicInformationProductFinishMatte MTR_NEWLY_AVAILABLE = 0x01, - MTRBridgedDeviceBasicInformationProductFinishSatin MTR_NEWLY_AVAILABLE = 0x02, - MTRBridgedDeviceBasicInformationProductFinishPolished MTR_NEWLY_AVAILABLE = 0x03, - MTRBridgedDeviceBasicInformationProductFinishRugged MTR_NEWLY_AVAILABLE = 0x04, - MTRBridgedDeviceBasicInformationProductFinishFabric MTR_NEWLY_AVAILABLE = 0x05, -} MTR_NEWLY_AVAILABLE; + MTRBridgedDeviceBasicInformationProductFinishOther API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, + MTRBridgedDeviceBasicInformationProductFinishMatte API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRBridgedDeviceBasicInformationProductFinishSatin API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRBridgedDeviceBasicInformationProductFinishPolished API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, + MTRBridgedDeviceBasicInformationProductFinishRugged API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, + MTRBridgedDeviceBasicInformationProductFinishFabric API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_OPTIONS(uint32_t, MTRSwitchFeature) { MTRSwitchFeatureLatchingSwitch API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x1, @@ -24367,131 +20177,12 @@ typedef NS_ENUM(uint8_t, MTRGroupKeyManagementGroupKeySecurityPolicy) { } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint32_t, MTRModeSelectFeature) { - MTRModeSelectFeatureOnOff MTR_NEWLY_AVAILABLE = 0x1, - MTRModeSelectFeatureDEPONOFF API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRModeSelectFeatureOnOff") + MTRModeSelectFeatureOnOff API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, + MTRModeSelectFeatureDEPONOFF MTR_DEPRECATED( + "Please use MTRModeSelectFeatureOnOff", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { - MTRTemperatureControlFeatureTemperatureNumber MTR_NEWLY_AVAILABLE = 0x1, - MTRTemperatureControlFeatureTemperatureLevel MTR_NEWLY_AVAILABLE = 0x2, - MTRTemperatureControlFeatureTemperatureStep MTR_NEWLY_AVAILABLE = 0x4, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRRefrigeratorAlarmAlarmMap) { - MTRRefrigeratorAlarmAlarmMapDoorOpen MTR_NEWLY_AVAILABLE = 0x1, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRAirQuality) { - MTRAirQualityUnknown MTR_NEWLY_AVAILABLE = 0x00, - MTRAirQualityGood MTR_NEWLY_AVAILABLE = 0x01, - MTRAirQualityFair MTR_NEWLY_AVAILABLE = 0x02, - MTRAirQualityModerate MTR_NEWLY_AVAILABLE = 0x03, - MTRAirQualityPoor MTR_NEWLY_AVAILABLE = 0x04, - MTRAirQualityVeryPoor MTR_NEWLY_AVAILABLE = 0x05, - MTRAirQualityExtremelyPoor MTR_NEWLY_AVAILABLE = 0x06, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRAirQualityFeature) { - MTRAirQualityFeatureFair MTR_NEWLY_AVAILABLE = 0x1, - MTRAirQualityFeatureModerate MTR_NEWLY_AVAILABLE = 0x2, - MTRAirQualityFeatureVeryPoor MTR_NEWLY_AVAILABLE = 0x4, - MTRAirQualityFeatureExtremelyPoor MTR_NEWLY_AVAILABLE = 0x8, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmAlarmState) { - MTRSmokeCOAlarmAlarmStateNormal MTR_NEWLY_AVAILABLE = 0x00, - MTRSmokeCOAlarmAlarmStateWarning MTR_NEWLY_AVAILABLE = 0x01, - MTRSmokeCOAlarmAlarmStateCritical MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmContaminationState) { - MTRSmokeCOAlarmContaminationStateNormal MTR_NEWLY_AVAILABLE = 0x00, - MTRSmokeCOAlarmContaminationStateLow MTR_NEWLY_AVAILABLE = 0x01, - MTRSmokeCOAlarmContaminationStateWarning MTR_NEWLY_AVAILABLE = 0x02, - MTRSmokeCOAlarmContaminationStateCritical MTR_NEWLY_AVAILABLE = 0x03, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmEndOfService) { - MTRSmokeCOAlarmEndOfServiceNormal MTR_NEWLY_AVAILABLE = 0x00, - MTRSmokeCOAlarmEndOfServiceExpired MTR_NEWLY_AVAILABLE = 0x01, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmExpressedState) { - MTRSmokeCOAlarmExpressedStateNormal MTR_NEWLY_AVAILABLE = 0x00, - MTRSmokeCOAlarmExpressedStateSmokeAlarm MTR_NEWLY_AVAILABLE = 0x01, - MTRSmokeCOAlarmExpressedStateCOAlarm MTR_NEWLY_AVAILABLE = 0x02, - MTRSmokeCOAlarmExpressedStateBatteryAlert MTR_NEWLY_AVAILABLE = 0x03, - MTRSmokeCOAlarmExpressedStateTesting MTR_NEWLY_AVAILABLE = 0x04, - MTRSmokeCOAlarmExpressedStateHardwareFault MTR_NEWLY_AVAILABLE = 0x05, - MTRSmokeCOAlarmExpressedStateEndOfService MTR_NEWLY_AVAILABLE = 0x06, - MTRSmokeCOAlarmExpressedStateInterconnectSmoke MTR_NEWLY_AVAILABLE = 0x07, - MTRSmokeCOAlarmExpressedStateInterconnectCO MTR_NEWLY_AVAILABLE = 0x08, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmMuteState) { - MTRSmokeCOAlarmMuteStateNotMuted MTR_NEWLY_AVAILABLE = 0x00, - MTRSmokeCOAlarmMuteStateMuted MTR_NEWLY_AVAILABLE = 0x01, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmSensitivity) { - MTRSmokeCOAlarmSensitivityHigh MTR_NEWLY_AVAILABLE = 0x00, - MTRSmokeCOAlarmSensitivityStandard MTR_NEWLY_AVAILABLE = 0x01, - MTRSmokeCOAlarmSensitivityLow MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRSmokeCOAlarmFeature) { - MTRSmokeCOAlarmFeatureSmokeAlarm MTR_NEWLY_AVAILABLE = 0x1, - MTRSmokeCOAlarmFeatureCOAlarm MTR_NEWLY_AVAILABLE = 0x2, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTROperationalStateErrorState) { - MTROperationalStateErrorStateNoError MTR_NEWLY_AVAILABLE = 0x00, - MTROperationalStateErrorStateUnableToStartOrResume MTR_NEWLY_AVAILABLE = 0x01, - MTROperationalStateErrorStateUnableToCompleteOperation MTR_NEWLY_AVAILABLE = 0x02, - MTROperationalStateErrorStateCommandInvalidInState MTR_NEWLY_AVAILABLE = 0x03, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTROperationalState) { - MTROperationalStateStopped MTR_NEWLY_AVAILABLE = 0x00, - MTROperationalStateRunning MTR_NEWLY_AVAILABLE = 0x01, - MTROperationalStatePaused MTR_NEWLY_AVAILABLE = 0x02, - MTROperationalStateError MTR_NEWLY_AVAILABLE = 0x03, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRHEPAFilterMonitoringChangeIndication) { - MTRHEPAFilterMonitoringChangeIndicationOK MTR_NEWLY_AVAILABLE = 0x00, - MTRHEPAFilterMonitoringChangeIndicationWarning MTR_NEWLY_AVAILABLE = 0x01, - MTRHEPAFilterMonitoringChangeIndicationCritical MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRHEPAFilterMonitoringDegradationDirection) { - MTRHEPAFilterMonitoringDegradationDirectionUp MTR_NEWLY_AVAILABLE = 0x00, - MTRHEPAFilterMonitoringDegradationDirectionDown MTR_NEWLY_AVAILABLE = 0x01, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRHEPAFilterMonitoringFeature) { - MTRHEPAFilterMonitoringFeatureCondition MTR_NEWLY_AVAILABLE = 0x1, - MTRHEPAFilterMonitoringFeatureWarning MTR_NEWLY_AVAILABLE = 0x2, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRActivatedCarbonFilterMonitoringChangeIndication) { - MTRActivatedCarbonFilterMonitoringChangeIndicationOK MTR_NEWLY_AVAILABLE = 0x00, - MTRActivatedCarbonFilterMonitoringChangeIndicationWarning MTR_NEWLY_AVAILABLE = 0x01, - MTRActivatedCarbonFilterMonitoringChangeIndicationCritical MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRActivatedCarbonFilterMonitoringDegradationDirection) { - MTRActivatedCarbonFilterMonitoringDegradationDirectionUp MTR_NEWLY_AVAILABLE = 0x00, - MTRActivatedCarbonFilterMonitoringDegradationDirectionDown MTR_NEWLY_AVAILABLE = 0x01, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRActivatedCarbonFilterMonitoringFeature) { - MTRActivatedCarbonFilterMonitoringFeatureCondition MTR_NEWLY_AVAILABLE = 0x1, - MTRActivatedCarbonFilterMonitoringFeatureWarning MTR_NEWLY_AVAILABLE = 0x2, -} MTR_NEWLY_AVAILABLE; - typedef NS_ENUM(uint8_t, MTRDoorLockAlarmCode) { MTRDoorLockAlarmCodeLockJammed API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, MTRDoorLockAlarmCodeLockFactoryReset API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, @@ -24598,7 +20289,6 @@ typedef NS_ENUM(uint8_t, MTRDoorLockDlLockState) { MTRDoorLockDlLockStateNotFullyLocked API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, MTRDoorLockDlLockStateLocked API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, MTRDoorLockDlLockStateUnlocked API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRDoorLockDlLockStateUnlatched MTR_NEWLY_AVAILABLE = 0x03, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRDoorLockDlLockType) { @@ -24613,7 +20303,6 @@ typedef NS_ENUM(uint8_t, MTRDoorLockDlLockType) { MTRDoorLockDlLockTypeInterconnectedLock API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, MTRDoorLockDlLockTypeDeadLatch API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, MTRDoorLockDlLockTypeDoorFurniture API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, - MTRDoorLockDlLockTypeEurocylinder MTR_NEWLY_AVAILABLE = 0x0B, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRDoorLockDlStatus) { @@ -24797,7 +20486,6 @@ typedef NS_ENUM(uint8_t, MTRDoorLockLockOperationType) { MTRDoorLockLockOperationTypeUnlock API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, MTRDoorLockLockOperationTypeNonAccessUserEvent API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, MTRDoorLockLockOperationTypeForcedUserEvent API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRDoorLockLockOperationTypeUnlatch MTR_NEWLY_AVAILABLE = 0x04, } API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); typedef NS_ENUM(uint8_t, MTRDoorLockDlLockOperationType) { @@ -25192,7 +20880,6 @@ typedef NS_OPTIONS(uint32_t, MTRDoorLockFeature) { macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x400, MTRDoorLockFeatureHolidaySchedules API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x800, - MTRDoorLockFeatureUnbolt MTR_NEWLY_AVAILABLE = 0x1000, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRWindowCoveringEndProductType) { @@ -25351,42 +21038,49 @@ typedef NS_ENUM(uint8_t, MTRPumpConfigurationAndControlPumpOperationMode) { tvos(16.1, 16.5)); typedef NS_OPTIONS(uint32_t, MTRPumpConfigurationAndControlFeature) { - MTRPumpConfigurationAndControlFeatureConstantPressure MTR_NEWLY_AVAILABLE = 0x1, - MTRPumpConfigurationAndControlFeatureCompensatedPressure MTR_NEWLY_AVAILABLE = 0x2, - MTRPumpConfigurationAndControlFeatureConstantFlow MTR_NEWLY_AVAILABLE = 0x4, - MTRPumpConfigurationAndControlFeatureConstantSpeed MTR_NEWLY_AVAILABLE = 0x8, - MTRPumpConfigurationAndControlFeatureConstantTemperature MTR_NEWLY_AVAILABLE = 0x10, - MTRPumpConfigurationAndControlFeatureAutomatic MTR_NEWLY_AVAILABLE = 0x20, - MTRPumpConfigurationAndControlFeatureLocalOperation MTR_NEWLY_AVAILABLE = 0x40, -} MTR_NEWLY_AVAILABLE; + MTRPumpConfigurationAndControlFeatureConstantPressure API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, + MTRPumpConfigurationAndControlFeatureCompensatedPressure API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x2, + MTRPumpConfigurationAndControlFeatureConstantFlow API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x4, + MTRPumpConfigurationAndControlFeatureConstantSpeed API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x8, + MTRPumpConfigurationAndControlFeatureConstantTemperature API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) + = 0x10, + MTRPumpConfigurationAndControlFeatureAutomatic API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x20, + MTRPumpConfigurationAndControlFeatureLocalOperation API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x40, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_OPTIONS(uint32_t, MTRPumpConfigurationAndControlPumpFeature) { - MTRPumpConfigurationAndControlPumpFeatureConstantPressure API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - MTR_NEWLY_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureConstantPressure") + MTRPumpConfigurationAndControlPumpFeatureConstantPressure MTR_DEPRECATED( + "Please use MTRPumpConfigurationAndControlFeatureConstantPressure", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), + tvos(16.4, 17.0)) = 0x1, - MTRPumpConfigurationAndControlPumpFeatureCompensatedPressure API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - MTR_NEWLY_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureCompensatedPressure") + MTRPumpConfigurationAndControlPumpFeatureCompensatedPressure MTR_DEPRECATED( + "Please use MTRPumpConfigurationAndControlFeatureCompensatedPressure", ios(16.4, 17.0), macos(13.3, 14.0), + watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x2, - MTRPumpConfigurationAndControlPumpFeatureConstantFlow API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - MTR_NEWLY_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureConstantFlow") + MTRPumpConfigurationAndControlPumpFeatureConstantFlow MTR_DEPRECATED( + "Please use MTRPumpConfigurationAndControlFeatureConstantFlow", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), + tvos(16.4, 17.0)) = 0x4, - MTRPumpConfigurationAndControlPumpFeatureConstantSpeed API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - MTR_NEWLY_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureConstantSpeed") + MTRPumpConfigurationAndControlPumpFeatureConstantSpeed MTR_DEPRECATED( + "Please use MTRPumpConfigurationAndControlFeatureConstantSpeed", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), + tvos(16.4, 17.0)) = 0x8, - MTRPumpConfigurationAndControlPumpFeatureConstantTemperature API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - MTR_NEWLY_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureConstantTemperature") + MTRPumpConfigurationAndControlPumpFeatureConstantTemperature MTR_DEPRECATED( + "Please use MTRPumpConfigurationAndControlFeatureConstantTemperature", ios(16.4, 17.0), macos(13.3, 14.0), + watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x10, - MTRPumpConfigurationAndControlPumpFeatureAutomatic API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - MTR_NEWLY_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureAutomatic") + MTRPumpConfigurationAndControlPumpFeatureAutomatic MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureAutomatic", + ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x20, - MTRPumpConfigurationAndControlPumpFeatureLocalOperation API_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) - MTR_NEWLY_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureLocalOperation") + MTRPumpConfigurationAndControlPumpFeatureLocalOperation MTR_DEPRECATED( + "Please use MTRPumpConfigurationAndControlFeatureLocalOperation", ios(16.5, 17.0), macos(13.4, 14.0), watchos(9.5, 10.0), + tvos(16.5, 17.0)) = 0x40, MTRPumpConfigurationAndControlPumpFeatureLocal MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureLocalOperation", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x40, -} API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - MTR_NEWLY_DEPRECATED("Please use MTRPumpConfigurationAndControlFeature"); +} MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeature", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), + tvos(16.4, 17.0)); typedef NS_OPTIONS(uint16_t, MTRPumpConfigurationAndControlPumpStatusBitmap) { MTRPumpConfigurationAndControlPumpStatusBitmapDeviceFault API_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1, @@ -25515,7 +21209,7 @@ typedef NS_OPTIONS(uint32_t, MTRThermostatFeature) { MTRThermostatFeatureAutomode MTR_DEPRECATED( "Please use MTRThermostatFeatureAutoMode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x20, - MTRThermostatFeatureLocalTemperatureNotExposed MTR_NEWLY_AVAILABLE = 0x40, + MTRThermostatFeatureLocalTemperatureNotExposed API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x40, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint8_t, MTRThermostatModeForSequence) { @@ -25531,54 +21225,109 @@ typedef NS_OPTIONS(uint8_t, MTRThermostatModeForSequence) { = 0x2, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_ENUM(uint8_t, MTRFanControlAirflowDirection) { - MTRFanControlAirflowDirectionForward MTR_NEWLY_AVAILABLE = 0x00, - MTRFanControlAirflowDirectionReverse MTR_NEWLY_AVAILABLE = 0x01, -} MTR_NEWLY_AVAILABLE; - typedef NS_ENUM(uint8_t, MTRFanControlFanMode) { - MTRFanControlFanModeOff MTR_NEWLY_AVAILABLE = 0x00, - MTRFanControlFanModeLow MTR_NEWLY_AVAILABLE = 0x01, - MTRFanControlFanModeMedium MTR_NEWLY_AVAILABLE = 0x02, - MTRFanControlFanModeHigh MTR_NEWLY_AVAILABLE = 0x03, - MTRFanControlFanModeOn MTR_NEWLY_AVAILABLE = 0x04, - MTRFanControlFanModeAuto MTR_NEWLY_AVAILABLE = 0x05, - MTRFanControlFanModeSmart MTR_NEWLY_AVAILABLE = 0x06, -} MTR_NEWLY_AVAILABLE; + MTRFanControlFanModeOff API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, + MTRFanControlFanModeLow API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRFanControlFanModeMedium API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRFanControlFanModeHigh API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, + MTRFanControlFanModeOn API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, + MTRFanControlFanModeAuto API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, + MTRFanControlFanModeSmart API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x06, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + +typedef NS_ENUM(uint8_t, MTRFanControlFanModeType) { + MTRFanControlFanModeTypeOff MTR_DEPRECATED( + "Please use MTRFanControlFanModeOff", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x00, + MTRFanControlFanModeTypeLow MTR_DEPRECATED( + "Please use MTRFanControlFanModeLow", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x01, + MTRFanControlFanModeTypeMedium MTR_DEPRECATED( + "Please use MTRFanControlFanModeMedium", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x02, + MTRFanControlFanModeTypeHigh MTR_DEPRECATED( + "Please use MTRFanControlFanModeHigh", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x03, + MTRFanControlFanModeTypeOn MTR_DEPRECATED( + "Please use MTRFanControlFanModeOn", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x04, + MTRFanControlFanModeTypeAuto MTR_DEPRECATED( + "Please use MTRFanControlFanModeAuto", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x05, + MTRFanControlFanModeTypeSmart MTR_DEPRECATED( + "Please use MTRFanControlFanModeSmart", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x06, +} MTR_DEPRECATED("Please use MTRFanControlFanMode", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); typedef NS_ENUM(uint8_t, MTRFanControlFanModeSequence) { - MTRFanControlFanModeSequenceOffLowMedHigh MTR_NEWLY_AVAILABLE = 0x00, - MTRFanControlFanModeSequenceOffLowHigh MTR_NEWLY_AVAILABLE = 0x01, - MTRFanControlFanModeSequenceOffLowMedHighAuto MTR_NEWLY_AVAILABLE = 0x02, - MTRFanControlFanModeSequenceOffLowHighAuto MTR_NEWLY_AVAILABLE = 0x03, - MTRFanControlFanModeSequenceOffOnAuto MTR_NEWLY_AVAILABLE = 0x04, - MTRFanControlFanModeSequenceOffOn MTR_NEWLY_AVAILABLE = 0x05, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRFanControlStepDirection) { - MTRFanControlStepDirectionIncrease MTR_NEWLY_AVAILABLE = 0x00, - MTRFanControlStepDirectionDecrease MTR_NEWLY_AVAILABLE = 0x01, -} MTR_NEWLY_AVAILABLE; + MTRFanControlFanModeSequenceOffLowMedHigh API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, + MTRFanControlFanModeSequenceOffLowHigh API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRFanControlFanModeSequenceOffLowMedHighAuto API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRFanControlFanModeSequenceOffLowHighAuto API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, + MTRFanControlFanModeSequenceOffOnAuto API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, + MTRFanControlFanModeSequenceOffOn API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + +typedef NS_ENUM(uint8_t, MTRFanControlFanModeSequenceType) { + MTRFanControlFanModeSequenceTypeOffLowMedHigh MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffLowMedHigh", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x00, + MTRFanControlFanModeSequenceTypeOffLowHigh MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffLowHigh", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x01, + MTRFanControlFanModeSequenceTypeOffLowMedHighAuto MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffLowMedHighAuto", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x02, + MTRFanControlFanModeSequenceTypeOffLowHighAuto MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffLowHighAuto", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x03, + MTRFanControlFanModeSequenceTypeOffOnAuto MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffOnAuto", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x04, + MTRFanControlFanModeSequenceTypeOffOn MTR_DEPRECATED( + "Please use MTRFanControlFanModeSequenceOffOn", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x05, +} MTR_DEPRECATED("Please use MTRFanControlFanModeSequence", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), + tvos(16.1, 17.0)); typedef NS_OPTIONS(uint32_t, MTRFanControlFeature) { MTRFanControlFeatureMultiSpeed API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, MTRFanControlFeatureAuto API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, MTRFanControlFeatureRocking API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, MTRFanControlFeatureWind API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRFanControlFeatureStep MTR_NEWLY_AVAILABLE = 0x10, - MTRFanControlFeatureAirflowDirection MTR_NEWLY_AVAILABLE = 0x20, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint8_t, MTRFanControlRockBitmap) { - MTRFanControlRockBitmapRockLeftRight MTR_NEWLY_AVAILABLE = 0x1, - MTRFanControlRockBitmapRockUpDown MTR_NEWLY_AVAILABLE = 0x2, - MTRFanControlRockBitmapRockRound MTR_NEWLY_AVAILABLE = 0x4, -} MTR_NEWLY_AVAILABLE; + MTRFanControlRockBitmapRockLeftRight API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, + MTRFanControlRockBitmapRockUpDown API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x2, + MTRFanControlRockBitmapRockRound API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x4, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + +typedef NS_OPTIONS(uint8_t, MTRFanControlRockSupportMask) { + MTRFanControlRockSupportMaskRockLeftRight MTR_DEPRECATED( + "Please use MTRFanControlRockBitmapRockLeftRight", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x1, + MTRFanControlRockSupportMaskRockUpDown MTR_DEPRECATED( + "Please use MTRFanControlRockBitmapRockUpDown", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x2, + MTRFanControlRockSupportMaskRockRound MTR_DEPRECATED( + "Please use MTRFanControlRockBitmapRockRound", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x4, +} MTR_DEPRECATED("Please use MTRFanControlRockBitmap", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); typedef NS_OPTIONS(uint8_t, MTRFanControlWindBitmap) { - MTRFanControlWindBitmapSleepWind MTR_NEWLY_AVAILABLE = 0x1, - MTRFanControlWindBitmapNaturalWind MTR_NEWLY_AVAILABLE = 0x2, -} MTR_NEWLY_AVAILABLE; + MTRFanControlWindBitmapSleepWind API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, + MTRFanControlWindBitmapNaturalWind API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x2, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + +typedef NS_OPTIONS(uint8_t, MTRFanControlWindSupportMask) { + MTRFanControlWindSupportMaskSleepWind MTR_DEPRECATED( + "Please use MTRFanControlWindBitmapSleepWind", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x1, + MTRFanControlWindSupportMaskNaturalWind MTR_DEPRECATED( + "Please use MTRFanControlWindBitmapNaturalWind", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) + = 0x2, +} MTR_DEPRECATED("Please use MTRFanControlWindBitmap", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); typedef NS_ENUM(uint8_t, MTRColorControlColorLoopAction) { MTRColorControlColorLoopActionDeactivate API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, @@ -25659,17 +21408,18 @@ typedef NS_ENUM(uint8_t, MTRIlluminanceMeasurementLightSensorType) { } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint32_t, MTRPressureMeasurementFeature) { - MTRPressureMeasurementFeatureExtended MTR_NEWLY_AVAILABLE = 0x1, -} MTR_NEWLY_AVAILABLE; + MTRPressureMeasurementFeatureExtended API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, +} API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_OPTIONS(uint32_t, MTRPressureMeasurementPressureFeature) { - MTRPressureMeasurementPressureFeatureExtended API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - MTR_NEWLY_DEPRECATED("Please use MTRPressureMeasurementFeatureExtended") + MTRPressureMeasurementPressureFeatureExtended MTR_DEPRECATED("Please use MTRPressureMeasurementFeatureExtended", + ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x1, MTRPressureMeasurementPressureFeatureEXT MTR_DEPRECATED( "Please use MTRPressureMeasurementFeatureExtended", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_NEWLY_DEPRECATED("Please use MTRPressureMeasurementFeature"); +} MTR_DEPRECATED("Please use MTRPressureMeasurementFeature", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), + tvos(16.1, 17.0)); typedef NS_ENUM(uint8_t, MTROccupancySensingOccupancySensorType) { MTROccupancySensingOccupancySensorTypePIR API_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, @@ -25689,346 +21439,6 @@ typedef NS_OPTIONS(uint8_t, MTROccupancySensingOccupancySensorTypeBitmap) { = 0x4, } API_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -typedef NS_ENUM(uint8_t, MTRCarbonMonoxideConcentrationMeasurementLevelValue) { - MTRCarbonMonoxideConcentrationMeasurementLevelValueUnknown MTR_NEWLY_AVAILABLE = 0x00, - MTRCarbonMonoxideConcentrationMeasurementLevelValueLow MTR_NEWLY_AVAILABLE = 0x01, - MTRCarbonMonoxideConcentrationMeasurementLevelValueMedium MTR_NEWLY_AVAILABLE = 0x02, - MTRCarbonMonoxideConcentrationMeasurementLevelValueHigh MTR_NEWLY_AVAILABLE = 0x03, - MTRCarbonMonoxideConcentrationMeasurementLevelValueCritical MTR_NEWLY_AVAILABLE = 0x04, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRCarbonMonoxideConcentrationMeasurementMeasurementMedium) { - MTRCarbonMonoxideConcentrationMeasurementMeasurementMediumAir MTR_NEWLY_AVAILABLE = 0x00, - MTRCarbonMonoxideConcentrationMeasurementMeasurementMediumWater MTR_NEWLY_AVAILABLE = 0x01, - MTRCarbonMonoxideConcentrationMeasurementMeasurementMediumSoil MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRCarbonMonoxideConcentrationMeasurementMeasurementUnit) { - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitPPM MTR_NEWLY_AVAILABLE = 0x00, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitPPB MTR_NEWLY_AVAILABLE = 0x01, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitPPT MTR_NEWLY_AVAILABLE = 0x02, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitMGM3 MTR_NEWLY_AVAILABLE = 0x03, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitUGM3 MTR_NEWLY_AVAILABLE = 0x04, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitNGM3 MTR_NEWLY_AVAILABLE = 0x05, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitPM3 MTR_NEWLY_AVAILABLE = 0x06, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitBQM3 MTR_NEWLY_AVAILABLE = 0x07, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRCarbonMonoxideConcentrationMeasurementFeature) { - MTRCarbonMonoxideConcentrationMeasurementFeatureNumericMeasurement MTR_NEWLY_AVAILABLE = 0x1, - MTRCarbonMonoxideConcentrationMeasurementFeatureLevelIndication MTR_NEWLY_AVAILABLE = 0x2, - MTRCarbonMonoxideConcentrationMeasurementFeatureMediumLevel MTR_NEWLY_AVAILABLE = 0x4, - MTRCarbonMonoxideConcentrationMeasurementFeatureCriticalLevel MTR_NEWLY_AVAILABLE = 0x8, - MTRCarbonMonoxideConcentrationMeasurementFeaturePeakMeasurement MTR_NEWLY_AVAILABLE = 0x10, - MTRCarbonMonoxideConcentrationMeasurementFeatureAverageMeasurement MTR_NEWLY_AVAILABLE = 0x20, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRCarbonDioxideConcentrationMeasurementLevelValue) { - MTRCarbonDioxideConcentrationMeasurementLevelValueUnknown MTR_NEWLY_AVAILABLE = 0x00, - MTRCarbonDioxideConcentrationMeasurementLevelValueLow MTR_NEWLY_AVAILABLE = 0x01, - MTRCarbonDioxideConcentrationMeasurementLevelValueMedium MTR_NEWLY_AVAILABLE = 0x02, - MTRCarbonDioxideConcentrationMeasurementLevelValueHigh MTR_NEWLY_AVAILABLE = 0x03, - MTRCarbonDioxideConcentrationMeasurementLevelValueCritical MTR_NEWLY_AVAILABLE = 0x04, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRCarbonDioxideConcentrationMeasurementMeasurementMedium) { - MTRCarbonDioxideConcentrationMeasurementMeasurementMediumAir MTR_NEWLY_AVAILABLE = 0x00, - MTRCarbonDioxideConcentrationMeasurementMeasurementMediumWater MTR_NEWLY_AVAILABLE = 0x01, - MTRCarbonDioxideConcentrationMeasurementMeasurementMediumSoil MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRCarbonDioxideConcentrationMeasurementMeasurementUnit) { - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitPPM MTR_NEWLY_AVAILABLE = 0x00, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitPPB MTR_NEWLY_AVAILABLE = 0x01, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitPPT MTR_NEWLY_AVAILABLE = 0x02, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitMGM3 MTR_NEWLY_AVAILABLE = 0x03, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitUGM3 MTR_NEWLY_AVAILABLE = 0x04, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitNGM3 MTR_NEWLY_AVAILABLE = 0x05, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitPM3 MTR_NEWLY_AVAILABLE = 0x06, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitBQM3 MTR_NEWLY_AVAILABLE = 0x07, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRCarbonDioxideConcentrationMeasurementFeature) { - MTRCarbonDioxideConcentrationMeasurementFeatureNumericMeasurement MTR_NEWLY_AVAILABLE = 0x1, - MTRCarbonDioxideConcentrationMeasurementFeatureLevelIndication MTR_NEWLY_AVAILABLE = 0x2, - MTRCarbonDioxideConcentrationMeasurementFeatureMediumLevel MTR_NEWLY_AVAILABLE = 0x4, - MTRCarbonDioxideConcentrationMeasurementFeatureCriticalLevel MTR_NEWLY_AVAILABLE = 0x8, - MTRCarbonDioxideConcentrationMeasurementFeaturePeakMeasurement MTR_NEWLY_AVAILABLE = 0x10, - MTRCarbonDioxideConcentrationMeasurementFeatureAverageMeasurement MTR_NEWLY_AVAILABLE = 0x20, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRNitrogenDioxideConcentrationMeasurementLevelValue) { - MTRNitrogenDioxideConcentrationMeasurementLevelValueUnknown MTR_NEWLY_AVAILABLE = 0x00, - MTRNitrogenDioxideConcentrationMeasurementLevelValueLow MTR_NEWLY_AVAILABLE = 0x01, - MTRNitrogenDioxideConcentrationMeasurementLevelValueMedium MTR_NEWLY_AVAILABLE = 0x02, - MTRNitrogenDioxideConcentrationMeasurementLevelValueHigh MTR_NEWLY_AVAILABLE = 0x03, - MTRNitrogenDioxideConcentrationMeasurementLevelValueCritical MTR_NEWLY_AVAILABLE = 0x04, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRNitrogenDioxideConcentrationMeasurementMeasurementMedium) { - MTRNitrogenDioxideConcentrationMeasurementMeasurementMediumAir MTR_NEWLY_AVAILABLE = 0x00, - MTRNitrogenDioxideConcentrationMeasurementMeasurementMediumWater MTR_NEWLY_AVAILABLE = 0x01, - MTRNitrogenDioxideConcentrationMeasurementMeasurementMediumSoil MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRNitrogenDioxideConcentrationMeasurementMeasurementUnit) { - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitPPM MTR_NEWLY_AVAILABLE = 0x00, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitPPB MTR_NEWLY_AVAILABLE = 0x01, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitPPT MTR_NEWLY_AVAILABLE = 0x02, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitMGM3 MTR_NEWLY_AVAILABLE = 0x03, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitUGM3 MTR_NEWLY_AVAILABLE = 0x04, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitNGM3 MTR_NEWLY_AVAILABLE = 0x05, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitPM3 MTR_NEWLY_AVAILABLE = 0x06, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitBQM3 MTR_NEWLY_AVAILABLE = 0x07, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRNitrogenDioxideConcentrationMeasurementFeature) { - MTRNitrogenDioxideConcentrationMeasurementFeatureNumericMeasurement MTR_NEWLY_AVAILABLE = 0x1, - MTRNitrogenDioxideConcentrationMeasurementFeatureLevelIndication MTR_NEWLY_AVAILABLE = 0x2, - MTRNitrogenDioxideConcentrationMeasurementFeatureMediumLevel MTR_NEWLY_AVAILABLE = 0x4, - MTRNitrogenDioxideConcentrationMeasurementFeatureCriticalLevel MTR_NEWLY_AVAILABLE = 0x8, - MTRNitrogenDioxideConcentrationMeasurementFeaturePeakMeasurement MTR_NEWLY_AVAILABLE = 0x10, - MTRNitrogenDioxideConcentrationMeasurementFeatureAverageMeasurement MTR_NEWLY_AVAILABLE = 0x20, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTROzoneConcentrationMeasurementLevelValue) { - MTROzoneConcentrationMeasurementLevelValueUnknown MTR_NEWLY_AVAILABLE = 0x00, - MTROzoneConcentrationMeasurementLevelValueLow MTR_NEWLY_AVAILABLE = 0x01, - MTROzoneConcentrationMeasurementLevelValueMedium MTR_NEWLY_AVAILABLE = 0x02, - MTROzoneConcentrationMeasurementLevelValueHigh MTR_NEWLY_AVAILABLE = 0x03, - MTROzoneConcentrationMeasurementLevelValueCritical MTR_NEWLY_AVAILABLE = 0x04, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTROzoneConcentrationMeasurementMeasurementMedium) { - MTROzoneConcentrationMeasurementMeasurementMediumAir MTR_NEWLY_AVAILABLE = 0x00, - MTROzoneConcentrationMeasurementMeasurementMediumWater MTR_NEWLY_AVAILABLE = 0x01, - MTROzoneConcentrationMeasurementMeasurementMediumSoil MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTROzoneConcentrationMeasurementMeasurementUnit) { - MTROzoneConcentrationMeasurementMeasurementUnitPPM MTR_NEWLY_AVAILABLE = 0x00, - MTROzoneConcentrationMeasurementMeasurementUnitPPB MTR_NEWLY_AVAILABLE = 0x01, - MTROzoneConcentrationMeasurementMeasurementUnitPPT MTR_NEWLY_AVAILABLE = 0x02, - MTROzoneConcentrationMeasurementMeasurementUnitMGM3 MTR_NEWLY_AVAILABLE = 0x03, - MTROzoneConcentrationMeasurementMeasurementUnitUGM3 MTR_NEWLY_AVAILABLE = 0x04, - MTROzoneConcentrationMeasurementMeasurementUnitNGM3 MTR_NEWLY_AVAILABLE = 0x05, - MTROzoneConcentrationMeasurementMeasurementUnitPM3 MTR_NEWLY_AVAILABLE = 0x06, - MTROzoneConcentrationMeasurementMeasurementUnitBQM3 MTR_NEWLY_AVAILABLE = 0x07, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTROzoneConcentrationMeasurementFeature) { - MTROzoneConcentrationMeasurementFeatureNumericMeasurement MTR_NEWLY_AVAILABLE = 0x1, - MTROzoneConcentrationMeasurementFeatureLevelIndication MTR_NEWLY_AVAILABLE = 0x2, - MTROzoneConcentrationMeasurementFeatureMediumLevel MTR_NEWLY_AVAILABLE = 0x4, - MTROzoneConcentrationMeasurementFeatureCriticalLevel MTR_NEWLY_AVAILABLE = 0x8, - MTROzoneConcentrationMeasurementFeaturePeakMeasurement MTR_NEWLY_AVAILABLE = 0x10, - MTROzoneConcentrationMeasurementFeatureAverageMeasurement MTR_NEWLY_AVAILABLE = 0x20, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRPM25ConcentrationMeasurementLevelValue) { - MTRPM25ConcentrationMeasurementLevelValueUnknown MTR_NEWLY_AVAILABLE = 0x00, - MTRPM25ConcentrationMeasurementLevelValueLow MTR_NEWLY_AVAILABLE = 0x01, - MTRPM25ConcentrationMeasurementLevelValueMedium MTR_NEWLY_AVAILABLE = 0x02, - MTRPM25ConcentrationMeasurementLevelValueHigh MTR_NEWLY_AVAILABLE = 0x03, - MTRPM25ConcentrationMeasurementLevelValueCritical MTR_NEWLY_AVAILABLE = 0x04, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRPM25ConcentrationMeasurementMeasurementMedium) { - MTRPM25ConcentrationMeasurementMeasurementMediumAir MTR_NEWLY_AVAILABLE = 0x00, - MTRPM25ConcentrationMeasurementMeasurementMediumWater MTR_NEWLY_AVAILABLE = 0x01, - MTRPM25ConcentrationMeasurementMeasurementMediumSoil MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRPM25ConcentrationMeasurementMeasurementUnit) { - MTRPM25ConcentrationMeasurementMeasurementUnitPPM MTR_NEWLY_AVAILABLE = 0x00, - MTRPM25ConcentrationMeasurementMeasurementUnitPPB MTR_NEWLY_AVAILABLE = 0x01, - MTRPM25ConcentrationMeasurementMeasurementUnitPPT MTR_NEWLY_AVAILABLE = 0x02, - MTRPM25ConcentrationMeasurementMeasurementUnitMGM3 MTR_NEWLY_AVAILABLE = 0x03, - MTRPM25ConcentrationMeasurementMeasurementUnitUGM3 MTR_NEWLY_AVAILABLE = 0x04, - MTRPM25ConcentrationMeasurementMeasurementUnitNGM3 MTR_NEWLY_AVAILABLE = 0x05, - MTRPM25ConcentrationMeasurementMeasurementUnitPM3 MTR_NEWLY_AVAILABLE = 0x06, - MTRPM25ConcentrationMeasurementMeasurementUnitBQM3 MTR_NEWLY_AVAILABLE = 0x07, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRPM25ConcentrationMeasurementFeature) { - MTRPM25ConcentrationMeasurementFeatureNumericMeasurement MTR_NEWLY_AVAILABLE = 0x1, - MTRPM25ConcentrationMeasurementFeatureLevelIndication MTR_NEWLY_AVAILABLE = 0x2, - MTRPM25ConcentrationMeasurementFeatureMediumLevel MTR_NEWLY_AVAILABLE = 0x4, - MTRPM25ConcentrationMeasurementFeatureCriticalLevel MTR_NEWLY_AVAILABLE = 0x8, - MTRPM25ConcentrationMeasurementFeaturePeakMeasurement MTR_NEWLY_AVAILABLE = 0x10, - MTRPM25ConcentrationMeasurementFeatureAverageMeasurement MTR_NEWLY_AVAILABLE = 0x20, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRFormaldehydeConcentrationMeasurementLevelValue) { - MTRFormaldehydeConcentrationMeasurementLevelValueUnknown MTR_NEWLY_AVAILABLE = 0x00, - MTRFormaldehydeConcentrationMeasurementLevelValueLow MTR_NEWLY_AVAILABLE = 0x01, - MTRFormaldehydeConcentrationMeasurementLevelValueMedium MTR_NEWLY_AVAILABLE = 0x02, - MTRFormaldehydeConcentrationMeasurementLevelValueHigh MTR_NEWLY_AVAILABLE = 0x03, - MTRFormaldehydeConcentrationMeasurementLevelValueCritical MTR_NEWLY_AVAILABLE = 0x04, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRFormaldehydeConcentrationMeasurementMeasurementMedium) { - MTRFormaldehydeConcentrationMeasurementMeasurementMediumAir MTR_NEWLY_AVAILABLE = 0x00, - MTRFormaldehydeConcentrationMeasurementMeasurementMediumWater MTR_NEWLY_AVAILABLE = 0x01, - MTRFormaldehydeConcentrationMeasurementMeasurementMediumSoil MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRFormaldehydeConcentrationMeasurementMeasurementUnit) { - MTRFormaldehydeConcentrationMeasurementMeasurementUnitPPM MTR_NEWLY_AVAILABLE = 0x00, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitPPB MTR_NEWLY_AVAILABLE = 0x01, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitPPT MTR_NEWLY_AVAILABLE = 0x02, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitMGM3 MTR_NEWLY_AVAILABLE = 0x03, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitUGM3 MTR_NEWLY_AVAILABLE = 0x04, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitNGM3 MTR_NEWLY_AVAILABLE = 0x05, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitPM3 MTR_NEWLY_AVAILABLE = 0x06, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitBQM3 MTR_NEWLY_AVAILABLE = 0x07, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRFormaldehydeConcentrationMeasurementFeature) { - MTRFormaldehydeConcentrationMeasurementFeatureNumericMeasurement MTR_NEWLY_AVAILABLE = 0x1, - MTRFormaldehydeConcentrationMeasurementFeatureLevelIndication MTR_NEWLY_AVAILABLE = 0x2, - MTRFormaldehydeConcentrationMeasurementFeatureMediumLevel MTR_NEWLY_AVAILABLE = 0x4, - MTRFormaldehydeConcentrationMeasurementFeatureCriticalLevel MTR_NEWLY_AVAILABLE = 0x8, - MTRFormaldehydeConcentrationMeasurementFeaturePeakMeasurement MTR_NEWLY_AVAILABLE = 0x10, - MTRFormaldehydeConcentrationMeasurementFeatureAverageMeasurement MTR_NEWLY_AVAILABLE = 0x20, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRPM1ConcentrationMeasurementLevelValue) { - MTRPM1ConcentrationMeasurementLevelValueUnknown MTR_NEWLY_AVAILABLE = 0x00, - MTRPM1ConcentrationMeasurementLevelValueLow MTR_NEWLY_AVAILABLE = 0x01, - MTRPM1ConcentrationMeasurementLevelValueMedium MTR_NEWLY_AVAILABLE = 0x02, - MTRPM1ConcentrationMeasurementLevelValueHigh MTR_NEWLY_AVAILABLE = 0x03, - MTRPM1ConcentrationMeasurementLevelValueCritical MTR_NEWLY_AVAILABLE = 0x04, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRPM1ConcentrationMeasurementMeasurementMedium) { - MTRPM1ConcentrationMeasurementMeasurementMediumAir MTR_NEWLY_AVAILABLE = 0x00, - MTRPM1ConcentrationMeasurementMeasurementMediumWater MTR_NEWLY_AVAILABLE = 0x01, - MTRPM1ConcentrationMeasurementMeasurementMediumSoil MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRPM1ConcentrationMeasurementMeasurementUnit) { - MTRPM1ConcentrationMeasurementMeasurementUnitPPM MTR_NEWLY_AVAILABLE = 0x00, - MTRPM1ConcentrationMeasurementMeasurementUnitPPB MTR_NEWLY_AVAILABLE = 0x01, - MTRPM1ConcentrationMeasurementMeasurementUnitPPT MTR_NEWLY_AVAILABLE = 0x02, - MTRPM1ConcentrationMeasurementMeasurementUnitMGM3 MTR_NEWLY_AVAILABLE = 0x03, - MTRPM1ConcentrationMeasurementMeasurementUnitUGM3 MTR_NEWLY_AVAILABLE = 0x04, - MTRPM1ConcentrationMeasurementMeasurementUnitNGM3 MTR_NEWLY_AVAILABLE = 0x05, - MTRPM1ConcentrationMeasurementMeasurementUnitPM3 MTR_NEWLY_AVAILABLE = 0x06, - MTRPM1ConcentrationMeasurementMeasurementUnitBQM3 MTR_NEWLY_AVAILABLE = 0x07, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRPM1ConcentrationMeasurementFeature) { - MTRPM1ConcentrationMeasurementFeatureNumericMeasurement MTR_NEWLY_AVAILABLE = 0x1, - MTRPM1ConcentrationMeasurementFeatureLevelIndication MTR_NEWLY_AVAILABLE = 0x2, - MTRPM1ConcentrationMeasurementFeatureMediumLevel MTR_NEWLY_AVAILABLE = 0x4, - MTRPM1ConcentrationMeasurementFeatureCriticalLevel MTR_NEWLY_AVAILABLE = 0x8, - MTRPM1ConcentrationMeasurementFeaturePeakMeasurement MTR_NEWLY_AVAILABLE = 0x10, - MTRPM1ConcentrationMeasurementFeatureAverageMeasurement MTR_NEWLY_AVAILABLE = 0x20, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRPM10ConcentrationMeasurementLevelValue) { - MTRPM10ConcentrationMeasurementLevelValueUnknown MTR_NEWLY_AVAILABLE = 0x00, - MTRPM10ConcentrationMeasurementLevelValueLow MTR_NEWLY_AVAILABLE = 0x01, - MTRPM10ConcentrationMeasurementLevelValueMedium MTR_NEWLY_AVAILABLE = 0x02, - MTRPM10ConcentrationMeasurementLevelValueHigh MTR_NEWLY_AVAILABLE = 0x03, - MTRPM10ConcentrationMeasurementLevelValueCritical MTR_NEWLY_AVAILABLE = 0x04, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRPM10ConcentrationMeasurementMeasurementMedium) { - MTRPM10ConcentrationMeasurementMeasurementMediumAir MTR_NEWLY_AVAILABLE = 0x00, - MTRPM10ConcentrationMeasurementMeasurementMediumWater MTR_NEWLY_AVAILABLE = 0x01, - MTRPM10ConcentrationMeasurementMeasurementMediumSoil MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRPM10ConcentrationMeasurementMeasurementUnit) { - MTRPM10ConcentrationMeasurementMeasurementUnitPPM MTR_NEWLY_AVAILABLE = 0x00, - MTRPM10ConcentrationMeasurementMeasurementUnitPPB MTR_NEWLY_AVAILABLE = 0x01, - MTRPM10ConcentrationMeasurementMeasurementUnitPPT MTR_NEWLY_AVAILABLE = 0x02, - MTRPM10ConcentrationMeasurementMeasurementUnitMGM3 MTR_NEWLY_AVAILABLE = 0x03, - MTRPM10ConcentrationMeasurementMeasurementUnitUGM3 MTR_NEWLY_AVAILABLE = 0x04, - MTRPM10ConcentrationMeasurementMeasurementUnitNGM3 MTR_NEWLY_AVAILABLE = 0x05, - MTRPM10ConcentrationMeasurementMeasurementUnitPM3 MTR_NEWLY_AVAILABLE = 0x06, - MTRPM10ConcentrationMeasurementMeasurementUnitBQM3 MTR_NEWLY_AVAILABLE = 0x07, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRPM10ConcentrationMeasurementFeature) { - MTRPM10ConcentrationMeasurementFeatureNumericMeasurement MTR_NEWLY_AVAILABLE = 0x1, - MTRPM10ConcentrationMeasurementFeatureLevelIndication MTR_NEWLY_AVAILABLE = 0x2, - MTRPM10ConcentrationMeasurementFeatureMediumLevel MTR_NEWLY_AVAILABLE = 0x4, - MTRPM10ConcentrationMeasurementFeatureCriticalLevel MTR_NEWLY_AVAILABLE = 0x8, - MTRPM10ConcentrationMeasurementFeaturePeakMeasurement MTR_NEWLY_AVAILABLE = 0x10, - MTRPM10ConcentrationMeasurementFeatureAverageMeasurement MTR_NEWLY_AVAILABLE = 0x20, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue) { - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueUnknown MTR_NEWLY_AVAILABLE = 0x00, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueLow MTR_NEWLY_AVAILABLE = 0x01, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueMedium MTR_NEWLY_AVAILABLE = 0x02, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueHigh MTR_NEWLY_AVAILABLE = 0x03, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueCritical MTR_NEWLY_AVAILABLE = 0x04, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium) { - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMediumAir MTR_NEWLY_AVAILABLE = 0x00, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMediumWater MTR_NEWLY_AVAILABLE = 0x01, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMediumSoil MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit) { - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitPPM MTR_NEWLY_AVAILABLE = 0x00, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitPPB MTR_NEWLY_AVAILABLE = 0x01, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitPPT MTR_NEWLY_AVAILABLE = 0x02, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitMGM3 MTR_NEWLY_AVAILABLE = 0x03, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitUGM3 MTR_NEWLY_AVAILABLE = 0x04, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitNGM3 MTR_NEWLY_AVAILABLE = 0x05, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitPM3 MTR_NEWLY_AVAILABLE = 0x06, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitBQM3 MTR_NEWLY_AVAILABLE = 0x07, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeature) { - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureNumericMeasurement MTR_NEWLY_AVAILABLE = 0x1, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureLevelIndication MTR_NEWLY_AVAILABLE = 0x2, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMediumLevel MTR_NEWLY_AVAILABLE = 0x4, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureCriticalLevel MTR_NEWLY_AVAILABLE = 0x8, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeaturePeakMeasurement MTR_NEWLY_AVAILABLE = 0x10, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureAverageMeasurement MTR_NEWLY_AVAILABLE = 0x20, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRRadonConcentrationMeasurementLevelValue) { - MTRRadonConcentrationMeasurementLevelValueUnknown MTR_NEWLY_AVAILABLE = 0x00, - MTRRadonConcentrationMeasurementLevelValueLow MTR_NEWLY_AVAILABLE = 0x01, - MTRRadonConcentrationMeasurementLevelValueMedium MTR_NEWLY_AVAILABLE = 0x02, - MTRRadonConcentrationMeasurementLevelValueHigh MTR_NEWLY_AVAILABLE = 0x03, - MTRRadonConcentrationMeasurementLevelValueCritical MTR_NEWLY_AVAILABLE = 0x04, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRRadonConcentrationMeasurementMeasurementMedium) { - MTRRadonConcentrationMeasurementMeasurementMediumAir MTR_NEWLY_AVAILABLE = 0x00, - MTRRadonConcentrationMeasurementMeasurementMediumWater MTR_NEWLY_AVAILABLE = 0x01, - MTRRadonConcentrationMeasurementMeasurementMediumSoil MTR_NEWLY_AVAILABLE = 0x02, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRRadonConcentrationMeasurementMeasurementUnit) { - MTRRadonConcentrationMeasurementMeasurementUnitPPM MTR_NEWLY_AVAILABLE = 0x00, - MTRRadonConcentrationMeasurementMeasurementUnitPPB MTR_NEWLY_AVAILABLE = 0x01, - MTRRadonConcentrationMeasurementMeasurementUnitPPT MTR_NEWLY_AVAILABLE = 0x02, - MTRRadonConcentrationMeasurementMeasurementUnitMGM3 MTR_NEWLY_AVAILABLE = 0x03, - MTRRadonConcentrationMeasurementMeasurementUnitUGM3 MTR_NEWLY_AVAILABLE = 0x04, - MTRRadonConcentrationMeasurementMeasurementUnitNGM3 MTR_NEWLY_AVAILABLE = 0x05, - MTRRadonConcentrationMeasurementMeasurementUnitPM3 MTR_NEWLY_AVAILABLE = 0x06, - MTRRadonConcentrationMeasurementMeasurementUnitBQM3 MTR_NEWLY_AVAILABLE = 0x07, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRRadonConcentrationMeasurementFeature) { - MTRRadonConcentrationMeasurementFeatureNumericMeasurement MTR_NEWLY_AVAILABLE = 0x1, - MTRRadonConcentrationMeasurementFeatureLevelIndication MTR_NEWLY_AVAILABLE = 0x2, - MTRRadonConcentrationMeasurementFeatureMediumLevel MTR_NEWLY_AVAILABLE = 0x4, - MTRRadonConcentrationMeasurementFeatureCriticalLevel MTR_NEWLY_AVAILABLE = 0x8, - MTRRadonConcentrationMeasurementFeaturePeakMeasurement MTR_NEWLY_AVAILABLE = 0x10, - MTRRadonConcentrationMeasurementFeatureAverageMeasurement MTR_NEWLY_AVAILABLE = 0x20, -} MTR_NEWLY_AVAILABLE; - typedef NS_ENUM(uint8_t, MTRChannelStatus) { MTRChannelStatusSuccess API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, MTRChannelStatusMultipleMatches API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 5f7a3297a5deac..bb6135a5cc8d2c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -346,49 +346,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Identify::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Identify::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRIdentifyEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(IdentifyEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Identify::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -1239,49 +1196,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Groups::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Groups::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRGroupsEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(GroupsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Groups::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -2478,93 +2392,6 @@ + (void)readAttributeLastConfiguredByWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Scenes::Attributes::SceneTableSize::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::SceneTableSize::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeSceneTableSizeWithClusterStateCache:(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 = Scenes::Attributes::SceneTableSize::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)readAttributeRemainingCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeRemainingCapacityWithClusterStateCache:(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 = Scenes::Attributes::RemainingCapacity::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]; @@ -2655,49 +2482,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Scenes::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRScenesEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(ScenesEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -4084,49 +3868,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OnOff::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OnOff::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTROnOffEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(OnOffEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -5004,49 +4745,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OnOffSwitchConfigurationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -6896,49 +6594,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRLevelControlEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(LevelControlEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -8736,49 +8391,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRBinaryInputBasicEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BinaryInputBasicEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -9862,49 +9474,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRDescriptorEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(DescriptorEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -10656,49 +10225,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Binding::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Binding::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRBindingEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BindingEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Binding::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -11642,49 +11168,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRAccessControlEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(AccessControlEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -13010,49 +12493,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Actions::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Actions::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRActionsEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(ActionsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Actions::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -14777,49 +14217,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRBasicInformationEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BasicInformationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -16350,49 +15747,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OTASoftwareUpdateProviderEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -17176,49 +16530,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OTASoftwareUpdateRequestorEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -18010,49 +17321,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRLocalizationConfigurationEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(LocalizationConfigurationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -18827,49 +18095,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRTimeFormatLocalizationEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TimeFormatLocalizationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -19569,49 +18794,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRUnitLocalizationEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(UnitLocalizationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -20176,49 +19358,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRPowerSourceConfigurationEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PowerSourceConfigurationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -22099,49 +21238,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRPowerSourceEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(PowerSourceEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -24360,49 +23456,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRGeneralCommissioningEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(GeneralCommissioningEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -25797,49 +24850,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNetworkCommissioningEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(NetworkCommissioningEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -26778,49 +25788,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRDiagnosticLogsEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(DiagnosticLogsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -27734,49 +26701,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRGeneralDiagnosticsEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(GeneralDiagnosticsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -28861,49 +27785,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SoftwareDiagnosticsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -32381,49 +31262,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ThreadNetworkDiagnosticsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -36312,49 +35150,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WiFiNetworkDiagnosticsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -37827,49 +36622,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(EthernetNetworkDiagnosticsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -39478,49 +38230,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BridgedDeviceBasicInformation::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 MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BridgedDeviceBasicInformationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -40777,49 +39486,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Switch::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Switch::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRSwitchEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(SwitchEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -41678,49 +40344,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRAdministratorCommissioningEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(AdministratorCommissioningEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -42908,49 +41531,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTROperationalCredentialsEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalCredentialsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - 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]; @@ -44186,49 +42766,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRGroupKeyManagementEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(GroupKeyManagementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - 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]; @@ -44956,49 +43493,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FixedLabel::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 = FixedLabel::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 MTRFixedLabelEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FixedLabelEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::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]; @@ -45608,49 +44102,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRUserLabelEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(UserLabelEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - 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]; @@ -46211,49 +44662,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRBooleanStateEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BooleanStateEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -47140,49 +45548,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRModeSelectEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(ModeSelectEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -47828,7 +46193,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterTemperatureControl +@implementation MTRBaseClusterDoorLock - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -47843,8 +46208,7 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -47859,7 +46223,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - TemperatureControl::Commands::SetTemperature::Type request; + DoorLock::Commands::LockDoor::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); @@ -47872,14 +46236,13 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } if (params != nil) { - if (params.targetTemperature != nil) { - auto & definedValue_0 = request.targetTemperature.Emplace(); - definedValue_0 = params.targetTemperature.shortValue; - } - if (params.targetTemperatureLevel != nil) { - auto & definedValue_0 = request.targetTemperatureLevel.Emplace(); - definedValue_0 = params.targetTemperatureLevel.unsignedCharValue; + if (params.pinCode != nil) { + auto & definedValue_0 = request.PINCode.Emplace(); + definedValue_0 = [self asByteSpan:params.pinCode]; } } @@ -47889,392 +46252,753 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::UnlockDoor::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + if (params != nil) { + if (params.pinCode != nil) { + auto & definedValue_0 = request.PINCode.Emplace(); + definedValue_0 = [self asByteSpan:params.pinCode]; + } + } -- (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::UnlockWithTimeout::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.timeout = params.timeout.unsignedShortValue; + if (params.pinCode != nil) { + auto & definedValue_0 = request.PINCode.Emplace(); + definedValue_0 = [self asByteSpan:params.pinCode]; + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params completion:(MTRStatusCompletion)completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::SetWeekDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.weekDayIndex = params.weekDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + request.daysMask = static_cast>(params.daysMask.unsignedCharValue); + request.startHour = params.startHour.unsignedCharValue; + request.startMinute = params.startMinute.unsignedCharValue; + request.endHour = params.endHour.unsignedCharValue; + request.endMinute = params.endMinute.unsignedCharValue; -- (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params + completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::MinTemperature::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + DoorLockClusterGetWeekDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::GetWeekDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.weekDayIndex = params.weekDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params + completion:(MTRStatusCompletion)completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::ClearWeekDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.weekDayIndex = params.weekDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; -- (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::MaxTemperature::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::SetYearDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.yearDayIndex = params.yearDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + request.localStartTime = params.localStartTime.unsignedIntValue; + request.localEndTime = params.localEndTime.unsignedIntValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params + completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + DoorLockClusterGetYearDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::GetYearDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.yearDayIndex = params.yearDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::Step::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::ClearYearDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.yearDayIndex = params.yearDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params completion:(MTRStatusCompletion)completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::SetHolidaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.holidayIndex = params.holidayIndex.unsignedCharValue; + request.localStartTime = params.localStartTime.unsignedIntValue; + request.localEndTime = params.localEndTime.unsignedIntValue; + request.operatingMode + = static_cast>(params.operatingMode.unsignedCharValue); -- (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params + completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + 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 = TemperatureControl::Attributes::SelectedTemperatureLevel::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + DoorLockClusterGetHolidayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::GetHolidaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.holidayIndex = params.holidayIndex.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params + completion:(MTRStatusCompletion)completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::ClearHolidaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.holidayIndex = params.holidayIndex.unsignedCharValue; -- (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeSupportedTemperatureLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TemperatureControlSupportedTemperatureLevelsListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::SetUser::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.operationType + = static_cast>(params.operationType.unsignedCharValue); + request.userIndex = params.userIndex.unsignedShortValue; + if (params.userName == nil) { + request.userName.SetNull(); + } else { + auto & nonNullValue_0 = request.userName.SetNonNull(); + nonNullValue_0 = [self asCharSpan:params.userName]; + } + if (params.userUniqueID == nil) { + request.userUniqueID.SetNull(); + } else { + auto & nonNullValue_0 = request.userUniqueID.SetNonNull(); + nonNullValue_0 = params.userUniqueID.unsignedIntValue; + } + if (params.userStatus == nil) { + request.userStatus.SetNull(); + } else { + auto & nonNullValue_0 = request.userStatus.SetNonNull(); + nonNullValue_0 + = static_cast>(params.userStatus.unsignedCharValue); + } + if (params.userType == nil) { + request.userType.SetNull(); + } else { + auto & nonNullValue_0 = request.userType.SetNonNull(); + nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); + } + if (params.credentialRule == nil) { + request.credentialRule.SetNull(); + } else { + auto & nonNullValue_0 = request.credentialRule.SetNonNull(); + nonNullValue_0 + = static_cast>(params.credentialRule.unsignedCharValue); + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params + completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRDoorLockClusterGetUserResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoorLockClusterGetUserResponseCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::GetUser::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.userIndex = params.userIndex.unsignedShortValue; -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRTemperatureControlGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TemperatureControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::ClearUser::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.userIndex = params.userIndex.unsignedShortValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params + completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRDoorLockClusterSetCredentialResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + DoorLockClusterSetCredentialResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::SetCredential::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.operationType + = static_cast>(params.operationType.unsignedCharValue); + request.credential.credentialType = static_cast>( + params.credential.credentialType.unsignedCharValue); + request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; + request.credentialData = [self asByteSpan:params.credentialData]; + if (params.userIndex == nil) { + request.userIndex.SetNull(); + } else { + auto & nonNullValue_0 = request.userIndex.SetNonNull(); + nonNullValue_0 = params.userIndex.unsignedShortValue; + } + if (params.userStatus == nil) { + request.userStatus.SetNull(); + } else { + auto & nonNullValue_0 = request.userStatus.SetNonNull(); + nonNullValue_0 + = static_cast>(params.userStatus.unsignedCharValue); + } + if (params.userType == nil) { + request.userType.SetNull(); + } else { + auto & nonNullValue_0 = request.userType.SetNonNull(); + nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); + } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params + completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completion { - auto * bridge = new MTRTemperatureControlAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TemperatureControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + DoorLockClusterGetCredentialStatusResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::GetCredentialStatus::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.credential.credentialType = static_cast>( + params.credential.credentialType.unsignedCharValue); + request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::ClearCredential::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + if (params.credential == nil) { + request.credential.SetNull(); + } else { + auto & nonNullValue_0 = request.credential.SetNonNull(); + nonNullValue_0.credentialType = static_cast>( + params.credential.credentialType.unsignedCharValue); + nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeLockStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTemperatureControlEventListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TemperatureControlEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(NullableDoorLockClusterDlLockStateAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48289,35 +47013,35 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLockTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTemperatureControlAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TemperatureControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(DoorLockClusterDlLockTypeAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48332,35 +47056,36 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActuatorEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48375,36 +47100,35 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDoorStateWithClusterStateCache:(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) { + auto * bridge = new MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(NullableDoorLockClusterDoorStateEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48419,52 +47143,72 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC }); } -@end - -@implementation MTRBaseClusterRefrigeratorAlarm - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + 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 = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDoorOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRRefrigeratorAlarmMaskAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(RefrigeratorAlarmMaskAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48479,35 +47223,73 @@ + (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *) }); } -- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDoorClosedEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRRefrigeratorAlarmStateAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(RefrigeratorAlarmStateAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48522,35 +47304,72 @@ + (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer * }); } -- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + [self writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRRefrigeratorAlarmSupportedAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RefrigeratorAlarmSupportedAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48565,37 +47384,38 @@ + (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRRefrigeratorAlarmGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RefrigeratorAlarmGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48610,37 +47430,38 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfPINUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRRefrigeratorAlarmAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RefrigeratorAlarmAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48655,35 +47476,38 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::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 +- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::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 ++ (void)readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRRefrigeratorAlarmEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RefrigeratorAlarmEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48698,35 +47522,40 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRRefrigeratorAlarmAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RefrigeratorAlarmAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48741,35 +47570,40 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48784,36 +47618,40 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48828,52 +47666,36 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC }); } -@end - -@implementation MTRBaseClusterAirQuality - -- (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)readAttributeAirQualityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAirQualityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAirQualityClusterAirQualityEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(AirQualityClusterAirQualityEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = AirQuality::Attributes::AirQuality::TypeInfo; + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48888,37 +47710,36 @@ + (void)readAttributeAirQualityWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAirQualityGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(AirQualityGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = AirQuality::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48933,37 +47754,36 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAirQualityAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(AirQualityAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = AirQuality::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -48978,35 +47798,36 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::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 +- (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::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 ++ (void)readAttributeMinRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAirQualityEventListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(AirQualityEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49021,35 +47842,38 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute( + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + MTRSubscribeAttribute( params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCredentialRulesSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRAirQualityAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(AirQualityAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(DoorLockCredentialRulesSupportAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49064,35 +47888,40 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49107,36 +47936,72 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeLanguageWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + 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 = DoorLock::Attributes::Language::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLanguageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49151,92 +48016,72 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC }); } -@end - -@implementation MTRBaseClusterSmokeCOAlarm - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)selfTestRequestWithCompletion:(MTRStatusCompletion)completion +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self selfTestRequestWithParams:nil completion:completion]; + [self writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { + ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - SmokeCoAlarm::Commands::SelfTestRequest::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)readAttributeExpressedStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeExpressedStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLEDSettingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SmokeCOAlarmClusterExpressedStateEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49251,78 +48096,72 @@ + (void)readAttributeExpressedStateWithClusterStateCache:(MTRClusterStateCacheCo }); } -- (void)readAttributeSmokeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeSmokeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SmokeCOAlarmClusterAlarmStateEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeCOStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeCOStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAutoRelockTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SmokeCOAlarmClusterAlarmStateEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49337,78 +48176,72 @@ + (void)readAttributeCOStateWithClusterStateCache:(MTRClusterStateCacheContainer }); } -- (void)readAttributeBatteryAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeBatteryAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SmokeCOAlarmClusterAlarmStateEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeDeviceMutedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeDeviceMutedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeSoundVolumeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SmokeCOAlarmClusterMuteStateEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49423,35 +48256,72 @@ + (void)readAttributeDeviceMutedWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeTestInProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -+ (void)readAttributeTestInProgressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(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)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(DoorLockClusterOperatingModeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49466,37 +48336,38 @@ + (void)readAttributeTestInProgressWithClusterStateCache:(MTRClusterStateCacheCo }); } -- (void)readAttributeHardwareFaultAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeHardwareFaultAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedOperatingModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(DoorLockSupportedOperatingModesAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49511,36 +48382,39 @@ + (void)readAttributeHardwareFaultAlertWithClusterStateCache:(MTRClusterStateCac }); } -- (void)readAttributeEndOfServiceAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeEndOfServiceAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultConfigurationRegisterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SmokeCOAlarmClusterEndOfServiceEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(DoorLockDefaultConfigurationRegisterAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49555,38 +48429,75 @@ + (void)readAttributeEndOfServiceAlertWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributeInterconnectSmokeAlarmWithCompletion:(void (^)( +- (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeInterconnectSmokeAlarmWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeEnableLocalProgrammingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SmokeCOAlarmClusterAlarmStateEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49601,82 +48512,74 @@ + (void)readAttributeInterconnectSmokeAlarmWithClusterStateCache:(MTRClusterStat }); } -- (void)readAttributeInterconnectCOAlarmWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeInterconnectCOAlarmWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SmokeCOAlarmClusterAlarmStateEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeContaminationStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeContaminationStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnableOneTouchLockingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SmokeCOAlarmClusterContaminationStateEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49691,21 +48594,21 @@ + (void)readAttributeContaminationStateWithClusterStateCache:(MTRClusterStateCac }); } -- (void)readAttributeSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::SensitivityLevel::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -49726,9 +48629,9 @@ - (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value } ListFreer listFreer; - using TypeInfo = SmokeCoAlarm::Attributes::SensitivityLevel::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = value.boolValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -49736,28 +48639,29 @@ - (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::SensitivityLevel::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnableInsideStatusLEDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SmokeCOAlarmClusterSensitivityEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::Attributes::SensitivityLevel::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49772,35 +48676,75 @@ + (void)readAttributeSensitivityLevelWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeExpiryDateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeExpiryDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnablePrivacyModeButtonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49815,37 +48759,75 @@ + (void)readAttributeExpiryDateWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(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)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocalProgrammingFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRSmokeCOAlarmGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SmokeCOAlarmGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(DoorLockLocalProgrammingFeaturesAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49860,37 +48842,74 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeWrongCodeEntryLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSmokeCOAlarmAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SmokeCOAlarmAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49905,78 +48924,76 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::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 +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRSmokeCOAlarmEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(SmokeCOAlarmEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRSmokeCOAlarmAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SmokeCOAlarmAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -49991,79 +49008,73 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)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 = SmokeCoAlarm::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSendPINOverTheAirWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -50078,208 +49089,158 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC }); } -@end - -@implementation MTRBaseClusterOperationalState - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)pauseWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self pauseWithParams:nil completion:completion]; + [self writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Pause::Type request; + 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.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)stopWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - [self stopWithParams:nil completion:completion]; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion + ++ (void)readAttributeRequirePINforRemoteOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Stop::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::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 MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); + return CHIP_ERROR_NOT_FOUND; }); - std::move(*bridge).DispatchAction(self.device); } -- (void)startWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - [self startWithParams:nil completion:completion]; -} -- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Start::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)resumeWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self resumeWithParams:nil completion:completion]; + [self writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Resume::Type request; + 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.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROperationalStatePhaseListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalStatePhaseListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -50294,35 +49255,37 @@ + (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(DoorLockGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -50337,35 +49300,37 @@ + (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheCont }); } -- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(DoorLockAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -50380,37 +49345,35 @@ + (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROperationalStateOperationalStateListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalStateOperationalStateListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRDoorLockAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(DoorLockAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -50425,40 +49388,35 @@ + (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeOperationalStateWithCompletion:(void (^)(MTROperationalStateClusterOperationalStateStruct * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROperationalStateClusterOperationalStateStruct * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(MTROperationalStateClusterOperationalStateStruct * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROperationalStateOperationalStateStructAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalStateOperationalStateStructAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -50473,39 +49431,36 @@ + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; - return MTRReadAttribute( + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROperationalStateOperationalErrorStructAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalStateOperationalErrorStructAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -50520,16247 +49475,2465 @@ + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} +@end -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +@implementation MTRBaseClusterDoorLock (Deprecated) + +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self lockDoorWithParams:params completion:completionHandler]; } - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTROperationalStateGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalStateGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalState::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; - }); + [self unlockDoorWithParams:params completion:completionHandler]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self unlockWithTimeoutWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self setWeekDayScheduleWithParams:params completion:completionHandler]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTROperationalStateAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalStateAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalState::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; - }); + [self getWeekDayScheduleWithParams:params + completion:^( + MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self clearWeekDayScheduleWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self setYearDayScheduleWithParams:params completion:completionHandler]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTROperationalStateEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalStateEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalState::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; - }); + [self getYearDayScheduleWithParams:params + completion:^( + MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self clearYearDayScheduleWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self setHolidayScheduleWithParams:params completion:completionHandler]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTROperationalStateAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalStateAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalState::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; - }); + [self getHolidayScheduleWithParams:params + completion:^( + MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self clearHolidayScheduleWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self setUserWithParams:params completion:completionHandler]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params + completionHandler: + (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self clearUserWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params + completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self setCredentialWithParams:params + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self getCredentialStatusWithParams:params + completion:^( + MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -@end - -@implementation MTRBaseClusterHEPAFilterMonitoring - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self clearCredentialWithParams:params completion:completionHandler]; } -- (void)resetConditionWithCompletion:(MTRStatusCompletion)completion +- (void)readAttributeLockStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self resetConditionWithParams:nil completion:completion]; + [self readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - HepaFilterMonitoring::Commands::ResetCondition::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLockStateWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeLockStateWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLockTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeConditionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - 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 = HepaFilterMonitoring::Attributes::Condition::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLockTypeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeLockTypeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeActuatorEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(HEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActuatorEnabledWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeActuatorEnabledWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeDoorStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(HEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDoorStateWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeDoorStateWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeDoorOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeInPlaceIndicatorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeDoorOpenEventsWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeDoorOpenEventsWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDoorOpenEventsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRHEPAFilterMonitoringGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(HEPAFilterMonitoringGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = HepaFilterMonitoring::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; - }); + [self readAttributeDoorOpenEventsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDoorClosedEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeDoorClosedEventsWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTRHEPAFilterMonitoringAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(HEPAFilterMonitoringAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = HepaFilterMonitoring::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; - }); + [self writeAttributeDoorClosedEventsWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void) + subscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDoorClosedEventsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeDoorClosedEventsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOpenPeriodWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRHEPAFilterMonitoringEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(HEPAFilterMonitoringEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = HepaFilterMonitoring::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; - }); + [self readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeOpenPeriodWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeOpenPeriodWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRHEPAFilterMonitoringAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(HEPAFilterMonitoringAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = HepaFilterMonitoring::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOpenPeriodWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeOpenPeriodWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - 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 = HepaFilterMonitoring::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfTotalUsersSupportedWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - 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 = HepaFilterMonitoring::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfPINUsersSupportedWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -@end - -@implementation MTRBaseClusterActivatedCarbonFilterMonitoring - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue ++ (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self readAttributeNumberOfPINUsersSupportedWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)resetConditionWithCompletion:(MTRStatusCompletion)completion +- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self resetConditionWithParams:nil completion:completion]; + [self readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterResetConditionParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfRFIDUsersSupportedWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeConditionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - 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 = ActivatedCarbonFilterMonitoring::Attributes::Condition::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, + NSError * _Nullable error) { + // Cast is safe because subclass does not add any + // selectors. + completionHandler( + static_cast(value), error); + }]; } -- (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - auto * bridge = new MTRActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, + NSError * _Nullable error) { + // Cast is safe because subclass does not add any + // selectors. + completionHandler( + static_cast(value), error); + }]; } -- (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - auto * bridge = new MTRActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeInPlaceIndicatorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void) + subscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxPINCodeLengthWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeMaxPINCodeLengthWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void) + subscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ActivatedCarbonFilterMonitoring::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinPINCodeLengthWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeMinPINCodeLengthWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeMaxRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ActivatedCarbonFilterMonitoring::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxRFIDCodeLengthWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeMaxRFIDCodeLengthWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeMinRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRActivatedCarbonFilterMonitoringEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ActivatedCarbonFilterMonitoringEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ActivatedCarbonFilterMonitoring::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinRFIDCodeLengthWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); ++ (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinRFIDCodeLengthWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeCredentialRulesSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRActivatedCarbonFilterMonitoringAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ActivatedCarbonFilterMonitoringAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ActivatedCarbonFilterMonitoring::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCredentialRulesSupportWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeCredentialRulesSupportWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - 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 = ActivatedCarbonFilterMonitoring::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any + // selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLanguageWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeLanguageWithValue:value params:nil completion:completionHandler]; } - -@end - -@implementation MTRBaseClusterDoorLock - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self writeAttributeLanguageWithValue:value params:params completion:completionHandler]; } - -- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::LockDoor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLanguageWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::UnlockDoor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeLanguageWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params completion:(MTRStatusCompletion)completion +- (void)readAttributeLEDSettingsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::UnlockWithTimeout::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.timeout = params.timeout.unsignedShortValue; - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetWeekDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - request.daysMask = static_cast>(params.daysMask.unsignedCharValue); - request.startHour = params.startHour.unsignedCharValue; - request.startMinute = params.startMinute.unsignedCharValue; - request.endHour = params.endHour.unsignedCharValue; - request.endMinute = params.endMinute.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeLEDSettingsWithValue:value params:nil completion:completionHandler]; } - -- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params - completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetWeekDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetWeekDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeLEDSettingsWithValue:value params:params completion:completionHandler]; } - -- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearWeekDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLEDSettingsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetYearDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params - completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetYearDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetYearDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearYearDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetHolidaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; - request.operatingMode - = static_cast>(params.operatingMode.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params - completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetHolidayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetHolidaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearHolidaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetUser::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.operationType - = static_cast>(params.operationType.unsignedCharValue); - request.userIndex = params.userIndex.unsignedShortValue; - if (params.userName == nil) { - request.userName.SetNull(); - } else { - auto & nonNullValue_0 = request.userName.SetNonNull(); - nonNullValue_0 = [self asCharSpan:params.userName]; - } - if (params.userUniqueID == nil) { - request.userUniqueID.SetNull(); - } else { - auto & nonNullValue_0 = request.userUniqueID.SetNonNull(); - nonNullValue_0 = params.userUniqueID.unsignedIntValue; - } - if (params.userStatus == nil) { - request.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = request.userStatus.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userStatus.unsignedCharValue); - } - if (params.userType == nil) { - request.userType.SetNull(); - } else { - auto & nonNullValue_0 = request.userType.SetNonNull(); - nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); - } - if (params.credentialRule == nil) { - request.credentialRule.SetNull(); - } else { - auto & nonNullValue_0 = request.credentialRule.SetNonNull(); - nonNullValue_0 - = static_cast>(params.credentialRule.unsignedCharValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params - completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockClusterGetUserResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoorLockClusterGetUserResponseCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetUser::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearUser::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params - completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockClusterSetCredentialResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterSetCredentialResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetCredential::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.operationType - = static_cast>(params.operationType.unsignedCharValue); - request.credential.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); - request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - request.credentialData = [self asByteSpan:params.credentialData]; - if (params.userIndex == nil) { - request.userIndex.SetNull(); - } else { - auto & nonNullValue_0 = request.userIndex.SetNonNull(); - nonNullValue_0 = params.userIndex.unsignedShortValue; - } - if (params.userStatus == nil) { - request.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = request.userStatus.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userStatus.unsignedCharValue); - } - if (params.userType == nil) { - request.userType.SetNull(); - } else { - auto & nonNullValue_0 = request.userType.SetNonNull(); - nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params - completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetCredentialStatusResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetCredentialStatus::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.credential.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); - request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearCredential::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params.credential == nil) { - request.credential.SetNull(); - } else { - auto & nonNullValue_0 = request.credential.SetNonNull(); - nonNullValue_0.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); - nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::UnboltDoor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeLockStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(NullableDoorLockClusterDlLockStateAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::LockState::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)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeLockTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(DoorLockClusterDlLockTypeAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::LockType::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)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeActuatorEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::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)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeDoorStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(NullableDoorLockClusterDoorStateEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::DoorState::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)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeDoorOpenEventsWithClusterStateCache:(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 = DoorLock::Attributes::DoorOpenEvents::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)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeDoorClosedEventsWithClusterStateCache:(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 = DoorLock::Attributes::DoorClosedEvents::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)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeOpenPeriodWithClusterStateCache:(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 = DoorLock::Attributes::OpenPeriod::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)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:(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 = DoorLock::Attributes::NumberOfTotalUsersSupported::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)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeNumberOfPINUsersSupportedWithClusterStateCache:(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 = DoorLock::Attributes::NumberOfPINUsersSupported::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)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:(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 = DoorLock::Attributes::NumberOfRFIDUsersSupported::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)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCache: - (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 = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::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)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCache: - (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 = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::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)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache: - (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 = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::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)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMaxPINCodeLengthWithClusterStateCache:(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 = DoorLock::Attributes::MaxPINCodeLength::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)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMinPINCodeLengthWithClusterStateCache:(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 = DoorLock::Attributes::MinPINCodeLength::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)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMaxRFIDCodeLengthWithClusterStateCache:(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 = DoorLock::Attributes::MaxRFIDCodeLength::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)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMinRFIDCodeLengthWithClusterStateCache:(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 = DoorLock::Attributes::MinRFIDCodeLength::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)readAttributeCredentialRulesSupportWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeCredentialRulesSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(DoorLockCredentialRulesSupportAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::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)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache: - (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 = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::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)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLanguageWithValue:(NSString * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - 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 = DoorLock::Attributes::Language::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeLanguageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::Language::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)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; - TypeInfo::Type cppValue; - cppValue = 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)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeLEDSettingsWithClusterStateCache:(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 = DoorLock::Attributes::LEDSettings::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)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeAutoRelockTimeWithClusterStateCache:(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 = DoorLock::Attributes::AutoRelockTime::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)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - TypeInfo::Type cppValue; - cppValue = 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)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeSoundVolumeWithClusterStateCache:(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 = DoorLock::Attributes::SoundVolume::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)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(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)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(DoorLockClusterOperatingModeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::OperatingMode::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)readAttributeSupportedOperatingModesWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeSupportedOperatingModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(DoorLockSupportedOperatingModesAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::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)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeDefaultConfigurationRegisterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(DoorLockDefaultConfigurationRegisterAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::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)readAttributeEnableLocalProgrammingWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEnableLocalProgrammingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::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)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEnableOneTouchLockingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::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)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEnableInsideStatusLEDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::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)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEnablePrivacyModeButtonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::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)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(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)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeLocalProgrammingFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(DoorLockLocalProgrammingFeaturesAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::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)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = 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)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeWrongCodeEntryLimitWithClusterStateCache:(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 = DoorLock::Attributes::WrongCodeEntryLimit::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)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = 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)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:(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 = DoorLock::Attributes::UserCodeTemporaryDisableTime::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)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeSendPINOverTheAirWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::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)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeRequirePINforRemoteOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::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)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(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 = DoorLock::Attributes::ExpiringUserTimeout::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 = DoorLock::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 = DoorLock::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 MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(DoorLockGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::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 = DoorLock::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 = DoorLock::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 MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(DoorLockAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::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 = DoorLock::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRDoorLockEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(DoorLockEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DoorLock::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 = DoorLock::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 MTRDoorLockAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(DoorLockAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::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 = DoorLock::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 = DoorLock::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 = DoorLock::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 = DoorLock::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 = DoorLock::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 = DoorLock::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 MTRBaseClusterDoorLock (Deprecated) - -- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self lockDoorWithParams:params completion:completionHandler]; -} -- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self unlockDoorWithParams:params completion:completionHandler]; -} -- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self unlockWithTimeoutWithParams:params completion:completionHandler]; -} -- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self setWeekDayScheduleWithParams:params completion:completionHandler]; -} -- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self getWeekDayScheduleWithParams:params - completion:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self clearWeekDayScheduleWithParams:params completion:completionHandler]; -} -- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self setYearDayScheduleWithParams:params completion:completionHandler]; -} -- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self getYearDayScheduleWithParams:params - completion:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self clearYearDayScheduleWithParams:params completion:completionHandler]; -} -- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self setHolidayScheduleWithParams:params completion:completionHandler]; -} -- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self getHolidayScheduleWithParams:params - completion:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self clearHolidayScheduleWithParams:params completion:completionHandler]; -} -- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self setUserWithParams:params completion:completionHandler]; -} -- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params - completionHandler: - (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self clearUserWithParams:params completion:completionHandler]; -} -- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params - completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self getCredentialStatusWithParams:params - completion:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self clearCredentialWithParams:params completion:completionHandler]; -} -- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self unboltDoorWithParams:params completion:completionHandler]; -} - -- (void)readAttributeLockStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLockStateWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLockStateWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeLockTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLockTypeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLockTypeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeActuatorEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActuatorEnabledWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeActuatorEnabledWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeDoorStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDoorStateWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDoorStateWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeDoorOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeDoorOpenEventsWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeDoorOpenEventsWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDoorOpenEventsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDoorOpenEventsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeDoorClosedEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeDoorClosedEventsWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeDoorClosedEventsWithValue:value params:params completion:completionHandler]; -} -- (void) - subscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDoorClosedEventsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDoorClosedEventsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOpenPeriodWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOpenPeriodWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOpenPeriodWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOpenPeriodWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOpenPeriodWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfTotalUsersSupportedWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfPINUsersSupportedWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfPINUsersSupportedWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfRFIDUsersSupportedWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, - NSError * _Nullable error) { - // Cast is safe because subclass does not add any - // selectors. - completionHandler( - static_cast(value), error); - }]; -} - -- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, - NSError * _Nullable error) { - // Cast is safe because subclass does not add any - // selectors. - completionHandler( - static_cast(value), error); - }]; -} - -- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void) - subscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxPINCodeLengthWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxPINCodeLengthWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void) - subscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinPINCodeLengthWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinPINCodeLengthWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxRFIDCodeLengthWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxRFIDCodeLengthWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinRFIDCodeLengthWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinRFIDCodeLengthWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCredentialRulesSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCredentialRulesSupportWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCredentialRulesSupportWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any - // selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeLanguageWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLanguageWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLanguageWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLanguageWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLanguageWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeLEDSettingsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLEDSettingsWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLEDSettingsWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLEDSettingsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLEDSettingsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAutoRelockTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeAutoRelockTimeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeAutoRelockTimeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAutoRelockTimeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAutoRelockTimeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSoundVolumeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSoundVolumeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSoundVolumeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSoundVolumeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSoundVolumeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOperatingModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOperatingModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOperatingModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOperatingModeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOperatingModeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSupportedOperatingModesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedOperatingModesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSupportedOperatingModesWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedOperatingModesWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeDefaultConfigurationRegisterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDefaultConfigurationRegisterWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeDefaultConfigurationRegisterWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeEnableLocalProgrammingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeEnableLocalProgrammingWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeEnableLocalProgrammingWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeEnableLocalProgrammingWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEnableLocalProgrammingWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeEnableOneTouchLockingWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeEnableOneTouchLockingWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeEnableOneTouchLockingWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEnableOneTouchLockingWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeEnableInsideStatusLEDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeEnableInsideStatusLEDWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeEnableInsideStatusLEDWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeEnableInsideStatusLEDWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEnableInsideStatusLEDWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeEnablePrivacyModeButtonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeEnablePrivacyModeButtonWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeEnablePrivacyModeButtonWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeEnablePrivacyModeButtonWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEnablePrivacyModeButtonWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeLocalProgrammingFeaturesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeLocalProgrammingFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLocalProgrammingFeaturesWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLocalProgrammingFeaturesWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLocalProgrammingFeaturesWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLocalProgrammingFeaturesWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeWrongCodeEntryLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWrongCodeEntryLimitWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWrongCodeEntryLimitWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeWrongCodeEntryLimitWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeWrongCodeEntryLimitWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUserCodeTemporaryDisableTimeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUserCodeTemporaryDisableTimeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUserCodeTemporaryDisableTimeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSendPINOverTheAirWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSendPINOverTheAirWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSendPINOverTheAirWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSendPINOverTheAirWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSendPINOverTheAirWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeRequirePINforRemoteOperationWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeRequirePINforRemoteOperationWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRequirePINforRemoteOperationWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeRequirePINforRemoteOperationWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeExpiringUserTimeoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeExpiringUserTimeoutWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeExpiringUserTimeoutWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeExpiringUserTimeoutWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeExpiringUserTimeoutWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterWindowCovering - -- (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)upOrOpenWithCompletion:(MTRStatusCompletion)completion -{ - [self upOrOpenWithParams:nil completion:completion]; -} -- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::UpOrOpen::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)downOrCloseWithCompletion:(MTRStatusCompletion)completion -{ - [self downOrCloseWithParams:nil completion:completion]; -} -- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::DownOrClose::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)stopMotionWithCompletion:(MTRStatusCompletion)completion -{ - [self stopMotionWithParams:nil completion:completion]; -} -- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::StopMotion::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToLiftValue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.liftValue = params.liftValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToLiftPercentage::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.liftPercent100thsValue = params.liftPercent100thsValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToTiltValue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.tiltValue = params.tiltValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToTiltPercentage::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.tiltPercent100thsValue = params.tiltPercent100thsValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRWindowCoveringClusterTypeAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(WindowCoveringClusterTypeAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::Type::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)readAttributePhysicalClosedLimitLiftWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributePhysicalClosedLimitLiftWithClusterStateCache:(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 = WindowCovering::Attributes::PhysicalClosedLimitLift::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)readAttributePhysicalClosedLimitTiltWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributePhysicalClosedLimitTiltWithClusterStateCache:(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 = WindowCovering::Attributes::PhysicalClosedLimitTilt::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)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeCurrentPositionLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::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)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeCurrentPositionTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::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)readAttributeNumberOfActuationsLiftWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeNumberOfActuationsLiftWithClusterStateCache:(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 = WindowCovering::Attributes::NumberOfActuationsLift::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)readAttributeNumberOfActuationsTiltWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeNumberOfActuationsTiltWithClusterStateCache:(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 = WindowCovering::Attributes::NumberOfActuationsTilt::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)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeConfigStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRWindowCoveringConfigStatusAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WindowCoveringConfigStatusAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::ConfigStatus::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)readAttributeCurrentPositionLiftPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeCurrentPositionLiftPercentageWithClusterStateCache:(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 = WindowCovering::Attributes::CurrentPositionLiftPercentage::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)readAttributeCurrentPositionTiltPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeCurrentPositionTiltPercentageWithClusterStateCache:(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 = WindowCovering::Attributes::CurrentPositionTiltPercentage::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)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeOperationalStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRWindowCoveringOperationalStatusAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WindowCoveringOperationalStatusAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::OperationalStatus::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)readAttributeTargetPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeTargetPositionLiftPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::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)readAttributeTargetPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeTargetPositionTiltPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::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)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEndProductTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WindowCoveringClusterEndProductTypeAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::EndProductType::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)readAttributeCurrentPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeCurrentPositionLiftPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::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)readAttributeCurrentPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeCurrentPositionTiltPercent100thsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::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)readAttributeInstalledOpenLimitLiftWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeInstalledOpenLimitLiftWithClusterStateCache:(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 = WindowCovering::Attributes::InstalledOpenLimitLift::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)readAttributeInstalledClosedLimitLiftWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeInstalledClosedLimitLiftWithClusterStateCache:(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 = WindowCovering::Attributes::InstalledClosedLimitLift::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)readAttributeInstalledOpenLimitTiltWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeInstalledOpenLimitTiltWithClusterStateCache:(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 = WindowCovering::Attributes::InstalledOpenLimitTilt::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)readAttributeInstalledClosedLimitTiltWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeInstalledClosedLimitTiltWithClusterStateCache:(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 = WindowCovering::Attributes::InstalledClosedLimitTilt::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)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(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)subscribeAttributeModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRWindowCoveringModeAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(WindowCoveringModeAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::Mode::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)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRWindowCoveringSafetyStatusAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WindowCoveringSafetyStatusAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::SafetyStatus::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 = WindowCovering::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 = WindowCovering::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 MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WindowCoveringGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::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 = WindowCovering::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 = WindowCovering::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 MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WindowCoveringAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::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 = WindowCovering::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRWindowCoveringEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WindowCoveringEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WindowCovering::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 = WindowCovering::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 MTRWindowCoveringAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WindowCoveringAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::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 = WindowCovering::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 = WindowCovering::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 = WindowCovering::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 = WindowCovering::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 = WindowCovering::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 = WindowCovering::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 MTRBaseClusterWindowCovering (Deprecated) - -- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self upOrOpenWithParams:params completion:completionHandler]; -} -- (void)upOrOpenWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self upOrOpenWithParams:nil completionHandler:completionHandler]; -} -- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self downOrCloseWithParams:params completion:completionHandler]; -} -- (void)downOrCloseWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self downOrCloseWithParams:nil completionHandler:completionHandler]; -} -- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stopMotionWithParams:params completion:completionHandler]; -} -- (void)stopMotionWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self stopMotionWithParams:nil completionHandler:completionHandler]; -} -- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self goToLiftValueWithParams:params completion:completionHandler]; -} -- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self goToLiftPercentageWithParams:params completion:completionHandler]; -} -- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self goToTiltValueWithParams:params completion:completionHandler]; -} -- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self goToTiltPercentageWithParams:params completion:completionHandler]; -} - -- (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTypeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTypeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePhysicalClosedLimitLiftWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePhysicalClosedLimitLiftWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePhysicalClosedLimitTiltWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePhysicalClosedLimitTiltWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentPositionLiftWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionLiftWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentPositionTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentPositionTiltWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionTiltWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfActuationsLiftWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfActuationsLiftWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfActuationsTiltWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfActuationsTiltWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeConfigStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeConfigStatusWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeConfigStatusWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentPositionLiftPercentageWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionLiftPercentageWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentPositionTiltPercentageWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionTiltPercentageWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOperationalStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOperationalStatusWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOperationalStatusWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTargetPositionLiftPercent100thsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self - readAttributeTargetPositionLiftPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTargetPositionTiltPercent100thsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self - readAttributeTargetPositionTiltPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeEndProductTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeEndProductTypeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEndProductTypeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentPositionLiftPercent100thsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionLiftPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentPositionTiltPercent100thsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionTiltPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeInstalledOpenLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInstalledOpenLimitLiftWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledOpenLimitLiftWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeInstalledClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInstalledClosedLimitLiftWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledClosedLimitLiftWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeInstalledOpenLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInstalledOpenLimitTiltWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledOpenLimitTiltWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeInstalledClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInstalledClosedLimitTiltWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledClosedLimitTiltWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeModeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeModeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSafetyStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSafetyStatusWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSafetyStatusWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterBarrierControl - -- (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)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - BarrierControl::Commands::BarrierControlGoToPercent::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.percentOpen = params.percentOpen.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion -{ - [self barrierControlStopWithParams:nil completion:completion]; -} -- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - BarrierControl::Commands::BarrierControlStop::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeBarrierMovingStateWithClusterStateCache:(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 = BarrierControl::Attributes::BarrierMovingState::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)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeBarrierSafetyStatusWithClusterStateCache:(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 = BarrierControl::Attributes::BarrierSafetyStatus::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)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeBarrierCapabilitiesWithClusterStateCache:(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 = BarrierControl::Attributes::BarrierCapabilities::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)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeBarrierOpenEventsWithClusterStateCache:(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 = BarrierControl::Attributes::BarrierOpenEvents::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)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeBarrierCloseEventsWithClusterStateCache:(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 = BarrierControl::Attributes::BarrierCloseEvents::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)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeBarrierCommandOpenEventsWithClusterStateCache:(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 = BarrierControl::Attributes::BarrierCommandOpenEvents::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)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeBarrierCommandCloseEventsWithClusterStateCache:(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 = BarrierControl::Attributes::BarrierCommandCloseEvents::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)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeBarrierOpenPeriodWithClusterStateCache:(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 = BarrierControl::Attributes::BarrierOpenPeriod::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)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeBarrierClosePeriodWithClusterStateCache:(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 = BarrierControl::Attributes::BarrierClosePeriod::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)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeBarrierPositionWithClusterStateCache:(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 = BarrierControl::Attributes::BarrierPosition::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 = BarrierControl::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 = BarrierControl::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 MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BarrierControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::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 = BarrierControl::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 = BarrierControl::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 MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BarrierControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::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 = BarrierControl::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRBarrierControlEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BarrierControlEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BarrierControl::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 = BarrierControl::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 MTRBarrierControlAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BarrierControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::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 = BarrierControl::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 = BarrierControl::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 = BarrierControl::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 = BarrierControl::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 = BarrierControl::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 = BarrierControl::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 MTRBaseClusterBarrierControl (Deprecated) - -- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self barrierControlGoToPercentWithParams:params completion:completionHandler]; -} -- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self barrierControlStopWithParams:params completion:completionHandler]; -} -- (void)barrierControlStopWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self barrierControlStopWithParams:nil completionHandler:completionHandler]; -} - -- (void)readAttributeBarrierMovingStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierMovingStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierMovingStateWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierMovingStateWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierSafetyStatusWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierSafetyStatusWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierCapabilitiesWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCapabilitiesWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierOpenEventsWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierOpenEventsWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierOpenEventsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierOpenEventsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierCloseEventsWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierCloseEventsWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierCloseEventsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCloseEventsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCommandOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierCommandOpenEventsWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierCommandOpenEventsWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierCommandOpenEventsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCommandOpenEventsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCommandCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierCommandCloseEventsWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierCommandCloseEventsWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierCommandCloseEventsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCommandCloseEventsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierOpenPeriodWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierOpenPeriodWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierOpenPeriodWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierOpenPeriodWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierClosePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierClosePeriodWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierClosePeriodWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierClosePeriodWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierClosePeriodWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierPositionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierPositionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterPumpConfigurationAndControl - -- (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)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMaxPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::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)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMaxSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::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)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMaxFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::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)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMinConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::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)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMaxConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::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)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMinCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::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)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMaxCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::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)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMinConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::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)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMaxConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::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)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMinConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::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)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMaxConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::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)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMinConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::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)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMaxConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::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)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributePumpStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PumpConfigurationAndControlPumpStatusAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::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)readAttributeEffectiveOperationModeWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEffectiveOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PumpConfigurationAndControlClusterOperationModeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::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)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEffectiveControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PumpConfigurationAndControlClusterControlModeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::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)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::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)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::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)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeLifetimeRunningHoursWithValue:(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 = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeLifetimeRunningHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::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)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::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)readAttributeLifetimeEnergyConsumedWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(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 = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeLifetimeEnergyConsumedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::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)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(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)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PumpConfigurationAndControlClusterOperationModeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::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)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeControlModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(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)subscribeAttributeControlModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PumpConfigurationAndControlClusterControlModeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::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 = PumpConfigurationAndControl::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 = PumpConfigurationAndControl::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 MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PumpConfigurationAndControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::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 = PumpConfigurationAndControl::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 = PumpConfigurationAndControl::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 MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PumpConfigurationAndControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::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 = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PumpConfigurationAndControlEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PumpConfigurationAndControl::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 = PumpConfigurationAndControl::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 MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PumpConfigurationAndControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::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 = PumpConfigurationAndControl::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 = PumpConfigurationAndControl::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 = PumpConfigurationAndControl::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 = PumpConfigurationAndControl::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 = PumpConfigurationAndControl::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 = PumpConfigurationAndControl::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 MTRBaseClusterPumpConfigurationAndControl (Deprecated) - -- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxPressureWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxPressureWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxSpeedWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxSpeedWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxFlowWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxFlowWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void) - subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinConstPressureWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstPressureWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void) - subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxConstPressureWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstPressureWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinCompPressureWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinCompPressureWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxCompPressureWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxCompPressureWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinConstSpeedWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstSpeedWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxConstSpeedWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstSpeedWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinConstFlowWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstFlowWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxConstFlowWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstFlowWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinConstTempWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstTempWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxConstTempWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstTempWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePumpStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePumpStatusWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePumpStatusWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeEffectiveOperationModeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEffectiveOperationModeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeEffectiveControlModeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEffectiveControlModeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCapacityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCapacityWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCapacityWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSpeedWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSpeedWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLifetimeRunningHoursWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLifetimeRunningHoursWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLifetimeRunningHoursWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLifetimeRunningHoursWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePowerWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePowerWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLifetimeEnergyConsumedWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLifetimeEnergyConsumedWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLifetimeEnergyConsumedWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOperationModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOperationModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOperationModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOperationModeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOperationModeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeControlModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeControlModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeControlModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeControlModeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeControlModeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterThermostat - -- (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)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::SetpointRaiseLower::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.mode = static_cast>(params.mode.unsignedCharValue); - request.amount = params.amount.charValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::SetWeeklySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.numberOfTransitionsForSequence = params.numberOfTransitionsForSequence.unsignedCharValue; - request.dayOfWeekForSequence = static_cast>( - params.dayOfWeekForSequence.unsignedCharValue); - request.modeForSequence - = static_cast>(params.modeForSequence.unsignedCharValue); - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.transitions.count != 0) { - auto * listHolder_0 = new ListHolder(params.transitions.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.transitions.count; ++i_0) { - if (![params.transitions[i_0] isKindOfClass:[MTRThermostatClusterThermostatScheduleTransition class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRThermostatClusterThermostatScheduleTransition *) params.transitions[i_0]; - listHolder_0->mList[i_0].transitionTime = element_0.transitionTime.unsignedShortValue; - if (element_0.heatSetpoint == nil) { - listHolder_0->mList[i_0].heatSetpoint.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].heatSetpoint.SetNonNull(); - nonNullValue_2 = element_0.heatSetpoint.shortValue; - } - if (element_0.coolSetpoint == nil) { - listHolder_0->mList[i_0].coolSetpoint.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].coolSetpoint.SetNonNull(); - nonNullValue_2 = element_0.coolSetpoint.shortValue; - } - } - request.transitions = ListType_0(listHolder_0->mList, params.transitions.count); - } else { - request.transitions = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params - completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatClusterGetWeeklyScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::GetWeeklySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.daysToReturn - = static_cast>(params.daysToReturn.unsignedCharValue); - request.modeToReturn - = static_cast>(params.modeToReturn.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion -{ - [self clearWeeklyScheduleWithParams:nil completion:completion]; -} -- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::ClearWeeklySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeLocalTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::LocalTemperature::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)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeOutdoorTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::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)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeOccupancyWithClusterStateCache:(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 = Thermostat::Attributes::Occupancy::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)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::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)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::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)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::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)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::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)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributePICoolingDemandWithClusterStateCache:(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 = Thermostat::Attributes::PICoolingDemand::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)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributePIHeatingDemandWithClusterStateCache:(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 = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeLEDSettingsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAutoRelockTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeAutoRelockTimeWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // 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 = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeAutoRelockTimeWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAutoRelockTimeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAutoRelockTimeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoundVolumeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSoundVolumeWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // 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 = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeSoundVolumeWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSoundVolumeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeLocalTemperatureCalibrationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt8sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeSoundVolumeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperatingModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOperatingModeWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // 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 = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeOperatingModeWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOperatingModeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeOccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeOperatingModeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedOperatingModesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeSupportedOperatingModesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - [self writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSupportedOperatingModesWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); ++ (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedOperatingModesWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeDefaultConfigurationRegisterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeOccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDefaultConfigurationRegisterWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeDefaultConfigurationRegisterWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)readAttributeEnableLocalProgrammingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - // 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 = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeEnableLocalProgrammingWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeEnableLocalProgrammingWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeEnableLocalProgrammingWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeEnableLocalProgrammingWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - // 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 = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeEnableOneTouchLockingWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeEnableOneTouchLockingWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeEnableOneTouchLockingWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeEnableOneTouchLockingWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)readAttributeEnableInsideStatusLEDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - // 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 = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeEnableInsideStatusLEDWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeEnableInsideStatusLEDWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeEnableInsideStatusLEDWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeEnableInsideStatusLEDWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self readAttributeEnablePrivacyModeButtonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - // 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 = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeEnablePrivacyModeButtonWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeEnablePrivacyModeButtonWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeEnablePrivacyModeButtonWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeEnablePrivacyModeButtonWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocalProgrammingFeaturesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeLocalProgrammingFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLocalProgrammingFeaturesWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // 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 = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeLocalProgrammingFeaturesWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLocalProgrammingFeaturesWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeLocalProgrammingFeaturesWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWrongCodeEntryLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeWrongCodeEntryLimitWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // 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 = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeWrongCodeEntryLimitWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWrongCodeEntryLimitWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeWrongCodeEntryLimitWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeUserCodeTemporaryDisableTimeWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // 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 = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeUserCodeTemporaryDisableTimeWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeUserCodeTemporaryDisableTimeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMinSetpointDeadBandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt8sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSendPINOverTheAirWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSendPINOverTheAirWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // 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 = Thermostat::Attributes::RemoteSensing::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeSendPINOverTheAirWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSendPINOverTheAirWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSendPINOverTheAirWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRequirePINforRemoteOperationWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRequirePINforRemoteOperationWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRequirePINforRemoteOperationWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRemoteSensingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRequirePINforRemoteOperationWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeExpiringUserTimeoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeExpiringUserTimeoutWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // 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 = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeExpiringUserTimeoutWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeExpiringUserTimeoutWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeControlSequenceOfOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ThermostatClusterThermostatControlSequenceAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeExpiringUserTimeoutWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeSystemModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - // 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 = Thermostat::Attributes::SystemMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeSystemModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - 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 = Thermostat::Attributes::SystemMode::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeThermostatRunningModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - 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 = Thermostat::Attributes::ThermostatRunningMode::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeStartOfWeekWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - 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 = Thermostat::Attributes::StartOfWeek::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - 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 = Thermostat::Attributes::NumberOfWeeklyTransitions::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +@end + +@implementation MTRBaseClusterWindowCovering + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; } -+ (void)readAttributeNumberOfDailyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)upOrOpenWithCompletion:(MTRStatusCompletion)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 = Thermostat::Attributes::NumberOfDailyTransitions::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); + [self upOrOpenWithParams:nil completion:completion]; +} +- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + WindowCovering::Commands::UpOrOpen::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)downOrCloseWithCompletion:(MTRStatusCompletion)completion { - [self writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self downOrCloseWithParams:nil completion:completion]; } -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( + auto * bridge = new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { + ^(id _Nullable value, NSError * _Nullable error) { completion(error); }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + WindowCovering::Commands::DownOrClose::Type request; if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)stopMotionWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self stopMotionWithParams:nil completion:completion]; } - -+ (void)readAttributeTemperatureSetpointHoldWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params completion:(MTRStatusCompletion)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 = Thermostat::Attributes::TemperatureSetpointHold::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + WindowCovering::Commands::StopMotion::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params completion:(MTRStatusCompletion)completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + WindowCovering::Commands::GoToLiftValue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.liftValue = params.liftValue.unsignedShortValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion +- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params + completion:(MTRStatusCompletion)completion { - [self writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + WindowCovering::Commands::GoToLiftPercentage::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.liftPercent100thsValue = params.liftPercent100thsValue.unsignedShortValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + +- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( + auto * bridge = new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { + ^(id _Nullable value, NSError * _Nullable error) { completion(error); }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + WindowCovering::Commands::GoToTiltValue::Type request; if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } + request.tiltValue = params.tiltValue.unsignedShortValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} +- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; + WindowCovering::Commands::GoToTiltPercentage::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } } + request.tiltPercent100thsValue = params.tiltPercent100thsValue.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeTemperatureSetpointHoldDurationWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRWindowCoveringClusterTypeAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(WindowCoveringClusterTypeAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -66775,78 +51948,38 @@ + (void)readAttributeTemperatureSetpointHoldDurationWithClusterStateCache: }); } -- (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePhysicalClosedLimitLiftWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion -{ - [self writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = 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)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeThermostatProgrammingOperationModeWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePhysicalClosedLimitLiftWithClusterStateCache:(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); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -66861,38 +51994,38 @@ + (void)readAttributeThermostatProgrammingOperationModeWithClusterStateCache: }); } -- (void)readAttributeThermostatRunningStateWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalClosedLimitTiltWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeThermostatRunningStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePhysicalClosedLimitTiltWithClusterStateCache:(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 = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -66907,37 +52040,37 @@ + (void)readAttributeThermostatRunningStateWithClusterStateCache:(MTRClusterStat }); } -- (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeSetpointChangeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionLiftWithClusterStateCache:(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); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -66952,37 +52085,37 @@ + (void)readAttributeSetpointChangeSourceWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeSetpointChangeAmountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -66997,39 +52130,38 @@ + (void)readAttributeSetpointChangeAmountWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeNumberOfActuationsLiftWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeSetpointChangeSourceTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeNumberOfActuationsLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67044,78 +52176,38 @@ + (void)readAttributeSetpointChangeSourceTimestampWithClusterStateCache:(MTRClus }); } -- (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfActuationsTiltWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOccupiedSetbackWithValue:(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 = Thermostat::Attributes::OccupiedSetback::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)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeOccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfActuationsTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67130,37 +52222,35 @@ + (void)readAttributeOccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheC }); } -- (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeOccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeConfigStatusWithClusterStateCache:(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) { + auto * bridge = new MTRWindowCoveringConfigStatusAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(WindowCoveringConfigStatusAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67175,37 +52265,39 @@ + (void)readAttributeOccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCac }); } -- (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionLiftPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeOccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionLiftPercentageWithClusterStateCache:(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 = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67220,78 +52312,39 @@ + (void)readAttributeOccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCac }); } -- (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionTiltPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeUnoccupiedSetbackWithValue:(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 = Thermostat::Attributes::UnoccupiedSetback::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)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeUnoccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionTiltPercentageWithClusterStateCache:(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 = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67306,37 +52359,36 @@ + (void)readAttributeUnoccupiedSetbackWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeUnoccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalStatusWithClusterStateCache:(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) { + auto * bridge = new MTRWindowCoveringOperationalStatusAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(WindowCoveringOperationalStatusAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67351,37 +52403,40 @@ + (void)readAttributeUnoccupiedSetbackMinWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTargetPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeUnoccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTargetPositionLiftPercent100thsWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67396,74 +52451,40 @@ + (void)readAttributeUnoccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTargetPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - TypeInfo::Type cppValue; - cppValue = 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)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeEmergencyHeatDeltaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTargetPositionTiltPercent100thsWithClusterStateCache: + (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); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67478,72 +52499,35 @@ + (void)readAttributeEmergencyHeatDeltaWithClusterStateCache:(MTRClusterStateCac }); } -- (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = 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)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeACTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEndProductTypeWithClusterStateCache:(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) { + auto * bridge = new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(WindowCoveringClusterEndProductTypeAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67558,72 +52542,40 @@ + (void)readAttributeACTypeWithClusterStateCache:(MTRClusterStateCacheContainer }); } -- (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACCapacityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeACCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionLiftPercent100thsWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67638,73 +52590,40 @@ + (void)readAttributeACCapacityWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = 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)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeACRefrigerantTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionTiltPercent100thsWithClusterStateCache: + (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); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67719,73 +52638,38 @@ + (void)readAttributeACRefrigerantTypeWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInstalledOpenLimitLiftWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = 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)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeACCompressorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInstalledOpenLimitLiftWithClusterStateCache:(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); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67800,72 +52684,38 @@ + (void)readAttributeACCompressorTypeWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInstalledClosedLimitLiftWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeACErrorCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInstalledClosedLimitLiftWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67880,73 +52730,38 @@ + (void)readAttributeACErrorCodeWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInstalledOpenLimitTiltWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - TypeInfo::Type cppValue; - cppValue = 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)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeACLouverPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInstalledOpenLimitTiltWithClusterStateCache:(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); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -67961,36 +52776,38 @@ + (void)readAttributeACLouverPositionWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInstalledClosedLimitTiltWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeACCoilTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInstalledClosedLimitTiltWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -68005,21 +52822,21 @@ + (void)readAttributeACCoilTemperatureWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -68040,9 +52857,9 @@ - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -68050,28 +52867,27 @@ - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeACCapacityformatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeModeWithClusterStateCache:(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); + auto * bridge = new MTRWindowCoveringModeAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(WindowCoveringModeAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -68086,37 +52902,35 @@ + (void)readAttributeACCapacityformatWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThermostatGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRWindowCoveringSafetyStatusAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ThermostatGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(WindowCoveringSafetyStatusAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -68131,37 +52945,37 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::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 ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThermostatAcceptedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ThermostatAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(WindowCoveringGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -68176,35 +52990,37 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::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 +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::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 ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThermostatEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(ThermostatEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(WindowCoveringAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -68222,8 +53038,8 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68231,8 +53047,8 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute( + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68242,12 +53058,12 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThermostatAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRWindowCoveringAttributeListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ThermostatAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(WindowCoveringAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -68265,7 +53081,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68274,7 +53090,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -68290,7 +53106,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -68308,7 +53124,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68317,7 +53133,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -68334,7 +53150,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -68351,98 +53167,68 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterThermostat (Deprecated) +@implementation MTRBaseClusterWindowCovering (Deprecated) -- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self setpointRaiseLowerWithParams:params completion:completionHandler]; + [self upOrOpenWithParams:params completion:completionHandler]; } -- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)upOrOpenWithCompletionHandler:(MTRStatusCompletion)completionHandler { - [self setWeeklyScheduleWithParams:params completion:completionHandler]; + [self upOrOpenWithParams:nil completionHandler:completionHandler]; } -- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params - completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self getWeeklyScheduleWithParams:params - completion:^( - MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self downOrCloseWithParams:params completion:completionHandler]; } -- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)downOrCloseWithCompletionHandler:(MTRStatusCompletion)completionHandler { - [self clearWeeklyScheduleWithParams:params completion:completionHandler]; + [self downOrCloseWithParams:nil completionHandler:completionHandler]; } -- (void)clearWeeklyScheduleWithCompletionHandler:(MTRStatusCompletion)completionHandler +- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self clearWeeklyScheduleWithParams:nil completionHandler:completionHandler]; + [self stopMotionWithParams:params completion:completionHandler]; } - -- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)stopMotionWithCompletionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self stopMotionWithParams:nil completionHandler:completionHandler]; } -- (void) - subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLocalTemperatureWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self goToLiftValueWithParams:params completion:completionHandler]; } -+ (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeLocalTemperatureWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self goToLiftPercentageWithParams:params completion:completionHandler]; +} +- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self goToTiltValueWithParams:params completion:completionHandler]; +} +- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self goToTiltPercentageWithParams:params completion:completionHandler]; } -- (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -68451,41 +53237,42 @@ - (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOutdoorTemperatureWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeTypeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOutdoorTemperatureWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeTypeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -68494,36 +53281,37 @@ - (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOccupancyWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePhysicalClosedLimitLiftWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOccupancyWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePhysicalClosedLimitLiftWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: @@ -68538,20 +53326,20 @@ - (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _No subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAbsMinHeatSetpointLimitWithParams:subscribeParams + [self subscribeAttributePhysicalClosedLimitTiltWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributePhysicalClosedLimitTiltWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -68560,21 +53348,244 @@ + (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCach }]; } -- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentPositionLiftWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionLiftWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentPositionTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentPositionTiltWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionTiltWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfActuationsLiftWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfActuationsLiftWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfActuationsTiltWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfActuationsTiltWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeConfigStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeConfigStatusWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeConfigStatusWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -68583,43 +53594,43 @@ - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _No subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAbsMaxHeatSetpointLimitWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeCurrentPositionLiftPercentageWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeCurrentPositionLiftPercentageWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -68628,43 +53639,43 @@ - (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _No subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAbsMinCoolSetpointLimitWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeCurrentPositionTiltPercentageWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeCurrentPositionTiltPercentageWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOperationalStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -68673,42 +53684,43 @@ - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _No subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAbsMaxCoolSetpointLimitWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOperationalStatusWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOperationalStatusWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePICoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -68717,42 +53729,44 @@ - (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePICoolingDemandWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeTargetPositionLiftPercent100thsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePICoolingDemandWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self + readAttributeTargetPositionLiftPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePIHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -68761,54 +53775,43 @@ - (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePIHeatingDemandWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeTargetPositionTiltPercent100thsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePIHeatingDemandWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self + readAttributeTargetPositionTiltPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEndProductTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -68817,54 +53820,43 @@ - (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeHVACSystemTypeConfigurationWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeEndProductTypeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeHVACSystemTypeConfigurationWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeEndProductTypeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLocalTemperatureCalibrationWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLocalTemperatureCalibrationWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -68873,54 +53865,44 @@ - (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLocalTemperatureCalibrationWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeCurrentPositionLiftPercent100thsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeLocalTemperatureCalibrationWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeCurrentPositionLiftPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOccupiedCoolingSetpointWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOccupiedCoolingSetpointWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -68929,54 +53911,44 @@ - (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _No subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOccupiedCoolingSetpointWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupiedCoolingSetpointWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeCurrentPositionTiltPercent100thsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } ++ (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionTiltPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} -- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeInstalledOpenLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOccupiedHeatingSetpointWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOccupiedHeatingSetpointWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -68985,54 +53957,43 @@ - (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _No subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOccupiedHeatingSetpointWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeInstalledOpenLimitLiftWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOccupiedHeatingSetpointWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeInstalledOpenLimitLiftWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeInstalledClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUnoccupiedCoolingSetpointWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUnoccupiedCoolingSetpointWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -69041,54 +54002,43 @@ - (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _ subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeUnoccupiedCoolingSetpointWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeInstalledClosedLimitLiftWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeInstalledClosedLimitLiftWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeInstalledOpenLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUnoccupiedHeatingSetpointWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUnoccupiedHeatingSetpointWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -69097,54 +54047,43 @@ - (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _ subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeUnoccupiedHeatingSetpointWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeInstalledOpenLimitTiltWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeInstalledOpenLimitTiltWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeInstalledClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinHeatSetpointLimitWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinHeatSetpointLimitWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -69153,54 +54092,50 @@ - (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMinHeatSetpointLimitWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeInstalledClosedLimitTiltWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeInstalledClosedLimitTiltWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeMaxHeatSetpointLimitWithValue:value params:nil completion:completionHandler]; + [self writeAttributeModeWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeMaxHeatSetpointLimitWithValue:value params:params completion:completionHandler]; + [self writeAttributeModeWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -69209,54 +54144,40 @@ - (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMaxHeatSetpointLimitWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeModeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeModeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSafetyStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinCoolSetpointLimitWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinCoolSetpointLimitWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -69265,54 +54186,43 @@ - (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMinCoolSetpointLimitWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSafetyStatusWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSafetyStatusWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMaxCoolSetpointLimitWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMaxCoolSetpointLimitWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -69321,54 +54231,43 @@ - (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMaxCoolSetpointLimitWithParams:subscribeParams + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinSetpointDeadBandWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinSetpointDeadBandWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -69377,52 +54276,41 @@ - (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMinSetpointDeadBandWithParams:subscribeParams + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinSetpointDeadBandWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeRemoteSensingWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeRemoteSensingWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -69431,103 +54319,37 @@ - (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRemoteSensingWithParams:subscribeParams + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRemoteSensingWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeControlSequenceOfOperationWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeControlSequenceOfOperationWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeControlSequenceOfOperationWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeControlSequenceOfOperationWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSystemModeWithCompletionHandler:(void (^)( +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSystemModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSystemModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -69540,19 +54362,19 @@ - (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSystemModeWithParams:subscribeParams + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSystemModeWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -69561,21 +54383,20 @@ + (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *) }]; } -- (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -69584,821 +54405,1046 @@ - (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeThermostatRunningModeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeThermostatRunningModeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - [self readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterBarrierControl + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; } - [self subscribeAttributeStartOfWeekWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + return self; } -+ (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params + completion:(MTRStatusCompletion)completion { - [self readAttributeStartOfWeekWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + BarrierControl::Commands::BarrierControlGoToPercent::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.percentOpen = params.percentOpen.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion { - [self readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self barrierControlStopWithParams:nil completion:completion]; } -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfWeeklyTransitionsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + BarrierControl::Commands::BarrierControlStop::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + +- (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + ++ (void)readAttributeBarrierMovingStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfDailyTransitionsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + 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 = BarrierControl::Attributes::BarrierMovingState::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)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeNumberOfDailyTransitionsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeBarrierSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeTemperatureSetpointHoldWithValue:value params:nil completion:completionHandler]; + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::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)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeTemperatureSetpointHoldWithValue:value params:params completion:completionHandler]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTemperatureSetpointHoldWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeBarrierCapabilitiesWithClusterStateCache:(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 = BarrierControl::Attributes::BarrierCapabilities::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)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeBarrierOpenEventsWithClusterStateCache:(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 = BarrierControl::Attributes::BarrierOpenEvents::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)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTemperatureSetpointHoldWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - [self writeAttributeTemperatureSetpointHoldDurationWithValue:value params:nil completion:completionHandler]; + // 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 = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeTemperatureSetpointHoldDurationWithValue:value params:params completion:completionHandler]; + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + ++ (void)readAttributeBarrierCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTemperatureSetpointHoldDurationWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + 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 = BarrierControl::Attributes::BarrierCloseEvents::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)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + +- (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self - readAttributeTemperatureSetpointHoldDurationWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - [self writeAttributeThermostatProgrammingOperationModeWithValue:value params:nil completion:completionHandler]; + // 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 = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeThermostatProgrammingOperationModeWithValue:value params:params completion:completionHandler]; + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + ++ (void)readAttributeBarrierCommandOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeThermostatProgrammingOperationModeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + 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 = BarrierControl::Attributes::BarrierCommandOpenEvents::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)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + +- (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeThermostatProgrammingOperationModeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeThermostatRunningStateWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // 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 = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeThermostatRunningStateWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierCommandCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - [self readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::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)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSetpointChangeSourceWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeSetpointChangeSourceWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -- (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - [self readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + 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 = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSetpointChangeAmountWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + ++ (void)readAttributeBarrierOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeSetpointChangeAmountWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::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)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSetpointChangeSourceTimestampWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // 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 = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeSetpointChangeSourceTimestampWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)readAttributeOccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierClosePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::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)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeOccupiedSetbackWithValue:value params:nil completion:completionHandler]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeOccupiedSetbackWithValue:value params:params completion:completionHandler]; + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeBarrierPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOccupiedSetbackWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + 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 = BarrierControl::Attributes::BarrierPosition::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)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeOccupiedSetbackWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeOccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOccupiedSetbackMinWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + auto * bridge = new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BarrierControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::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)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeOccupiedSetbackMinWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeOccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOccupiedSetbackMaxWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + auto * bridge = new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BarrierControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::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)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeOccupiedSetbackMaxWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeUnoccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value - completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeUnoccupiedSetbackWithValue:value params:nil completion:completionHandler]; + auto * bridge = new MTRBarrierControlAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BarrierControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::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)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeUnoccupiedSetbackWithValue:value params:params completion:completionHandler]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUnoccupiedSetbackWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeUnoccupiedSetbackWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::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)readAttributeUnoccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUnoccupiedSetbackMinWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUnoccupiedSetbackMinWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + ++ (void)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 = BarrierControl::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeUnoccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterBarrierControl (Deprecated) + +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self barrierControlGoToPercentWithParams:params completion:completionHandler]; } -- (void)subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUnoccupiedSetbackMaxWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self barrierControlStopWithParams:params completion:completionHandler]; } -+ (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)barrierControlStopWithCompletionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeUnoccupiedSetbackMaxWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self barrierControlStopWithParams:nil completionHandler:completionHandler]; } -- (void)readAttributeEmergencyHeatDeltaWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeBarrierMovingStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBarrierMovingStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeEmergencyHeatDeltaWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeEmergencyHeatDeltaWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: @@ -70413,20 +55459,20 @@ - (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeEmergencyHeatDeltaWithParams:subscribeParams + [self subscribeAttributeBarrierMovingStateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeEmergencyHeatDeltaWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeBarrierMovingStateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -70435,28 +55481,21 @@ + (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheCont }]; } -- (void)readAttributeACTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBarrierSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACTypeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACTypeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -70465,50 +55504,43 @@ - (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeACTypeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeBarrierSafetyStatusWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeACTypeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeBarrierSafetyStatusWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeACCapacityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBarrierCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACCapacityWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACCapacityWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -70517,46 +55549,47 @@ - (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeACCapacityWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACCapacityWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeBarrierCapabilitiesWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } ++ (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCapabilitiesWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} -- (void)readAttributeACRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBarrierOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeACRefrigerantTypeWithValue:value params:nil completion:completionHandler]; + [self writeAttributeBarrierOpenEventsWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeACRefrigerantTypeWithValue:value params:params completion:completionHandler]; + [self writeAttributeBarrierOpenEventsWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: @@ -70571,20 +55604,20 @@ - (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeACRefrigerantTypeWithParams:subscribeParams + [self subscribeAttributeBarrierOpenEventsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeACRefrigerantTypeWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeBarrierOpenEventsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -70593,30 +55626,32 @@ + (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheConta }]; } -- (void)readAttributeACCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBarrierCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeACCompressorTypeWithValue:value params:nil completion:completionHandler]; + [self writeAttributeBarrierCloseEventsWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeACCompressorTypeWithValue:value params:params completion:completionHandler]; + [self writeAttributeBarrierCloseEventsWithValue:value params:params completion:completionHandler]; } -- (void) - subscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -70625,51 +55660,54 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeACCompressorTypeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeBarrierCloseEventsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeACCompressorTypeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeBarrierCloseEventsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeACErrorCodeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBarrierCommandOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeACErrorCodeWithValue:value params:nil completion:completionHandler]; + [self writeAttributeBarrierCommandOpenEventsWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeACErrorCodeWithValue:value params:params completion:completionHandler]; + [self writeAttributeBarrierCommandOpenEventsWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -70678,52 +55716,54 @@ - (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeACErrorCodeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeBarrierCommandOpenEventsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeACErrorCodeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeBarrierCommandOpenEventsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeACLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBarrierCommandCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeACLouverPositionWithValue:value params:nil completion:completionHandler]; + [self writeAttributeBarrierCommandCloseEventsWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeACLouverPositionWithValue:value params:params completion:completionHandler]; + [self writeAttributeBarrierCommandCloseEventsWithValue:value params:params completion:completionHandler]; } -- (void) - subscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -70732,37 +55772,47 @@ - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeACLouverPositionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACLouverPositionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeBarrierCommandCloseEventsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } ++ (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCommandCloseEventsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} -- (void)readAttributeACCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBarrierOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierOpenPeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierOpenPeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: @@ -70777,20 +55827,20 @@ - (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeACCoilTemperatureWithParams:subscribeParams + [self subscribeAttributeBarrierOpenPeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeACCoilTemperatureWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeBarrierOpenPeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -70799,30 +55849,76 @@ + (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheConta }]; } -- (void)readAttributeACCapacityformatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierClosePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierClosePeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierClosePeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBarrierClosePeriodWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierClosePeriodWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBarrierPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACCapacityformatWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACCapacityformatWithValue:value params:params completion:completionHandler]; -} -- (void) - subscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -70831,26 +55927,26 @@ - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeACCapacityformatWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeBarrierPositionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeACCapacityformatWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeBarrierPositionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, @@ -70928,283 +56024,721 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterPumpConfigurationAndControl + +- (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)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeMaxPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::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)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeMaxSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::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)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeMaxFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::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)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeMinConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::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)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeMaxConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::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)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeMinCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::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)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeMaxCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::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)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeMinConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::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)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeMaxConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::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)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + ++ (void)readAttributeMinConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::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; + }); } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -@end - -@implementation MTRBaseClusterFanControl - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)stepWithParams:(MTRFanControlClusterStepParams *)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeMaxConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - FanControl::Commands::Step::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::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; } - request.direction - = static_cast>(params.direction.unsignedCharValue); - if (params.wrap != nil) { - auto & definedValue_0 = request.wrap.Emplace(); - definedValue_0 = params.wrap.boolValue; - } - if (params.lowestOff != nil) { - auto & definedValue_0 = request.lowestOff.Emplace(); - definedValue_0 = params.lowestOff.boolValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); + return CHIP_ERROR_NOT_FOUND; }); - std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeFanModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); ++ (void)readAttributeMinConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::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; } - - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + return CHIP_ERROR_NOT_FOUND; }); - std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeFanModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlClusterFanModeEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FanControlClusterFanModeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -71219,73 +56753,82 @@ + (void)readAttributeFanModeWithClusterStateCache:(MTRClusterStateCacheContainer }); } -- (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); ++ (void)readAttributePumpStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PumpConfigurationAndControlPumpStatusAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::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; } - - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + return CHIP_ERROR_NOT_FOUND; }); - std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeEffectiveOperationModeWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - MTRSubscribeAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeFanModeSequenceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEffectiveOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FanControlClusterFanModeSequenceEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(PumpConfigurationAndControlClusterOperationModeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -71300,77 +56843,38 @@ + (void)readAttributeFanModeSequenceWithClusterStateCache:(MTRClusterStateCacheC }); } -- (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributePercentSettingWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributePercentSettingWithValue:(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 = FanControl::Attributes::PercentSetting::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)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePercentSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEffectiveControlModeWithClusterStateCache:(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) { + auto * bridge = new MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PumpConfigurationAndControlClusterControlModeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -71385,35 +56889,35 @@ + (void)readAttributePercentSettingWithClusterStateCache:(MTRClusterStateCacheCo }); } -- (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePercentCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCapacityWithClusterStateCache:(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); + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -71428,35 +56932,35 @@ + (void)readAttributePercentCurrentWithClusterStateCache:(MTRClusterStateCacheCo }); } -- (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeSpeedMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedWithClusterStateCache:(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); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -71471,21 +56975,21 @@ + (void)readAttributeSpeedMaxWithClusterStateCache:(MTRClusterStateCacheContaine }); } -- (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -71506,13 +57010,13 @@ - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value } ListFreer listFreer; - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; + nonNullValue_0 = value.unsignedIntValue; } chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); @@ -71521,70 +57025,29 @@ - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeSpeedSettingWithClusterStateCache:(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 = FanControl::Attributes::SpeedSetting::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)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLifetimeRunningHoursWithClusterStateCache:(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); + auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -71599,35 +57062,35 @@ + (void)readAttributeSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheCont }); } -- (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeRockSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlRockSupportAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FanControlRockSupportAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -71642,21 +57105,22 @@ + (void)readAttributeRockSupportWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLifetimeEnergyConsumedWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeRockSettingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -71677,9 +57141,14 @@ - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value } ListFreer listFreer; - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -71687,70 +57156,29 @@ - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeRockSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRFanControlRockSettingAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FanControlRockSettingAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::RockSetting::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)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeWindSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLifetimeEnergyConsumedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlWindSupportAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FanControlWindSupportAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -71765,21 +57193,22 @@ + (void)readAttributeWindSupportWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeWindSettingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -71800,7 +57229,7 @@ - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value } ListFreer listFreer; - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); @@ -71810,27 +57239,27 @@ - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeWindSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlWindSettingAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FanControlWindSettingAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PumpConfigurationAndControlClusterOperationModeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -71845,21 +57274,22 @@ + (void)readAttributeWindSettingWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeAirflowDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeControlModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -71880,7 +57310,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value } ListFreer listFreer; - using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); @@ -71890,28 +57320,27 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeAirflowDirectionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAirflowDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlClusterAirflowDirectionEnumAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FanControlClusterAirflowDirectionEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(PumpConfigurationAndControlClusterControlModeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -71929,8 +57358,9 @@ + (void)readAttributeAirflowDirectionWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71939,8 +57369,8 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71951,12 +57381,12 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FanControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(PumpConfigurationAndControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -71974,8 +57404,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71984,8 +57415,8 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71996,55 +57427,12 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlAcceptedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FanControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::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 = FanControl::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRFanControlEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FanControlEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(PumpConfigurationAndControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::EventList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -72062,8 +57450,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72071,10 +57460,10 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -72082,12 +57471,12 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FanControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(PumpConfigurationAndControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -72105,7 +57494,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72114,7 +57503,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -72130,7 +57519,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -72148,7 +57537,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72157,7 +57546,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -72174,7 +57563,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -72191,186 +57580,21 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterFanControl (Deprecated) - -- (void)stepWithParams:(MTRFanControlClusterStepParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepWithParams:params completion:completionHandler]; -} - -- (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeFanModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeFanModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFanModeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFanModeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeFanModeSequenceWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeFanModeSequenceWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFanModeSequenceWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFanModeSequenceWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePercentSettingWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePercentSettingWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePercentSettingWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePercentSettingWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} +@implementation MTRBaseClusterPumpConfigurationAndControl (Deprecated) -- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -72379,37 +57603,37 @@ - (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePercentCurrentWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxPressureWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePercentCurrentWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxPressureWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)( +- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -72422,19 +57646,19 @@ - (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterv subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSpeedMaxWithParams:subscribeParams + [self subscribeAttributeMaxSpeedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSpeedMaxWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeMaxSpeedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -72443,29 +57667,18 @@ + (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)at }]; } -- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSpeedSettingWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSpeedSettingWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -72474,37 +57687,37 @@ - (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSpeedSettingWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxFlowWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSpeedSettingWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxFlowWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void) + subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -72517,190 +57730,42 @@ - (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSpeedCurrentWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSpeedCurrentWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeRockSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRockSupportWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRockSupportWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeRockSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeRockSettingWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeRockSettingWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRockSettingWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRockSettingWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeWindSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeWindSupportWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMinConstPressureWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWindSupportWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMinConstPressureWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWindSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWindSettingWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWindSettingWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -72709,43 +57774,42 @@ - (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWindSettingWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxConstPressureWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWindSettingWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxConstPressureWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -72754,43 +57818,42 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMinCompPressureWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMinCompPressureWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -72799,41 +57862,42 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxCompPressureWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxCompPressureWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -72842,41 +57906,42 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAttributeListWithParams:subscribeParams + [self subscribeAttributeMinConstSpeedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeMinConstSpeedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -72885,41 +57950,41 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxConstSpeedWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxConstSpeedWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -72928,588 +57993,489 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMinConstFlowWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMinConstFlowWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -@end - -@implementation MTRBaseClusterThermostatUserInterfaceConfiguration - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } - return self; -} - -- (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self subscribeAttributeMaxConstFlowWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // 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 = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeMaxConstFlowWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTemperatureDisplayModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - 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 = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinConstTempWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeMinConstTempWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // 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 = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxConstTempWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeKeypadLockoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeMaxConstTempWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeScheduleProgrammingVisibilityWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePumpStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePumpStatusWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // 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 = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributePumpStatusWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeScheduleProgrammingVisibilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - 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 = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeEffectiveOperationModeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeEffectiveOperationModeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeEffectiveControlModeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeEffectiveControlModeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCapacityWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeCapacityWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ThermostatUserInterfaceConfigurationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSpeedWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeSpeedWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ThermostatUserInterfaceConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::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; - }); + [self writeAttributeLifetimeRunningHoursWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeLifetimeRunningHoursWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLifetimeRunningHoursWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeLifetimeRunningHoursWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePowerWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePowerWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -@end - -@implementation MTRBaseClusterThermostatUserInterfaceConfiguration (Deprecated) - -- (void)readAttributeTemperatureDisplayModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeTemperatureDisplayModeWithValue:value params:nil completion:completionHandler]; + [self writeAttributeLifetimeEnergyConsumedWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeTemperatureDisplayModeWithValue:value params:params completion:completionHandler]; + [self writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: @@ -73524,20 +58490,20 @@ - (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Non subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTemperatureDisplayModeWithParams:subscribeParams + [self subscribeAttributeLifetimeEnergyConsumedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTemperatureDisplayModeWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeLifetimeEnergyConsumedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -73546,25 +58512,25 @@ + (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCache }]; } -- (void)readAttributeKeypadLockoutWithCompletionHandler:(void (^)( +- (void)readAttributeOperationModeWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeKeypadLockoutWithValue:value params:nil completion:completionHandler]; + [self writeAttributeOperationModeWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeKeypadLockoutWithValue:value params:params completion:completionHandler]; + [self writeAttributeOperationModeWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -73578,20 +58544,20 @@ - (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeKeypadLockoutWithParams:subscribeParams + [self subscribeAttributeOperationModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeKeypadLockoutWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeOperationModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -73600,32 +58566,29 @@ + (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer }]; } -- (void)readAttributeScheduleProgrammingVisibilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeControlModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeScheduleProgrammingVisibilityWithValue:value params:nil completion:completionHandler]; + [self writeAttributeControlModeWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeScheduleProgrammingVisibilityWithValue:value params:params completion:completionHandler]; + [self writeAttributeControlModeWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -73634,26 +58597,26 @@ - (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeScheduleProgrammingVisibilityWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeControlModeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeScheduleProgrammingVisibilityWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeControlModeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, @@ -73672,876 +58635,233 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterColorControl - -- (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)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.hue = params.hue.unsignedCharValue; - request.direction - = static_cast>(params.direction.unsignedCharValue); - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params completion:(MTRStatusCompletion)completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params - completion:(MTRStatusCompletion)completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToHueAndSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.hue = params.hue.unsignedCharValue; - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToColor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.colorX = params.colorX.unsignedShortValue; - request.colorY = params.colorY.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveColor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.rateX = params.rateX.shortValue; - request.rateY = params.rateY.shortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completion:(MTRStatusCompletion)completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepColor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepX = params.stepX.shortValue; - request.stepY = params.stepY.shortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToColorTemperature::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.colorTemperatureMireds = params.colorTemperatureMireds.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveToHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.enhancedHue = params.enhancedHue.unsignedShortValue; - request.direction - = static_cast>(params.direction.unsignedCharValue); - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedStepHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params - completion:(MTRStatusCompletion)completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.enhancedHue = params.enhancedHue.unsignedShortValue; - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params completion:(MTRStatusCompletion)completion +@end + +@implementation MTRBaseClusterThermostat + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::ColorLoopSet::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.updateFlags - = static_cast>(params.updateFlags.unsignedCharValue); - request.action = static_cast>(params.action.unsignedCharValue); - request.direction - = static_cast>(params.direction.unsignedCharValue); - request.time = params.time.unsignedShortValue; - request.startHue = params.startHue.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; } -- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params completion:(MTRStatusCompletion)completion +- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -74556,7 +58876,7 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - ColorControl::Commands::StopMoveStep::Type request; + Thermostat::Commands::SetpointRaiseLower::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); @@ -74569,8 +58889,8 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; + request.mode = static_cast>(params.mode.unsignedCharValue); + request.amount = params.amount.charValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -74578,8 +58898,7 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param std::move(*bridge).DispatchAction(self.device); } -- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params - completion:(MTRStatusCompletion)completion +- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -74594,7 +58913,7 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - ColorControl::Commands::MoveColorTemperature::Type request; + Thermostat::Commands::SetWeeklySchedule::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); @@ -74607,12 +58926,45 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.moveMode = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedShortValue; - request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; - request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; + request.numberOfTransitionsForSequence = params.numberOfTransitionsForSequence.unsignedCharValue; + request.dayOfWeekForSequence = static_cast>( + params.dayOfWeekForSequence.unsignedCharValue); + request.modeForSequence + = static_cast>(params.modeForSequence.unsignedCharValue); + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.transitions.count != 0) { + auto * listHolder_0 = new ListHolder(params.transitions.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.transitions.count; ++i_0) { + if (![params.transitions[i_0] isKindOfClass:[MTRThermostatClusterThermostatScheduleTransition class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRThermostatClusterThermostatScheduleTransition *) params.transitions[i_0]; + listHolder_0->mList[i_0].transitionTime = element_0.transitionTime.unsignedShortValue; + if (element_0.heatSetpoint == nil) { + listHolder_0->mList[i_0].heatSetpoint.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].heatSetpoint.SetNonNull(); + nonNullValue_2 = element_0.heatSetpoint.shortValue; + } + if (element_0.coolSetpoint == nil) { + listHolder_0->mList[i_0].coolSetpoint.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].coolSetpoint.SetNonNull(); + nonNullValue_2 = element_0.coolSetpoint.shortValue; + } + } + request.transitions = ListType_0(listHolder_0->mList, params.transitions.count); + } else { + request.transitions = ListType_0(); + } + } return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -74620,23 +58972,21 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu std::move(*bridge).DispatchAction(self.device); } -- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params - completion:(MTRStatusCompletion)completion +- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params + completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); + auto * bridge = new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + ThermostatClusterGetWeeklyScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - ColorControl::Commands::StepColorTemperature::Type request; + Thermostat::Commands::GetWeeklySchedule::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); @@ -74649,310 +58999,87 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.stepMode = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; - request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; + request.daysToReturn + = static_cast>(params.daysToReturn.unsignedCharValue); + request.modeToReturn + = static_cast>(params.modeToReturn.unsignedCharValue); return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeCurrentHueWithClusterStateCache:(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 = ColorControl::Attributes::CurrentHue::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)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeCurrentSaturationWithClusterStateCache:(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 = ColorControl::Attributes::CurrentSaturation::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)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeRemainingTimeWithClusterStateCache:(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 = ColorControl::Attributes::RemainingTime::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)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeCurrentXWithClusterStateCache:(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 = ColorControl::Attributes::CurrentX::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)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeCurrentYWithClusterStateCache:(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 = ColorControl::Attributes::CurrentY::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)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self clearWeeklyScheduleWithParams:nil completion:completion]; } - -+ (void)readAttributeDriftCompensationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params + completion:(MTRStatusCompletion)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 = ColorControl::Attributes::DriftCompensation::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + Thermostat::Commands::ClearWeeklySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeCompensationTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeLocalTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -74967,38 +59094,37 @@ + (void)readAttributeCompensationTextWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeOutdoorTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75013,25 +59139,25 @@ + (void)readAttributeColorTemperatureMiredsWithClusterStateCache:(MTRClusterStat }); } -- (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion @@ -75041,7 +59167,7 @@ + (void)readAttributeColorModeWithClusterStateCache:(MTRClusterStateCacheContain clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75056,72 +59182,38 @@ + (void)readAttributeColorModeWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - TypeInfo::Type cppValue; - cppValue = 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)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:(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); + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75136,36 +59228,38 @@ + (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer }); } -- (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeNumberOfPrimariesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75180,35 +59274,38 @@ + (void)readAttributeNumberOfPrimariesWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary1XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75223,35 +59320,38 @@ + (void)readAttributePrimary1XWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary1YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75266,36 +59366,36 @@ + (void)readAttributePrimary1YWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary1IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePICoolingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75310,35 +59410,36 @@ + (void)readAttributePrimary1IntensityWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary2XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75353,79 +59454,75 @@ + (void)readAttributePrimary2XWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributePrimary2YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)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 = ColorControl::Attributes::Primary2Y::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary2IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75440,35 +59537,75 @@ + (void)readAttributePrimary2IntensityWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary3XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocalTemperatureCalibrationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75483,35 +59620,75 @@ + (void)readAttributePrimary3XWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary3YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75526,36 +59703,75 @@ + (void)readAttributePrimary3YWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary3IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75570,35 +59786,75 @@ + (void)readAttributePrimary3IntensityWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary4XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75613,35 +59869,75 @@ + (void)readAttributePrimary4XWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary4YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75656,36 +59952,74 @@ + (void)readAttributePrimary4YWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary4IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75700,35 +60034,74 @@ + (void)readAttributePrimary4IntensityWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary5XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75743,35 +60116,74 @@ + (void)readAttributePrimary5XWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary5YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75786,79 +60198,74 @@ + (void)readAttributePrimary5YWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributePrimary5IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)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 = ColorControl::Attributes::Primary5Intensity::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary6XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75873,35 +60280,74 @@ + (void)readAttributePrimary6XWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary6YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinSetpointDeadBandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75916,36 +60362,72 @@ + (void)readAttributePrimary6YWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePrimary6IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRemoteSensingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75960,21 +60442,23 @@ + (void)readAttributePrimary6IntensityWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -75995,9 +60479,9 @@ - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value } ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -76005,27 +60489,29 @@ - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeWhitePointXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeControlSequenceOfOperationWithClusterStateCache:(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) { + auto * bridge = new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ThermostatClusterThermostatControlSequenceAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76040,21 +60526,21 @@ + (void)readAttributeWhitePointXWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSystemModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -76075,9 +60561,9 @@ - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value } ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + cppValue = value.unsignedCharValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -76085,27 +60571,115 @@ - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeSystemModeWithClusterStateCache:(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 = Thermostat::Attributes::SystemMode::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)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeThermostatRunningModeWithClusterStateCache:(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 = Thermostat::Attributes::ThermostatRunningMode::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)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeWhitePointYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeStartOfWeekWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76120,72 +60694,84 @@ + (void)readAttributeWhitePointYWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); ++ (void)readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:(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 = Thermostat::Attributes::NumberOfWeeklyTransitions::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; } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + return CHIP_ERROR_NOT_FOUND; }); - std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - MTRSubscribeAttribute(params, + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorPointRXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfDailyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76200,21 +60786,22 @@ + (void)readAttributeColorPointRXWithClusterStateCache:(MTRClusterStateCacheCont }); } -- (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -76235,9 +60822,9 @@ - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value } ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + cppValue = value.unsignedCharValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -76245,27 +60832,29 @@ - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorPointRYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureSetpointHoldWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76280,21 +60869,23 @@ + (void)readAttributeColorPointRYWithClusterStateCache:(MTRClusterStateCacheCont }); } -- (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion { - [self writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -76315,13 +60906,13 @@ - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value } ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; + nonNullValue_0 = value.unsignedShortValue; } chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); @@ -76330,29 +60921,31 @@ - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorPointRIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureSetpointHoldDurationWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76367,21 +60960,23 @@ + (void)readAttributeColorPointRIntensityWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion { - [self writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -76402,9 +60997,9 @@ - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value } ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + cppValue = value.unsignedCharValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -76412,27 +61007,31 @@ - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorPointGXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThermostatProgrammingOperationModeWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76447,72 +61046,38 @@ + (void)readAttributeColorPointGXWithClusterStateCache:(MTRClusterStateCacheCont }); } -- (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThermostatRunningStateWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorPointGYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThermostatRunningStateWithClusterStateCache:(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 = ColorControl::Attributes::ColorPointGY::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76527,79 +61092,82 @@ + (void)readAttributeColorPointGYWithClusterStateCache:(MTRClusterStateCacheCont }); } -- (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)writeAttributeColorPointGIntensityWithValue:(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); ++ (void)readAttributeSetpointChangeSourceWithClusterStateCache:(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 = Thermostat::Attributes::SetpointChangeSource::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; } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::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); + return CHIP_ERROR_NOT_FOUND; }); - std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorPointGIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeSetpointChangeAmountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76614,21 +61182,68 @@ + (void)readAttributeColorPointGIntensityWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - [self writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion + ++ (void)readAttributeSetpointChangeSourceTimestampWithClusterStateCache:(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 = Thermostat::Attributes::SetpointChangeSourceTimestamp::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)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -76649,9 +61264,14 @@ - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value } ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + 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); @@ -76659,27 +61279,28 @@ - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorPointBXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76694,72 +61315,82 @@ + (void)readAttributeColorPointBXWithClusterStateCache:(MTRClusterStateCacheCont }); } -- (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); ++ (void)readAttributeOccupiedSetbackMinWithClusterStateCache:(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 = Thermostat::Attributes::OccupiedSetbackMin::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; } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + return CHIP_ERROR_NOT_FOUND; }); - std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - MTRSubscribeAttribute(params, + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorPointBYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76774,21 +61405,21 @@ + (void)readAttributeColorPointBYWithClusterStateCache:(MTRClusterStateCacheCont }); } -- (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -76809,7 +61440,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value } ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -76824,29 +61455,28 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorPointBIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedSetbackWithClusterStateCache:(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 = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76861,37 +61491,37 @@ + (void)readAttributeColorPointBIntensityWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeEnhancedCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76906,36 +61536,37 @@ + (void)readAttributeEnhancedCurrentHueWithClusterStateCache:(MTRClusterStateCac }); } -- (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeEnhancedColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedSetbackMaxWithClusterStateCache:(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); + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76950,70 +61581,63 @@ + (void)readAttributeEnhancedColorModeWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeColorLoopActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)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 = ColorControl::Attributes::ColorLoopActive::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeEmergencyHeatDeltaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: @@ -77024,7 +61648,7 @@ + (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCac clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -77039,35 +61663,72 @@ + (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCac }); } -- (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeACTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorLoopTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -77082,38 +61743,72 @@ + (void)readAttributeColorLoopTimeWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + [self writeAttributeACCapacityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorLoopStartEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeACCapacityWithClusterStateCache:(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 = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -77128,38 +61823,73 @@ + (void)readAttributeColorLoopStartEnhancedHueWithClusterStateCache:(MTRClusterS }); } -- (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeACRefrigerantTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -77174,36 +61904,73 @@ + (void)readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:(MTRCluster }); } -- (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACCompressorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -77218,38 +61985,72 @@ + (void)readAttributeColorCapabilitiesWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeACErrorCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -77264,38 +62065,73 @@ + (void)readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:(MTRCluster }); } -- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeACLouverPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -77310,40 +62146,36 @@ + (void)readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:(MTRCluster }); } -- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeACCoilTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -77358,22 +62190,21 @@ + (void)readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache: }); } -- (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -77394,14 +62225,9 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullab } ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } + cppValue = value.unsignedCharValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -77409,30 +62235,28 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullab std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeACCapacityformatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -77450,8 +62274,8 @@ + (void)readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:(MTRClus - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -77460,8 +62284,8 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -77472,12 +62296,12 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRColorControlGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRThermostatGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ColorControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(ThermostatGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -77495,8 +62319,8 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -77505,8 +62329,8 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -77517,55 +62341,12 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRColorControlAcceptedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRThermostatAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ColorControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::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 = ColorControl::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRColorControlEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(ColorControlEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(ThermostatAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -77583,8 +62364,8 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -77592,8 +62373,8 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute( + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -77603,482 +62384,162 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRColorControlAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRThermostatAttributeListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ColorControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::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 = ColorControl::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 = ColorControl::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 = ColorControl::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 = ColorControl::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 = ColorControl::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) { + ^(ThermostatAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Thermostat::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; - }); -} - -@end - -@implementation MTRBaseClusterColorControl (Deprecated) - -- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToHueWithParams:params completion:completionHandler]; -} -- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveHueWithParams:params completion:completionHandler]; -} -- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepHueWithParams:params completion:completionHandler]; -} -- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToSaturationWithParams:params completion:completionHandler]; -} -- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveSaturationWithParams:params completion:completionHandler]; -} -- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepSaturationWithParams:params completion:completionHandler]; -} -- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToHueAndSaturationWithParams:params completion:completionHandler]; -} -- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToColorWithParams:params completion:completionHandler]; -} -- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveColorWithParams:params completion:completionHandler]; -} -- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepColorWithParams:params completion:completionHandler]; -} -- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToColorTemperatureWithParams:params completion:completionHandler]; -} -- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self enhancedMoveToHueWithParams:params completion:completionHandler]; -} -- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self enhancedMoveHueWithParams:params completion:completionHandler]; -} -- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self enhancedStepHueWithParams:params completion:completionHandler]; -} -- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self enhancedMoveToHueAndSaturationWithParams:params completion:completionHandler]; -} -- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self colorLoopSetWithParams:params completion:completionHandler]; -} -- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stopMoveStepWithParams:params completion:completionHandler]; -} -- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveColorTemperatureWithParams:params completion:completionHandler]; -} -- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepColorTemperatureWithParams:params completion:completionHandler]; -} - -- (void)readAttributeCurrentHueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentHueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentHueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentSaturationWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentSaturationWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + 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)readAttributeRemainingTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRemainingTimeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRemainingTimeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::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)readAttributeCurrentXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentXWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeCurrentXWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)readAttributeCurrentYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterThermostat (Deprecated) + +- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentYWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self setpointRaiseLowerWithParams:params completion:completionHandler]; } -+ (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeCurrentYWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self setWeeklyScheduleWithParams:params completion:completionHandler]; } - -- (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params + completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self getWeeklyScheduleWithParams:params + completion:^( + MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDriftCompensationWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self clearWeeklyScheduleWithParams:params completion:completionHandler]; } -+ (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)clearWeeklyScheduleWithCompletionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeDriftCompensationWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self clearWeeklyScheduleWithParams:nil completionHandler:completionHandler]; } -- (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, +- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } - (void) - subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval + subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78087,43 +62548,43 @@ - (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCompensationTextWithParams:subscribeParams + [self subscribeAttributeLocalTemperatureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCompensationTextWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeLocalTemperatureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue - completion:^(NSString * _Nullable value, NSError * _Nullable error) { + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78132,37 +62593,37 @@ - (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Non subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorTemperatureMiredsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOutdoorTemperatureWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorTemperatureMiredsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOutdoorTemperatureWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorModeWithCompletionHandler:(void (^)( +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -78175,19 +62636,19 @@ - (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorModeWithParams:subscribeParams + [self subscribeAttributeOccupancyWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorModeWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeOccupancyWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -78196,28 +62657,66 @@ + (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)a }]; } -- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - [self writeAttributeOptionsWithValue:value params:nil completion:completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAbsMinHeatSetpointLimitWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler ++ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeOptionsWithValue:value params:params completion:completionHandler]; + [self readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78226,42 +62725,43 @@ - (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterva subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOptionsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAbsMaxHeatSetpointLimitWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOptionsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78270,41 +62770,43 @@ - (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeNumberOfPrimariesWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAbsMinCoolSetpointLimitWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNumberOfPrimariesWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary1XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78313,40 +62815,42 @@ - (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary1XWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAbsMaxCoolSetpointLimitWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary1XWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary1YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePICoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78355,42 +62859,42 @@ - (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary1YWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePICoolingDemandWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary1YWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePICoolingDemandWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePIHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78399,41 +62903,54 @@ - (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary1IntensityWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePIHeatingDemandWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary1IntensityWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePIHeatingDemandWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary2XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78442,40 +62959,54 @@ - (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary2XWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeHVACSystemTypeConfigurationWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary2XWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeHVACSystemTypeConfigurationWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary2YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLocalTemperatureCalibrationWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLocalTemperatureCalibrationWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78484,42 +63015,54 @@ - (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary2YWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeLocalTemperatureCalibrationWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary2YWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeLocalTemperatureCalibrationWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedCoolingSetpointWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedCoolingSetpointWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78528,41 +63071,54 @@ - (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary2IntensityWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOccupiedCoolingSetpointWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary2IntensityWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOccupiedCoolingSetpointWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary3XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedHeatingSetpointWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedHeatingSetpointWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78571,40 +63127,54 @@ - (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary3XWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOccupiedHeatingSetpointWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary3XWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOccupiedHeatingSetpointWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary3YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedCoolingSetpointWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedCoolingSetpointWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78613,42 +63183,54 @@ - (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary3YWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUnoccupiedCoolingSetpointWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary3YWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedHeatingSetpointWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedHeatingSetpointWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78657,41 +63239,54 @@ - (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary3IntensityWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUnoccupiedHeatingSetpointWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary3IntensityWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary4XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinHeatSetpointLimitWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinHeatSetpointLimitWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78700,40 +63295,54 @@ - (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary4XWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMinHeatSetpointLimitWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary4XWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMinHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary4YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMaxHeatSetpointLimitWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMaxHeatSetpointLimitWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78742,42 +63351,54 @@ - (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary4YWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxHeatSetpointLimitWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary4YWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinCoolSetpointLimitWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinCoolSetpointLimitWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78786,41 +63407,54 @@ - (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary4IntensityWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMinCoolSetpointLimitWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary4IntensityWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMinCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary5XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMaxCoolSetpointLimitWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMaxCoolSetpointLimitWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78829,40 +63463,54 @@ - (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary5XWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxCoolSetpointLimitWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary5XWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary5YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinSetpointDeadBandWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinSetpointDeadBandWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78871,42 +63519,52 @@ - (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary5YWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMinSetpointDeadBandWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary5YWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMinSetpointDeadBandWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRemoteSensingWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRemoteSensingWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78915,41 +63573,54 @@ - (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary5IntensityWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeRemoteSensingWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary5IntensityWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeRemoteSensingWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary6XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeControlSequenceOfOperationWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeControlSequenceOfOperationWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -78958,40 +63629,51 @@ - (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary6XWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeControlSequenceOfOperationWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary6XWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeControlSequenceOfOperationWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary6YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSystemModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSystemModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSystemModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79000,42 +63682,42 @@ - (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary6YWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSystemModeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary6YWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSystemModeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79044,47 +63726,37 @@ - (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary6IntensityWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeThermostatRunningModeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary6IntensityWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeThermostatRunningModeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWhitePointXWithCompletionHandler:(void (^)( +- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWhitePointXWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWhitePointXWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -79097,20 +63769,20 @@ - (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWhitePointXWithParams:subscribeParams + [self subscribeAttributeStartOfWeekWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWhitePointXWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeStartOfWeekWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -79119,29 +63791,21 @@ + (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer * }]; } -- (void)readAttributeWhitePointYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWhitePointYWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWhitePointYWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79150,51 +63814,43 @@ - (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWhitePointYWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeNumberOfWeeklyTransitionsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeWhitePointYWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorPointRXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointRXWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointRXWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79203,51 +63859,54 @@ - (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointRXWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeNumberOfDailyTransitionsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointRXWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeNumberOfDailyTransitionsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorPointRYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointRYWithValue:value params:nil completion:completionHandler]; + [self writeAttributeTemperatureSetpointHoldWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointRYWithValue:value params:params completion:completionHandler]; + [self writeAttributeTemperatureSetpointHoldWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79256,54 +63915,54 @@ - (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointRYWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeTemperatureSetpointHoldWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointRYWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeTemperatureSetpointHoldWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointRIntensityWithValue:value params:nil completion:completionHandler]; + [self writeAttributeTemperatureSetpointHoldDurationWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointRIntensityWithValue:value params:params completion:completionHandler]; + [self writeAttributeTemperatureSetpointHoldDurationWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79312,51 +63971,55 @@ - (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointRIntensityWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeTemperatureSetpointHoldDurationWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorPointRIntensityWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self + readAttributeTemperatureSetpointHoldDurationWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorPointGXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointGXWithValue:value params:nil completion:completionHandler]; + [self writeAttributeThermostatProgrammingOperationModeWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointGXWithValue:value params:params completion:completionHandler]; + [self writeAttributeThermostatProgrammingOperationModeWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79365,51 +64028,89 @@ - (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointGXWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeThermostatProgrammingOperationModeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorPointGXWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeThermostatProgrammingOperationModeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorPointGYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeColorPointGYWithValue:value params:nil completion:completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeThermostatRunningStateWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler ++ (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeColorPointGYWithValue:value params:params completion:completionHandler]; + [self readAttributeThermostatRunningStateWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79418,48 +64119,37 @@ - (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointGYWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSetpointChangeSourceWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointGYWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSetpointChangeSourceWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointGIntensityWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointGIntensityWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: @@ -79474,20 +64164,20 @@ - (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointGIntensityWithParams:subscribeParams + [self subscribeAttributeSetpointChangeAmountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointGIntensityWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeSetpointChangeAmountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -79496,29 +64186,21 @@ + (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheCo }]; } -- (void)readAttributeColorPointBXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointBXWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointBXWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79527,51 +64209,52 @@ - (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointBXWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSetpointChangeSourceTimestampWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorPointBXWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSetpointChangeSourceTimestampWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorPointBYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointBYWithValue:value params:nil completion:completionHandler]; + [self writeAttributeOccupiedSetbackWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointBYWithValue:value params:params completion:completionHandler]; + [self writeAttributeOccupiedSetbackWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79580,54 +64263,43 @@ - (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointBYWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOccupiedSetbackWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointBYWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOccupiedSetbackWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointBIntensityWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointBIntensityWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79636,37 +64308,37 @@ - (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointBIntensityWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOccupiedSetbackMinWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointBIntensityWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOccupiedSetbackMinWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeOccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: @@ -79681,20 +64353,20 @@ - (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeEnhancedCurrentHueWithParams:subscribeParams + [self subscribeAttributeOccupiedSetbackMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeEnhancedCurrentHueWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeOccupiedSetbackMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -79703,15 +64375,26 @@ + (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheCont }]; } -- (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeUnoccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedSetbackWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedSetbackWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: @@ -79726,20 +64409,20 @@ - (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeEnhancedColorModeWithParams:subscribeParams + [self subscribeAttributeUnoccupiedSetbackWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeEnhancedColorModeWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeUnoccupiedSetbackWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -79748,20 +64431,21 @@ + (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheConta }]; } -- (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79770,37 +64454,93 @@ - (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorLoopActiveWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUnoccupiedSetbackMinWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorLoopActiveWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUnoccupiedSetbackMinWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeUnoccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeUnoccupiedSetbackMaxWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUnoccupiedSetbackMaxWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeEmergencyHeatDeltaWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeEmergencyHeatDeltaWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeEmergencyHeatDeltaWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: @@ -79815,20 +64555,20 @@ - (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorLoopDirectionWithParams:subscribeParams + [self subscribeAttributeEmergencyHeatDeltaWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorLoopDirectionWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeEmergencyHeatDeltaWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -79837,20 +64577,28 @@ + (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheCont }]; } -- (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeACTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACTypeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACTypeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79859,88 +64607,50 @@ - (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorLoopTimeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeACTypeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorLoopTimeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeACTypeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeACCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeColorLoopStartEnhancedHueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeColorLoopStartEnhancedHueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeACCapacityWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeACCapacityWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79949,37 +64659,46 @@ - (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorLoopStoredEnhancedHueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeACCapacityWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeACCapacityWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeACRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACRefrigerantTypeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACRefrigerantTypeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: @@ -79994,20 +64713,20 @@ - (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorCapabilitiesWithParams:subscribeParams + [self subscribeAttributeACRefrigerantTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorCapabilitiesWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeACRefrigerantTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -80016,21 +64735,30 @@ + (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheConta }]; } -- (void)readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeACCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCompressorTypeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCompressorTypeWithValue:value params:params completion:completionHandler]; +} +- (void) + subscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -80039,43 +64767,51 @@ - (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorTempPhysicalMinMiredsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeACCompressorTypeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeACCompressorTypeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeACErrorCodeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACErrorCodeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACErrorCodeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -80084,43 +64820,52 @@ - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorTempPhysicalMaxMiredsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeACErrorCodeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeACErrorCodeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeACLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACLouverPositionWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACLouverPositionWithValue:value params:params completion:completionHandler]; +} +- (void) + subscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -80129,55 +64874,97 @@ - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumb subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeACLouverPositionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self - readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeACLouverPositionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeACCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value - completionHandler:(MTRStatusCompletion)completionHandler +- (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeStartUpColorTemperatureMiredsWithValue:value params:nil completion:completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeACCoilTemperatureWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler ++ (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeStartUpColorTemperatureMiredsWithValue:value params:params completion:completionHandler]; + [self readAttributeACCoilTemperatureWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + +- (void)readAttributeACCapacityformatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCapacityformatWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCapacityformatWithValue:value params:params completion:completionHandler]; +} +- (void) + subscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -80186,26 +64973,26 @@ - (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeStartUpColorTemperatureMiredsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeACCapacityformatWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeACCapacityformatWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, @@ -80380,221 +65167,90 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterBallastConfiguration - -- (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)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributePhysicalMinLevelWithClusterStateCache:(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 = BallastConfiguration::Attributes::PhysicalMinLevel::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)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + }]; } -+ (void)readAttributePhysicalMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -+ (void)readAttributeBallastStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterFanControl + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - 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 = BallastConfiguration::Attributes::BallastStatus::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; } -- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeMinLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeFanModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -80615,9 +65271,9 @@ - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -80625,27 +65281,27 @@ - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFanModeWithClusterStateCache:(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) { + auto * bridge = new MTRFanControlClusterFanModeEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(FanControlClusterFanModeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -80660,21 +65316,21 @@ + (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContaine }); } -- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -80695,9 +65351,9 @@ - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -80705,27 +65361,28 @@ - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFanModeSequenceWithClusterStateCache:(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) { + auto * bridge = new MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(FanControlClusterFanModeSequenceEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -80740,22 +65397,21 @@ + (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContaine }); } -- (void)readAttributeIntrinsicBallastFactorWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributePercentSettingWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -80776,7 +65432,7 @@ - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)valu } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -80791,29 +65447,27 @@ - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)valu std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeIntrinsicBallastFactorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeIntrinsicBallastFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePercentSettingWithClusterStateCache:(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 = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -80828,80 +65482,35 @@ + (void)readAttributeIntrinsicBallastFactorWithClusterStateCache:(MTRClusterStat }); } -- (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeBallastFactorAdjustmentWithValue:(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 = BallastConfiguration::Attributes::BallastFactorAdjustment::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)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeBallastFactorAdjustmentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePercentCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -80916,35 +65525,35 @@ + (void)readAttributeBallastFactorAdjustmentWithClusterStateCache:(MTRClusterSta }); } -- (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeLampQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedMaxWithClusterStateCache:(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 = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -80959,21 +65568,21 @@ + (void)readAttributeLampQuantityWithClusterStateCache:(MTRClusterStateCacheCont }); } -- (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampTypeWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -80994,9 +65603,14 @@ - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; + 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); @@ -81004,27 +65618,27 @@ - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeLampTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -81039,73 +65653,35 @@ + (void)readAttributeLampTypeWithClusterStateCache:(MTRClusterStateCacheContaine }); } -- (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLampManufacturerWithValue:(NSString * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - 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 = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeLampManufacturerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -81114,83 +65690,41 @@ + (void)readAttributeLampManufacturerWithClusterStateCache:(MTRClusterStateCache if (err == CHIP_NO_ERROR) { successCb(bridge, value); } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeLampRatedHoursWithValue:(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 = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; + return err; } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + return CHIP_ERROR_NOT_FOUND; }); - std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; - MTRSubscribeAttribute(params, + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeLampRatedHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRockSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFanControlRockSupportAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(FanControlRockSupportAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -81205,21 +65739,21 @@ + (void)readAttributeLampRatedHoursWithClusterStateCache:(MTRClusterStateCacheCo }); } -- (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeRockSettingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81240,14 +65774,9 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -81255,27 +65784,27 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeLampBurnHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRockSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFanControlRockSettingAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(FanControlRockSettingAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -81290,72 +65819,35 @@ + (void)readAttributeLampBurnHoursWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = 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)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeLampAlarmModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWindSupportWithClusterStateCache:(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); + auto * bridge = new MTRFanControlWindSupportAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(FanControlWindSupportAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -81370,22 +65862,21 @@ + (void)readAttributeLampAlarmModeWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeWindSettingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81406,14 +65897,9 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)valu } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -81421,29 +65907,27 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)valu std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeLampBurnHoursTripPointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeWindSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFanControlWindSettingAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(FanControlWindSettingAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -81461,9 +65945,8 @@ + (void)readAttributeLampBurnHoursTripPointWithClusterStateCache:(MTRClusterStat - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81472,8 +65955,8 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81484,12 +65967,12 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFanControlGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BallastConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(FanControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -81507,9 +65990,8 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81518,8 +66000,8 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81530,55 +66012,12 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BallastConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::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 = BallastConfiguration::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRBallastConfigurationEventListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFanControlAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BallastConfigurationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(FanControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -81596,8 +66035,8 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81605,10 +66044,10 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -81616,12 +66055,12 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBallastConfigurationAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFanControlAttributeListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BallastConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(FanControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -81639,7 +66078,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81648,7 +66087,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -81664,7 +66103,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -81682,7 +66121,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81691,7 +66130,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -81708,7 +66147,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -81725,22 +66164,30 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterBallastConfiguration (Deprecated) +@implementation MTRBaseClusterFanControl (Deprecated) -- (void)readAttributePhysicalMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void) - subscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeFanModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeFanModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -81749,42 +66196,51 @@ - (void)readAttributePhysicalMinLevelWithCompletionHandler:(void (^)(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePhysicalMinLevelWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeFanModeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePhysicalMinLevelWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeFanModeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePhysicalMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void) - subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeFanModeSequenceWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeFanModeSequenceWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -81793,42 +66249,52 @@ - (void)readAttributePhysicalMaxLevelWithCompletionHandler:(void (^)(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePhysicalMaxLevelWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeFanModeSequenceWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePhysicalMaxLevelWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeFanModeSequenceWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBallastStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePercentSettingWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePercentSettingWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -81837,51 +66303,42 @@ - (void)subscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBallastStatusWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePercentSettingWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBallastStatusWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePercentSettingWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; -} -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinLevelWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinLevelWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +} +- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -81890,46 +66347,37 @@ - (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterv subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMinLevelWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePercentCurrentWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinLevelWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePercentCurrentWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( +- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMaxLevelWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMaxLevelWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -81942,19 +66390,19 @@ - (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterv subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMaxLevelWithParams:subscribeParams + [self subscribeAttributeSpeedMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxLevelWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeSpeedMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -81963,127 +66411,25 @@ + (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)at }]; } -- (void)readAttributeIntrinsicBalanceFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeIntrinsicBallastFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeIntrinsicBallastFactorWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeIntrinsicBallastFactorWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeIntrinsicBallastFactorWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeIntrinsicBallastFactorWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBallastFactorAdjustmentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBallastFactorAdjustmentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBallastFactorAdjustmentWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBallastFactorAdjustmentWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBallastFactorAdjustmentWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeBallastFactorAdjustmentWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeSpeedSettingWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeLampQuantityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeSpeedSettingWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -82096,20 +66442,20 @@ - (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLampQuantityWithParams:subscribeParams + [self subscribeAttributeSpeedSettingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLampQuantityWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeSpeedSettingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -82118,82 +66464,19 @@ + (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer }]; } -- (void)readAttributeLampTypeWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLampTypeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLampTypeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLampTypeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLampTypeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeLampManufacturerWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLampManufacturerWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLampManufacturerWithValue:value params:params completion:completionHandler]; -} -- (void) - subscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -82202,52 +66485,41 @@ - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLampManufacturerWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSpeedCurrentWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLampManufacturerWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSpeedCurrentWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLampRatedHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRockSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLampRatedHoursWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLampRatedHoursWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -82256,52 +66528,51 @@ - (void)subscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLampRatedHoursWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeRockSupportWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLampRatedHoursWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeRockSupportWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLampBurnHoursWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRockSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeLampBurnHoursWithValue:value params:nil completion:completionHandler]; + [self writeAttributeRockSettingWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeLampBurnHoursWithValue:value params:params completion:completionHandler]; + [self writeAttributeRockSettingWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -82310,52 +66581,41 @@ - (void)subscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLampBurnHoursWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeRockSettingWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLampBurnHoursWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeRockSettingWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLampAlarmModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWindSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLampAlarmModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLampAlarmModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -82364,54 +66624,51 @@ - (void)subscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLampAlarmModeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeWindSupportWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLampAlarmModeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeWindSupportWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLampBurnHoursTripPointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWindSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeLampBurnHoursTripPointWithValue:value params:nil completion:completionHandler]; + [self writeAttributeWindSettingWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeLampBurnHoursTripPointWithValue:value params:params completion:completionHandler]; + [self writeAttributeWindSettingWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -82420,26 +66677,26 @@ - (void)subscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Non subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLampBurnHoursTripPointWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeWindSettingWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLampBurnHoursTripPointWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeWindSettingWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, @@ -82668,7 +66925,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterIlluminanceMeasurement +@implementation MTRBaseClusterThermostatUserInterfaceConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -82683,79 +66940,75 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureDisplayModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -82770,79 +67023,72 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeKeypadLockoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -82857,37 +67103,76 @@ + (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScheduleProgrammingVisibilityWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -+ (void)readAttributeLightSensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - auto * bridge = new MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(NullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeScheduleProgrammingVisibilityWithClusterStateCache:(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 = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -82905,8 +67190,8 @@ + (void)readAttributeLightSensorTypeWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82916,10 +67201,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, + self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -82928,12 +67213,12 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(IlluminanceMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(ThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -82951,8 +67236,8 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82962,10 +67247,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, + self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -82974,55 +67259,12 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(IlluminanceMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::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 = IlluminanceMeasurement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRIlluminanceMeasurementEventListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(IlluminanceMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(ThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -83040,8 +67282,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83049,8 +67292,8 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83060,12 +67303,12 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(IlluminanceMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(ThermostatUserInterfaceConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -83083,7 +67326,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83092,7 +67335,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -83108,7 +67351,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -83126,7 +67369,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83135,7 +67378,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -83152,7 +67395,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -83169,110 +67412,34 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterIlluminanceMeasurement (Deprecated) - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMeasuredValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void) - subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@implementation MTRBaseClusterThermostatUserInterfaceConfiguration (Deprecated) + +- (void)readAttributeTemperatureDisplayModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void) - subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeTemperatureDisplayModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeTemperatureDisplayModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -83281,41 +67448,52 @@ - (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeTemperatureDisplayModeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeTemperatureDisplayModeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeKeypadLockoutWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeKeypadLockoutWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeKeypadLockoutWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -83324,41 +67502,54 @@ - (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeToleranceWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeKeypadLockoutWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeKeypadLockoutWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeScheduleProgrammingVisibilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeScheduleProgrammingVisibilityWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeScheduleProgrammingVisibilityWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -83367,26 +67558,26 @@ - (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLightSensorTypeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeScheduleProgrammingVisibilityWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeLightSensorTypeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeScheduleProgrammingVisibilityWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, @@ -83615,7 +67806,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterTemperatureMeasurement +@implementation MTRBaseClusterColorControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -83624,264 +67815,807 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return nil; } - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::MoveToHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.hue = params.hue.unsignedCharValue; + request.direction + = static_cast>(params.direction.unsignedCharValue); + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::MoveHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.moveMode = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::StepHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.stepMode = static_cast>(params.stepMode.unsignedCharValue); + request.stepSize = params.stepSize.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::MoveToSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.saturation = params.saturation.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::MoveSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.moveMode = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::StepSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.stepMode = static_cast>(params.stepMode.unsignedCharValue); + request.stepSize = params.stepSize.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::MoveToHueAndSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.hue = params.hue.unsignedCharValue; + request.saturation = params.saturation.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::MoveToColor::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.colorX = params.colorX.unsignedShortValue; + request.colorY = params.colorY.unsignedShortValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completion:(MTRStatusCompletion)completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::MoveColor::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.rateX = params.rateX.shortValue; + request.rateY = params.rateY.shortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::StepColor::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.stepX = params.stepX.shortValue; + request.stepY = params.stepY.shortValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params + completion:(MTRStatusCompletion)completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::MoveToColorTemperature::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.colorTemperatureMireds = params.colorTemperatureMireds.unsignedShortValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::EnhancedMoveToHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.enhancedHue = params.enhancedHue.unsignedShortValue; + request.direction + = static_cast>(params.direction.unsignedCharValue); + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params completion:(MTRStatusCompletion)completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::EnhancedMoveHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.moveMode = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::EnhancedStepHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.stepMode = static_cast>(params.stepMode.unsignedCharValue); + request.stepSize = params.stepSize.unsignedShortValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params + completion:(MTRStatusCompletion)completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.enhancedHue = params.enhancedHue.unsignedShortValue; + request.saturation = params.saturation.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params completion:(MTRStatusCompletion)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 = TemperatureMeasurement::Attributes::Tolerance::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::ColorLoopSet::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.updateFlags + = static_cast>(params.updateFlags.unsignedCharValue); + request.action = static_cast>(params.action.unsignedCharValue); + request.direction + = static_cast>(params.direction.unsignedCharValue); + request.time = params.time.unsignedShortValue; + request.startHue = params.startHue.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params completion:(MTRStatusCompletion)completion { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::StopMoveStep::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params + completion:(MTRStatusCompletion)completion { - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::MoveColorTemperature::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.moveMode = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedShortValue; + request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; + request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TemperatureMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::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); + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::StepColorTemperature::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.stepMode = static_cast>(params.stepMode.unsignedCharValue); + request.stepSize = params.stepSize.unsignedShortValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; + request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TemperatureMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -83896,35 +68630,36 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::CurrentSaturation::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 +- (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = ColorControl::Attributes::CurrentSaturation::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 ++ (void)readAttributeCurrentSaturationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTemperatureMeasurementEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TemperatureMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = TemperatureMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -83939,35 +68674,35 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TemperatureMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -83982,35 +68717,35 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84025,36 +68760,35 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentYWithClusterStateCache:(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 = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84068,455 +68802,250 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC return CHIP_ERROR_NOT_FOUND; }); } - -@end - -@implementation MTRBaseClusterTemperatureMeasurement (Deprecated) - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMeasuredValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void) - subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void) - subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeToleranceWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeDriftCompensationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + 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 = ColorControl::Attributes::DriftCompensation::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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeCompensationTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::CompensationText::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)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -@end ++ (void)readAttributeColorTemperatureMiredsWithClusterStateCache:(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 = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} -@implementation MTRBaseClusterPressureMeasurement +- (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; ++ (void)readAttributeColorModeWithClusterStateCache:(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 = ColorControl::Attributes::ColorMode::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)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84531,36 +69060,36 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfPrimariesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84575,36 +69104,35 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary1XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84619,25 +69147,25 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributePrimary1YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion @@ -84647,7 +69175,7 @@ + (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContain clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84662,35 +69190,36 @@ + (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary1IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84705,35 +69234,35 @@ + (void)readAttributeScaledValueWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMinScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary2XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84748,35 +69277,79 @@ + (void)readAttributeMinScaledValueWithClusterStateCache:(MTRClusterStateCacheCo }); } -- (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMaxScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary2YWithClusterStateCache:(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 = ColorControl::Attributes::Primary2Y::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)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributePrimary2IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84791,36 +69364,35 @@ + (void)readAttributeMaxScaledValueWithClusterStateCache:(MTRClusterStateCacheCo }); } -- (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeScaledToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary3XWithClusterStateCache:(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 = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84835,35 +69407,35 @@ + (void)readAttributeScaledToleranceWithClusterStateCache:(MTRClusterStateCacheC }); } -- (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeScaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary3YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8sAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8sAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84878,38 +69450,36 @@ + (void)readAttributeScaleWithClusterStateCache:(MTRClusterStateCacheContainer * }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary3IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PressureMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84924,37 +69494,35 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary4XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PressureMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84969,35 +69537,35 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributePrimary4YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPressureMeasurementEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PressureMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -85012,35 +69580,36 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary4IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPressureMeasurementAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PressureMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = PressureMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -85055,35 +69624,35 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary5XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -85098,36 +69667,35 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary5YWithClusterStateCache:(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 = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -85142,670 +69710,653 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC }); } -@end - -@implementation MTRBaseClusterPressureMeasurement (Deprecated) - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMeasuredValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void) - subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler +- (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void) - subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary5IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary5Intensity::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)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeToleranceWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeScaledValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeScaledValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributePrimary6XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeScaledValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary6X::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)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinScaledValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributePrimary6YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMinScaledValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary6Y::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)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxScaledValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributePrimary6IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMaxScaledValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary6Intensity::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)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeScaledToleranceWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - [self readAttributeScaledToleranceWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + 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 = ColorControl::Attributes::WhitePointX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeScaleWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeWhitePointXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeScaleWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::WhitePointX::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)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + 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 = ColorControl::Attributes::WhitePointY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeWhitePointYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + 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 = ColorControl::Attributes::WhitePointY::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)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + // 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 = ColorControl::Attributes::ColorPointRX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeColorPointRXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + 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 = ColorControl::Attributes::ColorPointRX::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)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // 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 = ColorControl::Attributes::ColorPointRY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + +- (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeColorPointRYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + 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 = ColorControl::Attributes::ColorPointRY::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; + }); } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -@end +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointRIntensityWithValue:(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]; -@implementation MTRBaseClusterFlowMeasurement + 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); + } + } -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::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)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; ++ (void)readAttributeColorPointRIntensityWithClusterStateCache:(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 = ColorControl::Attributes::ColorPointRIntensity::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)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointGXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -85820,36 +70371,72 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointGYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -85864,36 +70451,79 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointGIntensityWithValue:(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 = ColorControl::Attributes::ColorPointGIntensity::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)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointGIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -85908,35 +70538,72 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointBXWithClusterStateCache:(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 = FlowMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -85951,82 +70618,72 @@ + (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FlowMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointBYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FlowMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -86041,35 +70698,79 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::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 +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + [self writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointBIntensityWithValue:(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 = ColorControl::Attributes::ColorPointBIntensity::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)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::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 ++ (void)readAttributeColorPointBIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFlowMeasurementEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FlowMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = FlowMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -86084,35 +70785,37 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnhancedCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFlowMeasurementAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FlowMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -86127,35 +70830,36 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnhancedColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -86170,498 +70874,306 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeColorLoopActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopActive::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 MTRBaseClusterFlowMeasurement (Deprecated) - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMeasuredValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void) - subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void) - subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeToleranceWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + 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)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + 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 = ColorControl::Attributes::ColorLoopDirection::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)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeColorLoopTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + 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 = ColorControl::Attributes::ColorLoopTime::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)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeColorLoopStartEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + 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 = ColorControl::Attributes::ColorLoopStartEnhancedHue::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)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + 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 = ColorControl::Attributes::ColorLoopStoredEnhancedHue::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; + }); } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -@end - -@implementation MTRBaseClusterRelativeHumidityMeasurement - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; ++ (void)readAttributeColorCapabilitiesWithClusterStateCache:(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 = ColorControl::Attributes::ColorCapabilities::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)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -86676,36 +71188,38 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -86720,36 +71234,40 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -86764,35 +71282,81 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(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 = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -86810,9 +71374,8 @@ + (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -86821,8 +71384,8 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -86833,12 +71396,12 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRColorControlGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RelativeHumidityMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(ColorControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -86856,9 +71419,8 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -86867,8 +71429,8 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -86879,55 +71441,12 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RelativeHumidityMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::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 = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRColorControlAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RelativeHumidityMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(ColorControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -86945,9 +71464,8 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -86955,10 +71473,10 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -86966,12 +71484,12 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRColorControlAttributeListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RelativeHumidityMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(ColorControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -86989,7 +71507,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -86998,7 +71516,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -87014,7 +71532,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -87032,7 +71550,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87041,7 +71559,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -87058,7 +71576,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -87075,17 +71593,195 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterRelativeHumidityMeasurement (Deprecated) +@implementation MTRBaseClusterColorControl (Deprecated) -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToHueWithParams:params completion:completionHandler]; +} +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveHueWithParams:params completion:completionHandler]; +} +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepHueWithParams:params completion:completionHandler]; +} +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToSaturationWithParams:params completion:completionHandler]; +} +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveSaturationWithParams:params completion:completionHandler]; +} +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepSaturationWithParams:params completion:completionHandler]; +} +- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToHueAndSaturationWithParams:params completion:completionHandler]; +} +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToColorWithParams:params completion:completionHandler]; +} +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveColorWithParams:params completion:completionHandler]; +} +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepColorWithParams:params completion:completionHandler]; +} +- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToColorTemperatureWithParams:params completion:completionHandler]; +} +- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enhancedMoveToHueWithParams:params completion:completionHandler]; +} +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enhancedMoveHueWithParams:params completion:completionHandler]; +} +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enhancedStepHueWithParams:params completion:completionHandler]; +} +- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enhancedMoveToHueAndSaturationWithParams:params completion:completionHandler]; +} +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self colorLoopSetWithParams:params completion:completionHandler]; +} +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stopMoveStepWithParams:params completion:completionHandler]; +} +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveColorTemperatureWithParams:params completion:completionHandler]; +} +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepColorTemperatureWithParams:params completion:completionHandler]; +} + +- (void)readAttributeCurrentHueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentHueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentHueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentSaturationWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentSaturationWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -87099,20 +71795,20 @@ - (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMeasuredValueWithParams:subscribeParams + [self subscribeAttributeRemainingTimeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeRemainingTimeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -87121,20 +71817,19 @@ + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer }]; } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void) - subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -87143,42 +71838,128 @@ - (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeCurrentXWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeCurrentXWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentYWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentYWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } +- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDriftCompensationWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDriftCompensationWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - (void) - subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -87187,37 +71968,82 @@ - (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams + [self subscribeAttributeCompensationTextWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeCompensationTextWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + completion:^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( +- (void)readAttributeColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorTemperatureMiredsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeColorTemperatureMiredsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeColorModeWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -87230,19 +72056,19 @@ - (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeToleranceWithParams:subscribeParams + [self subscribeAttributeColorModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeColorModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { @@ -87251,21 +72077,28 @@ + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)a }]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOptionsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOptionsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -87274,43 +72107,42 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOptionsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOptionsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -87319,41 +72151,41 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeNumberOfPrimariesWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeNumberOfPrimariesWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary1XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -87362,41 +72194,40 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePrimary1XWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePrimary1XWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary1YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -87405,41 +72236,42 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePrimary1YWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePrimary1YWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -87448,1243 +72280,911 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterOccupancySensing - -- (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)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTROccupancySensingOccupancyAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(OccupancySensingOccupancyAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::Occupancy::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)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeOccupancySensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OccupancySensingClusterOccupancySensorTypeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::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)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeOccupancySensorTypeBitmapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion -{ - auto * bridge = new MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OccupancySensingOccupancySensorTypeBitmapAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self subscribeAttributePrimary1IntensityWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributePrimary1IntensityWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)readAttributePrimary2XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // 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 = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + [self readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary2XWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePIROccupiedToUnoccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary2XWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePrimary2YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary2YWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // 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 = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributePrimary2YWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePIRUnoccupiedToOccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - 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 = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary2IntensityWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributePrimary2IntensityWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)readAttributePrimary3XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // 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 = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary3XWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributePrimary3XWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePIRUnoccupiedToOccupiedThresholdWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePrimary3YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary3YWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePrimary3YWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // 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 = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary3IntensityWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributePrimary3IntensityWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePrimary4XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary4XWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePrimary4XWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)readAttributePrimary4YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // 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 = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary4YWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributePrimary4YWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary4IntensityWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion ++ (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value - params:nil - completion:completion]; + [self readAttributePrimary4IntensityWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = 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)readAttributePrimary5XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary5XWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary5XWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePrimary5YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary5YWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion ++ (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // 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 = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributePrimary5YWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - 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 = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary5IntensityWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributePrimary5IntensityWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)readAttributePrimary6XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completion:completion]; + [self readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // 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 = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary6XWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributePrimary6XWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePrimary6YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary6YWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePrimary6YWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completion:(MTRStatusCompletion)completion +- (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value - params:nil - completion:completion]; + [self readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // 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 = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary6IntensityWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributePrimary6IntensityWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStateCache: - (MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeWhitePointXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeWhitePointXWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeWhitePointXWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OccupancySensingGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWhitePointXWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeWhitePointXWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeWhitePointYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OccupancySensingAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::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; - }); + [self writeAttributeWhitePointYWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeWhitePointYWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWhitePointYWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTROccupancySensingEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OccupancySensingEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeWhitePointYWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointRXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeColorPointRXWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTROccupancySensingAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OccupancySensingAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::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; - }); + [self writeAttributeColorPointRXWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorPointRXWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeColorPointRXWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointRYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeColorPointRYWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeColorPointRYWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - 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 = OccupancySensing::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorPointRYWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeColorPointRYWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -@end - -@implementation MTRBaseClusterOccupancySensing (Deprecated) - -- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeColorPointRIntensityWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeColorPointRIntensityWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -88693,42 +73193,51 @@ - (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOccupancyWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorPointRIntensityWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOccupancyWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeColorPointRIntensityWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointGXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeColorPointGXWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeColorPointGXWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -88737,43 +73246,51 @@ - (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOccupancySensorTypeWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorPointGXWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOccupancySensorTypeWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeColorPointGXWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointGYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeColorPointGYWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeColorPointGYWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -88782,54 +73299,54 @@ - (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _ subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOccupancySensorTypeBitmapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorPointGYWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOccupancySensorTypeBitmapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeColorPointGYWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; + [self writeAttributeColorPointGIntensityWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; + [self writeAttributeColorPointGIntensityWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -88838,54 +73355,51 @@ - (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorPointGIntensityWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePIROccupiedToUnoccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeColorPointGIntensityWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointBXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; + [self writeAttributeColorPointBXWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; + [self writeAttributeColorPointBXWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -88894,54 +73408,51 @@ - (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorPointBXWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePIRUnoccupiedToOccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeColorPointBXWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointBYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; + [self writeAttributeColorPointBYWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; + [self writeAttributeColorPointBYWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -88950,55 +73461,54 @@ - (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNum subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorPointBYWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePIRUnoccupiedToOccupiedThresholdWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeColorPointBYWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; + [self writeAttributeColorPointBIntensityWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; + [self writeAttributeColorPointBIntensityWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -89007,56 +73517,43 @@ - (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NS subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorPointBIntensityWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUltrasonicOccupiedToUnoccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any - // selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeColorPointBIntensityWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; + }]; } -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -89065,57 +73562,43 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NS subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeEnhancedCurrentHueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUltrasonicUnoccupiedToOccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any - // selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeEnhancedCurrentHueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -89124,59 +73607,42 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeEnhancedColorModeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self - readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any - // selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeEnhancedColorModeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -89185,60 +73651,43 @@ - (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterva subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorLoopActiveWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, - NSError * _Nullable error) { - // Cast is safe because subclass does not add any - // selectors. - completionHandler( - static_cast(value), error); - }]; + [self readAttributeColorLoopActiveWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -89247,60 +73696,42 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterva subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorLoopDirectionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, - NSError * _Nullable error) { - // Cast is safe because subclass does not add any - // selectors. - completionHandler( - static_cast(value), error); - }]; + [self readAttributeColorLoopDirectionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -89309,49 +73740,43 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any - // selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorLoopTimeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, - NSError * _Nullable error) { - // Cast is safe because subclass does not add any - // selectors. - completionHandler( - static_cast(value), error); - }]; + [self readAttributeColorLoopTimeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -89360,43 +73785,43 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorLoopStartEnhancedHueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeColorLoopStartEnhancedHueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -89405,41 +73830,43 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorLoopStoredEnhancedHueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -89448,41 +73875,43 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorCapabilitiesWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeColorCapabilitiesWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -89491,41 +73920,43 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorTempPhysicalMinMiredsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -89534,664 +73965,401 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeColorTempPhysicalMaxMiredsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -@end - -@implementation MTRBaseClusterCarbonMonoxideConcentrationMeasurement - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } - return self; -} - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::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)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::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)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::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)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::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)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(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 = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self + readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeStartUpColorTemperatureMiredsWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeStartUpColorTemperatureMiredsWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeStartUpColorTemperatureMiredsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge - = new MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge - = new MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback successCb, - MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRCarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::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; - }); + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} +@end -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +@implementation MTRBaseClusterBallastConfiguration + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - auto * bridge = new MTRCarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::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; - }); + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::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 +- (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::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 ++ (void)readAttributePhysicalMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCarbonMonoxideConcentrationMeasurementEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonMonoxideConcentrationMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90206,36 +74374,36 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhysicalMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + 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 = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90250,35 +74418,35 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBallastStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90293,96 +74461,72 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeMinLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)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 = CarbonMonoxideConcentrationMeasurement::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} - -@end - -@implementation MTRBaseClusterCarbonDioxideConcentrationMeasurement - -- (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; -} + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90397,36 +74541,72 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90441,36 +74621,80 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeIntrinsicBallastFactorWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeIntrinsicBallastFactorWithValue:(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 = BallastConfiguration::Attributes::IntrinsicBallastFactor::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)subscribeAttributeIntrinsicBallastFactorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeIntrinsicBallastFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90485,36 +74709,80 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeBallastFactorAdjustmentWithValue:(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 = BallastConfiguration::Attributes::BallastFactorAdjustment::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)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBallastFactorAdjustmentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90529,38 +74797,35 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeLampQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90575,37 +74840,72 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta }); } -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeLampTypeWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + 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 = BallastConfiguration::Attributes::LampType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90620,38 +74920,73 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeLampManufacturerWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + 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 = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeLampManufacturerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90666,35 +75001,77 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster }); } -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeLampRatedHoursWithValue:(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 = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampRatedHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90709,38 +75086,77 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } +- (void)writeAttributeLampBurnHoursWithValue:(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]; -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge - = new MTRCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeLampBurnHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90755,39 +75171,72 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC }); } -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge - = new MTRCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback successCb, - MTRErrorCallback failureCb) { + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeLampAlarmModeWithClusterStateCache:(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 = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90802,36 +75251,80 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } +- (void)writeAttributeLampBurnHoursTripPointWithValue:(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]; -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeLampBurnHoursTripPointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90849,8 +75342,8 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90860,10 +75353,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -90872,12 +75365,12 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(BallastConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90895,8 +75388,8 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90906,10 +75399,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -90918,56 +75411,12 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::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 = CarbonDioxideConcentrationMeasurement::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 = CarbonDioxideConcentrationMeasurement::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 MTRCarbonDioxideConcentrationMeasurementEventListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonDioxideConcentrationMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(BallastConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -90985,9 +75434,8 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90995,8 +75443,8 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91006,12 +75454,12 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCarbonDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRBallastConfigurationAttributeListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(CarbonDioxideConcentrationMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(BallastConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -91029,7 +75477,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91038,7 +75486,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -91054,7 +75502,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -91072,7 +75520,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91081,7 +75529,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -91098,7 +75546,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -91115,785 +75563,950 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterNitrogenDioxideConcentrationMeasurement +@implementation MTRBaseClusterBallastConfiguration (Deprecated) -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)readAttributePhysicalMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } + [self readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void) + subscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePhysicalMinLevelWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalMinLevelWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - _device = device; - _endpoint = [endpointID unsignedShortValue]; +- (void)readAttributePhysicalMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void) + subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } - return self; + [self subscribeAttributePhysicalMaxLevelWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalMaxLevelWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBallastStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBallastStatusWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBallastStatusWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinLevelWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinLevelWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinLevelWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinLevelWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMaxLevelWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMaxLevelWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxLevelWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxLevelWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeIntrinsicBalanceFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeIntrinsicBallastFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeIntrinsicBallastFactorWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeIntrinsicBallastFactorWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeIntrinsicBallastFactorWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeIntrinsicBallastFactorWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeBallastFactorAdjustmentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeBallastFactorAdjustmentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeBallastFactorAdjustmentWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeBallastFactorAdjustmentWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBallastFactorAdjustmentWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeBallastFactorAdjustmentWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampQuantityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampQuantityWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeLampQuantityWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampTypeWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeLampTypeWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeLampTypeWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampTypeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeLampTypeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampManufacturerWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeLampManufacturerWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeLampManufacturerWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void) + subscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - 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 = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampManufacturerWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeLampManufacturerWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLampRatedHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampRatedHoursWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampRatedHoursWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampRatedHoursWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeLampRatedHoursWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampBurnHoursWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeLampBurnHoursWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge - = new MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(NitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback successCb, - MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeLampBurnHoursWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampBurnHoursWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeLampBurnHoursWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLampAlarmModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge - = new MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(NitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback successCb, - MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeLampAlarmModeWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeLampAlarmModeWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampAlarmModeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(NitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::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 + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeLampAlarmModeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLampBurnHoursTripPointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge - = new MTRNitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(NitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::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; - }); + [self writeAttributeLampBurnHoursTripPointWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeLampBurnHoursTripPointWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampBurnHoursTripPointWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRNitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(NitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::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; - }); + [self readAttributeLampBurnHoursTripPointWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRNitrogenDioxideConcentrationMeasurementEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(NitrogenDioxideConcentrationMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::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; - }); + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRNitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(NitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::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; - }); + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } @end -@implementation MTRBaseClusterOzoneConcentrationMeasurement +@implementation MTRBaseClusterIlluminanceMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -91911,8 +76524,8 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91920,8 +76533,8 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91931,12 +76544,12 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -91954,8 +76567,8 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91963,8 +76576,8 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91975,12 +76588,12 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -91998,8 +76611,8 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92007,8 +76620,8 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92019,12 +76632,12 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92039,36 +76652,35 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92083,38 +76695,37 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeLightSensorTypeWithClusterStateCache:(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) { + auto * bridge = new MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(NullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92129,37 +76740,38 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta }); } -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(IlluminanceMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92174,38 +76786,38 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(IlluminanceMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92220,35 +76832,35 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster }); } -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - return MTRReadAttribute( + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FloatAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(IlluminanceMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92263,37 +76875,35 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - return MTRReadAttribute( + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92308,37 +76918,36 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC }); } -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - return MTRReadAttribute( + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92353,319 +76962,455 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterIlluminanceMeasurement (Deprecated) + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTROzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTROzoneConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OzoneConcentrationMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::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; - }); + [self readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeToleranceWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLightSensorTypeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLightSensorTypeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTROzoneConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OzoneConcentrationMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::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; - }); + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTROzoneConcentrationMeasurementEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OzoneConcentrationMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::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; - }); + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTROzoneConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OzoneConcentrationMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::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; - }); + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OzoneConcentrationMeasurement::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; - }); + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } @end -@implementation MTRBaseClusterPM25ConcentrationMeasurement +@implementation MTRBaseClusterTemperatureMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -92683,8 +77428,8 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92692,8 +77437,8 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92703,12 +77448,12 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92726,8 +77471,8 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92735,8 +77480,8 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92747,12 +77492,12 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92770,8 +77515,8 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92779,8 +77524,8 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92791,12 +77536,12 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92811,36 +77556,35 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92855,38 +77599,38 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TemperatureMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92901,37 +77645,38 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta }); } -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TemperatureMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92946,38 +77691,35 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TemperatureMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -92992,35 +77734,35 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster }); } -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93035,37 +77777,36 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93080,37 +77821,454 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC }); } -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterTemperatureMeasurement (Deprecated) + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeToleranceWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRPM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterPressureMeasurement + +- (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)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93125,36 +78283,36 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93169,38 +78327,36 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPM25ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM25ConcentrationMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93215,38 +78371,35 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPM25ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM25ConcentrationMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93261,35 +78414,35 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::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 +- (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::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 ++ (void)readAttributeScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPM25ConcentrationMeasurementEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM25ConcentrationMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93304,36 +78457,35 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPM25ConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM25ConcentrationMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93348,35 +78500,35 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93391,25 +78543,25 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeScaledToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: @@ -93420,7 +78572,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93435,52 +78587,35 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC }); } -@end - -@implementation MTRBaseClusterFormaldehydeConcentrationMeasurement - -- (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)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeScaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8sAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8sAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93495,36 +78630,38 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PressureMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93539,36 +78676,37 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PressureMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93583,36 +78721,35 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRPressureMeasurementAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PressureMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93627,38 +78764,35 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93673,37 +78807,36 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta }); } -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -93717,501 +78850,628 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC return CHIP_ERROR_NOT_FOUND; }); } - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion + +@end + +@implementation MTRBaseClusterPressureMeasurement (Deprecated) + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeToleranceWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeScaledValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - 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 = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeScaledValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeScaledValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer +- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinScaledValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeMinScaledValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxScaledValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeMaxScaledValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeScaledToleranceWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge - = new MTRFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeScaledToleranceWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::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 = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeScaleWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeScaleWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRFormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::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; - }); + [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRFormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::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; - }); + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRFormaldehydeConcentrationMeasurementEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FormaldehydeConcentrationMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::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)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRFormaldehydeConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FormaldehydeConcentrationMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::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; - }); + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FormaldehydeConcentrationMeasurement::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; - }); + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } @end -@implementation MTRBaseClusterPM1ConcentrationMeasurement +@implementation MTRBaseClusterFlowMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -94229,8 +79489,8 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94238,8 +79498,8 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94249,12 +79509,12 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -94272,8 +79532,8 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94281,8 +79541,8 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94293,12 +79553,12 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -94316,8 +79576,8 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94325,8 +79585,8 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94337,326 +79597,12 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::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)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::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)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(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 = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::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)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(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 = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::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)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRPM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::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)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRPM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -94671,36 +79617,35 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -94718,9 +79663,8 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94729,8 +79673,8 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94741,12 +79685,12 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPM1ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM1ConcentrationMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(FlowMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -94764,9 +79708,8 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94775,8 +79718,8 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94787,55 +79730,12 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPM1ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM1ConcentrationMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::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 = Pm1ConcentrationMeasurement::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 = Pm1ConcentrationMeasurement::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 MTRPM1ConcentrationMeasurementEventListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM1ConcentrationMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(FlowMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -94853,9 +79753,8 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94863,10 +79762,10 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -94874,12 +79773,12 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPM1ConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFlowMeasurementAttributeListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM1ConcentrationMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(FlowMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -94897,7 +79796,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94906,7 +79805,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -94922,7 +79821,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -94940,7 +79839,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94949,7 +79848,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -94966,7 +79865,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -94983,7 +79882,409 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterPM10ConcentrationMeasurement +@implementation MTRBaseClusterFlowMeasurement (Deprecated) + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeToleranceWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterRelativeHumidityMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -95001,8 +80302,8 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95010,8 +80311,8 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95021,12 +80322,12 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95044,8 +80345,8 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95053,8 +80354,8 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95065,12 +80366,12 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95088,8 +80389,8 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95097,8 +80398,8 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95109,12 +80410,12 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95129,36 +80430,35 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95173,38 +80473,38 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(RelativeHumidityMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95219,37 +80519,38 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta }); } -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(RelativeHumidityMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95264,38 +80565,36 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(RelativeHumidityMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95310,35 +80609,35 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster }); } -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - return MTRReadAttribute( + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95353,37 +80652,36 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - return MTRReadAttribute( + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95397,128 +80695,455 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC return CHIP_ERROR_NOT_FOUND; }); } - -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + +@end + +@implementation MTRBaseClusterRelativeHumidityMeasurement (Deprecated) + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeToleranceWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRPM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterOccupancySensing + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - auto * bridge = new MTRPM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPM10ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM10ConcentrationMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTROccupancySensingOccupancyAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(OccupancySensingOccupancyAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95533,38 +81158,38 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeOccupancySensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPM10ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM10ConcentrationMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(OccupancySensingClusterOccupancySensorTypeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95579,35 +81204,38 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::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 +- (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::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 ++ (void)readAttributeOccupancySensorTypeBitmapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRPM10ConcentrationMeasurementEventListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM10ConcentrationMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(OccupancySensingOccupancySensorTypeBitmapAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95622,123 +81250,76 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRPM10ConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PM10ConcentrationMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Pm10ConcentrationMeasurement::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::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 = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; -+ (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 = Pm10ConcentrationMeasurement::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; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Pm10ConcentrationMeasurement::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 +- (void)subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePIROccupiedToUnoccupiedDelayWithClusterStateCache:(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 = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95753,96 +81334,76 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC }); } -@end - -@implementation MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement - -- (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)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePIRUnoccupiedToOccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95857,80 +81418,78 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +} + ++ (void)readAttributePIRUnoccupiedToOccupiedThresholdWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95945,39 +81504,78 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo - = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -95992,37 +81590,78 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta }); } -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -96037,39 +81676,80 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value + params:nil + completion:completion]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo - = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -96084,35 +81764,80 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster }); } -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completion:completion]; +} +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRFloatAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FloatAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -96127,90 +81852,80 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - return MTRReadAttribute< - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge, NSNumber, - TypeInfo::DecodableType>( + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - MTRSubscribeAttribute< - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge, - NSNumber, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completion:completion]; } - -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - auto * bridge = new MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge( - queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback successCb, - MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::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); + // 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); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - return MTRReadAttribute< - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge, NSNumber, - TypeInfo::DecodableType>( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - MTRSubscribeAttribute< - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge, - NSNumber, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCache: + (MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - auto * bridge = new MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge( - queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback successCb, - MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -96225,39 +81940,80 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - MTRSubscribeAttribute< - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge, NSNumber, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value + params:nil + completion:completion]; } +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = 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)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - auto * bridge = new MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge( - queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallback successCb, - MTRErrorCallback failureCb) { + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStateCache: + (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 = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -96275,9 +82031,8 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96286,11 +82041,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute< - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge, - NSArray, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -96299,14 +82053,12 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completion); + auto * bridge = new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallback successCb, - MTRErrorCallback failureCb) { + ^(OccupancySensingGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -96324,9 +82076,8 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96335,73 +82086,24 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute< - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge, NSArray, - TypeInfo::DecodableType>(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 MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallback successCb, - MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::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 = TotalVolatileOrganicCompoundsConcentrationMeasurement::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 = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::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 ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRTotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallback successCb, - MTRErrorCallback failureCb) { + ^(OccupancySensingAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -96419,9 +82121,8 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96429,9 +82130,8 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute< - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge, NSArray, + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96441,14 +82141,12 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTROccupancySensingAttributeListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb) { + ^(OccupancySensingAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -96466,7 +82164,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96475,7 +82173,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -96491,7 +82189,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -96509,7 +82207,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96518,7 +82216,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -96535,7 +82233,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -96552,774 +82250,895 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterRadonConcentrationMeasurement +@implementation MTRBaseClusterOccupancySensing (Deprecated) -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; + [self readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } - return self; + [self subscribeAttributeOccupancyWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeOccupancyWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOccupancySensorTypeWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeOccupancySensorTypeWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOccupancySensorTypeBitmapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeOccupancySensorTypeBitmapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePIROccupiedToUnoccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePIRUnoccupiedToOccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePIRUnoccupiedToOccupiedThresholdWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUltrasonicOccupiedToUnoccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any + // selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeUltrasonicUnoccupiedToOccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any + // selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableFloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self + readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any + // selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - auto * bridge = new MTRFloatAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FloatAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::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; - }); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, + NSError * _Nullable error) { + // Cast is safe because subclass does not add any + // selectors. + completionHandler( + static_cast(value), error); + }]; } -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTRRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, + NSError * _Nullable error) { + // Cast is safe because subclass does not add any + // selectors. + completionHandler( + static_cast(value), error); + }]; } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - auto * bridge = new MTRRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RadonConcentrationMeasurementClusterLevelValueEnumAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any + // selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, + NSError * _Nullable error) { + // Cast is safe because subclass does not add any + // selectors. + completionHandler( + static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRRadonConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RadonConcentrationMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::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; - }); + [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRRadonConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RadonConcentrationMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::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; - }); + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRRadonConcentrationMeasurementEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RadonConcentrationMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::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; - }); + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRRadonConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(RadonConcentrationMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::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; - }); + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RadonConcentrationMeasurement::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; - }); + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } @end @@ -97472,49 +83291,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRWakeOnLANEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(WakeOnLANEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -98270,49 +84046,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Channel::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Channel::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRChannelEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(ChannelEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -99057,49 +84790,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRTargetNavigatorEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(TargetNavigatorEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -100385,49 +86075,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRMediaPlaybackEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(MediaPlaybackEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -101589,49 +87236,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRMediaInputEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(MediaInputEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -102250,49 +87854,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = LowPower::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LowPower::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRLowPowerEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(LowPowerEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LowPower::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -102801,49 +88362,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRKeypadInputEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(KeypadInputEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -103671,49 +89189,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRContentLauncherEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ContentLauncherEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -104458,49 +89933,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRAudioOutputEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(AudioOutputEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -105331,49 +90763,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRApplicationLauncherEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ApplicationLauncherEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -106324,49 +91713,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRApplicationBasicEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ApplicationBasicEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -107304,49 +92650,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRAccountLoginEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(AccountLoginEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -113968,49 +99271,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRElectricalMeasurementEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(ElectricalMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -128989,49 +114249,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRUnitTestingEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(UnitTestingEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h index 1063a353250da9..3f5d334c551d6e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h @@ -200,41 +200,6 @@ @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end -@interface MTRBaseClusterTemperatureControl () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterRefrigeratorAlarm () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterAirQuality () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterSmokeCOAlarm () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterOperationalState () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterHEPAFilterMonitoring () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterActivatedCarbonFilterMonitoring () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - @interface MTRBaseClusterDoorLock () @property (nonatomic, strong, readonly) MTRBaseDevice * device; @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @@ -310,56 +275,6 @@ @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end -@interface MTRBaseClusterCarbonMonoxideConcentrationMeasurement () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterCarbonDioxideConcentrationMeasurement () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterNitrogenDioxideConcentrationMeasurement () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterOzoneConcentrationMeasurement () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterPM25ConcentrationMeasurement () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterFormaldehydeConcentrationMeasurement () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterPM1ConcentrationMeasurement () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterPM10ConcentrationMeasurement () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - -@interface MTRBaseClusterRadonConcentrationMeasurement () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - @interface MTRBaseClusterWakeOnLAN () @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 e6c3b3d1b30fb2..4702091efb1db1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -85,8 +85,6 @@ typedef void (*GroupKeyManagementClusterKeySetReadResponseCallbackType)( void *, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType &); typedef void (*GroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackType)( void *, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType &); -typedef void (*OperationalStateClusterOperationalCommandResponseCallbackType)( - void *, const chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType &); typedef void (*DoorLockClusterGetWeekDayScheduleResponseCallbackType)( void *, const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType &); typedef void (*DoorLockClusterGetYearDayScheduleResponseCallbackType)( @@ -383,53 +381,6 @@ typedef void (*GroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallb void *, chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicyEnum); typedef void (*NullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*AirQualityClusterAirQualityEnumAttributeCallback)(void *, chip::app::Clusters::AirQuality::AirQualityEnum); -typedef void (*NullableAirQualityClusterAirQualityEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*SmokeCOAlarmClusterAlarmStateEnumAttributeCallback)(void *, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum); -typedef void (*NullableSmokeCOAlarmClusterAlarmStateEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*SmokeCOAlarmClusterContaminationStateEnumAttributeCallback)( - void *, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum); -typedef void (*NullableSmokeCOAlarmClusterContaminationStateEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*SmokeCOAlarmClusterEndOfServiceEnumAttributeCallback)(void *, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum); -typedef void (*NullableSmokeCOAlarmClusterEndOfServiceEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*SmokeCOAlarmClusterExpressedStateEnumAttributeCallback)(void *, - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum); -typedef void (*NullableSmokeCOAlarmClusterExpressedStateEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*SmokeCOAlarmClusterMuteStateEnumAttributeCallback)(void *, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum); -typedef void (*NullableSmokeCOAlarmClusterMuteStateEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*SmokeCOAlarmClusterSensitivityEnumAttributeCallback)(void *, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum); -typedef void (*NullableSmokeCOAlarmClusterSensitivityEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*OperationalStateClusterErrorStateEnumAttributeCallback)(void *, - chip::app::Clusters::OperationalState::ErrorStateEnum); -typedef void (*NullableOperationalStateClusterErrorStateEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*OperationalStateClusterOperationalStateEnumAttributeCallback)( - void *, chip::app::Clusters::OperationalState::OperationalStateEnum); -typedef void (*NullableOperationalStateClusterOperationalStateEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*HEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallback)( - void *, chip::app::Clusters::HepaFilterMonitoring::ChangeIndicationEnum); -typedef void (*NullableHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*HEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallback)( - void *, chip::app::Clusters::HepaFilterMonitoring::DegradationDirectionEnum); -typedef void (*NullableHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*ActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallback)( - void *, chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum); -typedef void (*NullableActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*ActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallback)( - void *, chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum); -typedef void (*NullableActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); typedef void (*DoorLockClusterAlarmCodeEnumAttributeCallback)(void *, chip::app::Clusters::DoorLock::AlarmCodeEnum); typedef void (*NullableDoorLockClusterAlarmCodeEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); @@ -516,19 +467,12 @@ typedef void (*ThermostatClusterThermostatSystemModeAttributeCallback)(void *, chip::app::Clusters::Thermostat::ThermostatSystemMode); typedef void (*NullableThermostatClusterThermostatSystemModeAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*FanControlClusterAirflowDirectionEnumAttributeCallback)(void *, - chip::app::Clusters::FanControl::AirflowDirectionEnum); -typedef void (*NullableFanControlClusterAirflowDirectionEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); typedef void (*FanControlClusterFanModeEnumAttributeCallback)(void *, chip::app::Clusters::FanControl::FanModeEnum); typedef void (*NullableFanControlClusterFanModeEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); typedef void (*FanControlClusterFanModeSequenceEnumAttributeCallback)(void *, chip::app::Clusters::FanControl::FanModeSequenceEnum); typedef void (*NullableFanControlClusterFanModeSequenceEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*FanControlClusterStepDirectionEnumAttributeCallback)(void *, chip::app::Clusters::FanControl::StepDirectionEnum); -typedef void (*NullableFanControlClusterStepDirectionEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); typedef void (*ColorControlClusterColorLoopActionAttributeCallback)(void *, chip::app::Clusters::ColorControl::ColorLoopAction); typedef void (*NullableColorControlClusterColorLoopActionAttributeCallback)( void *, const chip::app::DataModel::Nullable &); @@ -564,139 +508,6 @@ typedef void (*OccupancySensingClusterOccupancySensorTypeEnumAttributeCallback)( void *, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum); typedef void (*NullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*CarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum); -typedef void (*NullableCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*CarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum); -typedef void (*NullableCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, - const chip::app::DataModel::Nullable &); -typedef void (*CarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum); -typedef void (*NullableCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, - const chip::app::DataModel::Nullable &); -typedef void (*CarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum); -typedef void (*NullableCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*CarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum); -typedef void (*NullableCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, - const chip::app::DataModel::Nullable &); -typedef void (*CarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum); -typedef void (*NullableCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, - const chip::app::DataModel::Nullable &); -typedef void (*NitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum); -typedef void (*NullableNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*NitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum); -typedef void (*NullableNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, - const chip::app::DataModel::Nullable &); -typedef void (*NitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum); -typedef void (*NullableNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, - const chip::app::DataModel::Nullable &); -typedef void (*OzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum); -typedef void (*NullableOzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*OzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum); -typedef void (*NullableOzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*OzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum); -typedef void (*NullableOzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum); -typedef void (*NullablePM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum); -typedef void (*NullablePM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum); -typedef void (*NullablePM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*FormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum); -typedef void (*NullableFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*FormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum); -typedef void (*NullableFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, - const chip::app::DataModel::Nullable &); -typedef void (*FormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum); -typedef void (*NullableFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum); -typedef void (*NullablePM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum); -typedef void (*NullablePM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum); -typedef void (*NullablePM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum); -typedef void (*NullablePM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum); -typedef void (*NullablePM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum); -typedef void (*NullablePM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*TotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum); -typedef void (*NullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, - const chip::app::DataModel::Nullable< - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum> &); -typedef void (*TotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum); -typedef void (*NullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, - const chip::app::DataModel::Nullable< - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum> &); -typedef void (*TotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum); -typedef void (*NullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, - const chip::app::DataModel::Nullable< - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum> &); -typedef void (*RadonConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum); -typedef void (*NullableRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*RadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum); -typedef void (*NullableRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*RadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum); -typedef void (*NullableRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); typedef void (*ChannelClusterChannelStatusEnumAttributeCallback)(void *, chip::app::Clusters::Channel::ChannelStatusEnum); typedef void (*NullableChannelClusterChannelStatusEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); @@ -757,8 +568,6 @@ typedef void (*IdentifyGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*IdentifyAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*IdentifyEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*IdentifyAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GroupsNameSupportAttributeCallback)(void *, chip::BitMask); @@ -766,32 +575,24 @@ typedef void (*GroupsGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GroupsAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GroupsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*GroupsAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ScenesGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ScenesAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ScenesEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*ScenesAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OnOffGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OnOffAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OnOffEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*OnOffAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OnOffSwitchConfigurationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OnOffSwitchConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OnOffSwitchConfigurationEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OnOffSwitchConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LevelControlOptionsAttributeCallback)(void *, chip::BitMask); @@ -799,20 +600,14 @@ typedef void (*LevelControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LevelControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LevelControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*LevelControlAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BinaryInputBasicGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BinaryInputBasicAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BinaryInputBasicEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*BinaryInputBasicAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PulseWidthModulationEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*DescriptorDeviceTypeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); @@ -826,8 +621,6 @@ typedef void (*DescriptorGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DescriptorAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DescriptorEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*DescriptorAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BindingBindingListAttributeCallback)( @@ -837,8 +630,6 @@ typedef void (*BindingGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BindingAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BindingEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*BindingAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlACLListAttributeCallback)( @@ -853,8 +644,6 @@ typedef void (*AccessControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AccessControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ActionsActionListListAttributeCallback)( @@ -867,8 +656,6 @@ typedef void (*ActionsGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ActionsAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ActionsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*ActionsAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BasicInformationCapabilityMinimaStructAttributeCallback)( @@ -879,16 +666,12 @@ typedef void (*BasicInformationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BasicInformationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BasicInformationEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*BasicInformationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OTASoftwareUpdateProviderGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OTASoftwareUpdateProviderAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OTASoftwareUpdateProviderEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OTASoftwareUpdateProviderAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallback)( @@ -899,8 +682,6 @@ typedef void (*OTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallba void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OTASoftwareUpdateRequestorEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OTASoftwareUpdateRequestorAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LocalizationConfigurationSupportedLocalesListAttributeCallback)( @@ -909,8 +690,6 @@ typedef void (*LocalizationConfigurationGeneratedCommandListListAttributeCallbac void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LocalizationConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LocalizationConfigurationEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LocalizationConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TimeFormatLocalizationSupportedCalendarTypesListAttributeCallback)( @@ -920,16 +699,12 @@ typedef void (*TimeFormatLocalizationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TimeFormatLocalizationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TimeFormatLocalizationEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TimeFormatLocalizationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UnitLocalizationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UnitLocalizationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*UnitLocalizationEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*UnitLocalizationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceConfigurationSourcesListAttributeCallback)(void * context, @@ -938,8 +713,6 @@ typedef void (*PowerSourceConfigurationGeneratedCommandListListAttributeCallback void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceConfigurationEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceActiveWiredFaultsListAttributeCallback)( @@ -952,8 +725,6 @@ typedef void (*PowerSourceGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PowerSourceEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GeneralCommissioningBasicCommissioningInfoStructAttributeCallback)( @@ -962,8 +733,6 @@ typedef void (*GeneralCommissioningGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GeneralCommissioningAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GeneralCommissioningEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*GeneralCommissioningAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*NetworkCommissioningNetworksListAttributeCallback)( @@ -974,16 +743,12 @@ typedef void (*NetworkCommissioningGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*NetworkCommissioningAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*NetworkCommissioningEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*NetworkCommissioningAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DiagnosticLogsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DiagnosticLogsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DiagnosticLogsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*DiagnosticLogsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GeneralDiagnosticsNetworkInterfacesListAttributeCallback)( @@ -1000,8 +765,6 @@ typedef void (*GeneralDiagnosticsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GeneralDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GeneralDiagnosticsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*GeneralDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*SoftwareDiagnosticsThreadMetricsListAttributeCallback)( @@ -1012,8 +775,6 @@ typedef void (*SoftwareDiagnosticsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*SoftwareDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*SoftwareDiagnosticsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*SoftwareDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThreadNetworkDiagnosticsNeighborTableListAttributeCallback)( @@ -1038,52 +799,38 @@ typedef void (*ThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallback void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ThreadNetworkDiagnosticsEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThreadNetworkDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WiFiNetworkDiagnosticsEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WiFiNetworkDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*EthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*EthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*EthernetNetworkDiagnosticsEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*EthernetNetworkDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TimeSynchronizationEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*BridgedDeviceBasicInformationProductAppearanceStructAttributeCallback)( void *, const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType &); typedef void (*BridgedDeviceBasicInformationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BridgedDeviceBasicInformationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BridgedDeviceBasicInformationEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BridgedDeviceBasicInformationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*SwitchGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*SwitchAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*SwitchEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*SwitchAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AdministratorCommissioningGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AdministratorCommissioningAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AdministratorCommissioningEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AdministratorCommissioningAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OperationalCredentialsNOCsListAttributeCallback)( @@ -1100,8 +847,6 @@ typedef void (*OperationalCredentialsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OperationalCredentialsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalCredentialsEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OperationalCredentialsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GroupKeyManagementGroupKeyMapListAttributeCallback)( @@ -1116,8 +861,6 @@ typedef void (*GroupKeyManagementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GroupKeyManagementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*GroupKeyManagementEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*GroupKeyManagementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*FixedLabelLabelListListAttributeCallback)( @@ -1127,8 +870,6 @@ typedef void (*FixedLabelGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*FixedLabelAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FixedLabelEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*FixedLabelAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UserLabelLabelListListAttributeCallback)( @@ -1138,22 +879,12 @@ typedef void (*UserLabelGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UserLabelAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*UserLabelEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*UserLabelAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyConfigurationEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyDiscoveryEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ProxyValidEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*BooleanStateGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BooleanStateAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BooleanStateEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*BooleanStateAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ModeSelectSupportedModesListAttributeCallback)( @@ -1163,82 +894,8 @@ typedef void (*ModeSelectGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ModeSelectAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ModeSelectEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*ModeSelectAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureControlSupportedTemperatureLevelsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureControlGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureControlAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureControlAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RefrigeratorAlarmMaskAttributeCallback)(void *, chip::BitMask); -typedef void (*RefrigeratorAlarmStateAttributeCallback)(void *, chip::BitMask); -typedef void (*RefrigeratorAlarmSupportedAttributeCallback)(void *, - chip::BitMask); -typedef void (*RefrigeratorAlarmGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RefrigeratorAlarmAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RefrigeratorAlarmEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*RefrigeratorAlarmAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AirQualityGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AirQualityAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AirQualityEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*AirQualityAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*SmokeCOAlarmGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*SmokeCOAlarmAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*SmokeCOAlarmEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*SmokeCOAlarmAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalStatePhaseListListAttributeCallback)( - void * context, const chip::app::DataModel::Nullable> & data); -typedef void (*OperationalStateOperationalStateListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> & data); -typedef void (*OperationalStateOperationalStateStructAttributeCallback)( - void *, const chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType &); -typedef void (*OperationalStateOperationalErrorStructAttributeCallback)( - void *, const chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType &); -typedef void (*OperationalStateGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalStateAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalStateEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*OperationalStateAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*HEPAFilterMonitoringGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*HEPAFilterMonitoringAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*HEPAFilterMonitoringEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*HEPAFilterMonitoringAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ActivatedCarbonFilterMonitoringEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ActivatedCarbonFilterMonitoringAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DoorLockCredentialRulesSupportAttributeCallback)(void *, chip::BitMask); typedef void (*DoorLockSupportedOperatingModesAttributeCallback)( @@ -1251,8 +908,6 @@ typedef void (*DoorLockGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DoorLockAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DoorLockEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*DoorLockAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WindowCoveringConfigStatusAttributeCallback)(void *, @@ -1266,16 +921,12 @@ typedef void (*WindowCoveringGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WindowCoveringAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WindowCoveringEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*WindowCoveringAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BarrierControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BarrierControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BarrierControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*BarrierControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PumpConfigurationAndControlPumpStatusAttributeCallback)( @@ -1284,16 +935,12 @@ typedef void (*PumpConfigurationAndControlGeneratedCommandListListAttributeCallb void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PumpConfigurationAndControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PumpConfigurationAndControlEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PumpConfigurationAndControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*FanControlRockSupportAttributeCallback)(void *, chip::BitMask); @@ -1304,72 +951,54 @@ typedef void (*FanControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*FanControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FanControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*FanControlAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ThermostatUserInterfaceConfigurationEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatUserInterfaceConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ColorControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ColorControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ColorControlEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*ColorControlAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BallastConfigurationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BallastConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BallastConfigurationEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*BallastConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*IlluminanceMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*IlluminanceMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*IlluminanceMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*IlluminanceMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TemperatureMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PressureMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PressureMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PressureMeasurementEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*PressureMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*FlowMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*FlowMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FlowMeasurementEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*FlowMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*RelativeHumidityMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*RelativeHumidityMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RelativeHumidityMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*RelativeHumidityMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OccupancySensingOccupancyAttributeCallback)(void *, @@ -1380,96 +1009,12 @@ typedef void (*OccupancySensingGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OccupancySensingAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OccupancySensingEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*OccupancySensingAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonMonoxideConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonDioxideConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*CarbonDioxideConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*NitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*NitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*NitrogenDioxideConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*NitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OzoneConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OzoneConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OzoneConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OzoneConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PM25ConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PM25ConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PM25ConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PM25ConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FormaldehydeConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FormaldehydeConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PM1ConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PM1ConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PM1ConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PM1ConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PM10ConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PM10ConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PM10ConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*PM10ConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RadonConcentrationMeasurementGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RadonConcentrationMeasurementAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RadonConcentrationMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*RadonConcentrationMeasurementAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WakeOnLANGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WakeOnLANAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WakeOnLANEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*WakeOnLANAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ChannelChannelListListAttributeCallback)( @@ -1483,8 +1028,6 @@ typedef void (*ChannelGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ChannelAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ChannelEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*ChannelAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TargetNavigatorTargetListListAttributeCallback)( @@ -1495,8 +1038,6 @@ typedef void (*TargetNavigatorGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TargetNavigatorAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TargetNavigatorEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*TargetNavigatorAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*MediaPlaybackSampledPositionStructAttributeCallback)( @@ -1506,8 +1047,6 @@ typedef void (*MediaPlaybackGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*MediaPlaybackAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MediaPlaybackEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*MediaPlaybackAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*MediaInputInputListListAttributeCallback)( @@ -1517,24 +1056,18 @@ typedef void (*MediaInputGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*MediaInputAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*MediaInputEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*MediaInputAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LowPowerGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LowPowerAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*LowPowerEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*LowPowerAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*KeypadInputGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*KeypadInputAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*KeypadInputEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*KeypadInputAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ContentLauncherAcceptHeaderListAttributeCallback)(void * context, @@ -1543,8 +1076,6 @@ typedef void (*ContentLauncherGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ContentLauncherAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ContentLauncherEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*ContentLauncherAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AudioOutputOutputListListAttributeCallback)( @@ -1554,8 +1085,6 @@ typedef void (*AudioOutputGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AudioOutputAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AudioOutputEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*AudioOutputAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationLauncherCatalogListListAttributeCallback)(void * context, @@ -1567,8 +1096,6 @@ typedef void (*ApplicationLauncherGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationLauncherAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ApplicationLauncherEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationLauncherAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationBasicApplicationStructAttributeCallback)( @@ -1579,24 +1106,18 @@ typedef void (*ApplicationBasicGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationBasicAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ApplicationBasicEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationBasicAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccountLoginGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccountLoginAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*AccountLoginEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*AccountLoginAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ElectricalMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ElectricalMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ElectricalMeasurementEventListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ElectricalMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UnitTestingBitmap8AttributeCallback)(void *, chip::BitMask); @@ -1636,12 +1157,8 @@ typedef void (*UnitTestingGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UnitTestingAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*UnitTestingEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*UnitTestingAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*FaultInjectionEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); class MTRDefaultSuccessCallbackBridge : public MTRCallbackBridge { @@ -2546,36 +2063,6 @@ class MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRIdentifyEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRIdentifyEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRIdentifyEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRIdentifyEventListListAttributeCallbackSubscriptionBridge : public MTRIdentifyEventListListAttributeCallbackBridge -{ -public: - MTRIdentifyEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIdentifyEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRIdentifyEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRIdentifyEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRIdentifyAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -2701,36 +2188,6 @@ class MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRGroupsEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRGroupsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGroupsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRGroupsEventListListAttributeCallbackSubscriptionBridge : public MTRGroupsEventListListAttributeCallbackBridge -{ -public: - MTRGroupsEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupsEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRGroupsEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGroupsEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRGroupsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -2827,36 +2284,6 @@ class MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRScenesEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRScenesEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRScenesEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRScenesEventListListAttributeCallbackSubscriptionBridge : public MTRScenesEventListListAttributeCallbackBridge -{ -public: - MTRScenesEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRScenesEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRScenesEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRScenesEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRScenesAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -2952,35 +2379,6 @@ class MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROnOffEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTROnOffEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROnOffEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTROnOffEventListListAttributeCallbackSubscriptionBridge : public MTROnOffEventListListAttributeCallbackBridge -{ -public: - MTROnOffEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROnOffEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROnOffEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTROnOffAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -3077,39 +2475,6 @@ class MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTROnOffSwitchConfigurationEventListListAttributeCallbackSubscriptionBridge - : public MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge -{ -public: - MTROnOffSwitchConfigurationEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -3239,36 +2604,6 @@ class MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRLevelControlEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRLevelControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRLevelControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRLevelControlEventListListAttributeCallbackSubscriptionBridge : public MTRLevelControlEventListListAttributeCallbackBridge -{ -public: - MTRLevelControlEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLevelControlEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRLevelControlEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRLevelControlEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRLevelControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -3368,39 +2703,6 @@ class MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBinaryInputBasicEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRBinaryInputBasicEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRBinaryInputBasicEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRBinaryInputBasicEventListListAttributeCallbackSubscriptionBridge - : public MTRBinaryInputBasicEventListListAttributeCallbackBridge -{ -public: - MTRBinaryInputBasicEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBinaryInputBasicEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRBinaryInputBasicEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBinaryInputBasicEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRBinaryInputBasicAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -3434,39 +2736,6 @@ class MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPulseWidthModulationEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRPulseWidthModulationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRPulseWidthModulationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRPulseWidthModulationEventListListAttributeCallbackSubscriptionBridge - : public MTRPulseWidthModulationEventListListAttributeCallbackBridge -{ -public: - MTRPulseWidthModulationEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPulseWidthModulationEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRPulseWidthModulationEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPulseWidthModulationEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRDescriptorDeviceTypeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -3658,36 +2927,6 @@ class MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDescriptorEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRDescriptorEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRDescriptorEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRDescriptorEventListListAttributeCallbackSubscriptionBridge : public MTRDescriptorEventListListAttributeCallbackBridge -{ -public: - MTRDescriptorEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDescriptorEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRDescriptorEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDescriptorEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRDescriptorAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -3816,61 +3055,31 @@ class MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBindingEventListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRBindingAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBindingEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRBindingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBindingEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRBindingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRBindingEventListListAttributeCallbackSubscriptionBridge : public MTRBindingEventListListAttributeCallbackBridge +class MTRBindingAttributeListListAttributeCallbackSubscriptionBridge : public MTRBindingAttributeListListAttributeCallbackBridge { public: - MTRBindingEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBindingEventListListAttributeCallbackBridge(queue, handler, action), + MTRBindingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBindingAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBindingEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBindingEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRBindingAttributeListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRBindingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRBindingAttributeListListAttributeCallbackBridge(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 MTRBindingAttributeListListAttributeCallbackSubscriptionBridge : public MTRBindingAttributeListListAttributeCallbackBridge -{ -public: - MTRBindingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBindingAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRBindingAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBindingAttributeListListAttributeCallbackBridge::OnDone; + using MTRBindingAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBindingAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4006,36 +3215,6 @@ class MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRAccessControlEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRAccessControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAccessControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRAccessControlEventListListAttributeCallbackSubscriptionBridge : public MTRAccessControlEventListListAttributeCallbackBridge -{ -public: - MTRAccessControlEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAccessControlEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAccessControlEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRAccessControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -4200,36 +3379,6 @@ class MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRActionsEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRActionsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRActionsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRActionsEventListListAttributeCallbackSubscriptionBridge : public MTRActionsEventListListAttributeCallbackBridge -{ -public: - MTRActionsEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRActionsEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRActionsEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRActionsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -4394,39 +3543,6 @@ class MTRBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBasicInformationEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRBasicInformationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRBasicInformationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRBasicInformationEventListListAttributeCallbackSubscriptionBridge - : public MTRBasicInformationEventListListAttributeCallbackBridge -{ -public: - MTRBasicInformationEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBasicInformationEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRBasicInformationEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBasicInformationEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRBasicInformationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -4527,39 +3643,6 @@ class MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscr MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTROTASoftwareUpdateProviderEventListListAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge -{ -public: - MTROTASoftwareUpdateProviderEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -4697,39 +3780,6 @@ class MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubsc MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTROTASoftwareUpdateRequestorEventListListAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge -{ -public: - MTROTASoftwareUpdateRequestorEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -4863,39 +3913,6 @@ class MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscr MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRLocalizationConfigurationEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRLocalizationConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRLocalizationConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRLocalizationConfigurationEventListListAttributeCallbackSubscriptionBridge - : public MTRLocalizationConfigurationEventListListAttributeCallbackBridge -{ -public: - MTRLocalizationConfigurationEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLocalizationConfigurationEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRLocalizationConfigurationEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRLocalizationConfigurationEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -5030,39 +4047,6 @@ class MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscript MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTimeFormatLocalizationEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRTimeFormatLocalizationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRTimeFormatLocalizationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRTimeFormatLocalizationEventListListAttributeCallbackSubscriptionBridge - : public MTRTimeFormatLocalizationEventListListAttributeCallbackBridge -{ -public: - MTRTimeFormatLocalizationEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeFormatLocalizationEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRTimeFormatLocalizationEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTimeFormatLocalizationEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -5162,39 +4146,6 @@ class MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRUnitLocalizationEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitLocalizationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitLocalizationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRUnitLocalizationEventListListAttributeCallbackSubscriptionBridge - : public MTRUnitLocalizationEventListListAttributeCallbackBridge -{ -public: - MTRUnitLocalizationEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitLocalizationEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitLocalizationEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitLocalizationEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRUnitLocalizationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -5327,39 +4278,6 @@ class MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPowerSourceConfigurationEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRPowerSourceConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRPowerSourceConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRPowerSourceConfigurationEventListListAttributeCallbackSubscriptionBridge - : public MTRPowerSourceConfigurationEventListListAttributeCallbackBridge -{ -public: - MTRPowerSourceConfigurationEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceConfigurationEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRPowerSourceConfigurationEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceConfigurationEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -5562,36 +4480,6 @@ class MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPowerSourceEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRPowerSourceEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRPowerSourceEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRPowerSourceEventListListAttributeCallbackSubscriptionBridge : public MTRPowerSourceEventListListAttributeCallbackBridge -{ -public: - MTRPowerSourceEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRPowerSourceEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRPowerSourceAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -5725,39 +4613,6 @@ class MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptio MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRGeneralCommissioningEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRGeneralCommissioningEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGeneralCommissioningEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRGeneralCommissioningEventListListAttributeCallbackSubscriptionBridge - : public MTRGeneralCommissioningEventListListAttributeCallbackBridge -{ -public: - MTRGeneralCommissioningEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralCommissioningEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRGeneralCommissioningEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGeneralCommissioningEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRGeneralCommissioningAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -5892,51 +4747,18 @@ class MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptio MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNetworkCommissioningEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNetworkCommissioningAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNetworkCommissioningEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNetworkCommissioningEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRNetworkCommissioningEventListListAttributeCallbackSubscriptionBridge - : public MTRNetworkCommissioningEventListListAttributeCallbackBridge -{ -public: - MTRNetworkCommissioningEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNetworkCommissioningEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNetworkCommissioningEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNetworkCommissioningEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNetworkCommissioningAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; class MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge @@ -6024,37 +4846,6 @@ class MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridg MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDiagnosticLogsEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRDiagnosticLogsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRDiagnosticLogsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRDiagnosticLogsEventListListAttributeCallbackSubscriptionBridge - : public MTRDiagnosticLogsEventListListAttributeCallbackBridge -{ -public: - MTRDiagnosticLogsEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDiagnosticLogsEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRDiagnosticLogsEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDiagnosticLogsEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRDiagnosticLogsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -6294,39 +5085,6 @@ class MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionB MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRGeneralDiagnosticsEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRGeneralDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGeneralDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRGeneralDiagnosticsEventListListAttributeCallbackSubscriptionBridge - : public MTRGeneralDiagnosticsEventListListAttributeCallbackBridge -{ -public: - MTRGeneralDiagnosticsEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRGeneralDiagnosticsEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGeneralDiagnosticsEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -6461,39 +5219,6 @@ class MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscription MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRSoftwareDiagnosticsEventListListAttributeCallbackSubscriptionBridge - : public MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge -{ -public: - MTRSoftwareDiagnosticsEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -6775,39 +5500,6 @@ class MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRThreadNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge - : public MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge -{ -public: - MTRThreadNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -6907,39 +5599,6 @@ class MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscript MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge - : public MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge -{ -public: - MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -7041,39 +5700,6 @@ class MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubsc MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTREthernetNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge - : public MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge -{ -public: - MTREthernetNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -7107,39 +5733,6 @@ class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptio MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTimeSynchronizationEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRTimeSynchronizationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRTimeSynchronizationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRTimeSynchronizationEventListListAttributeCallbackSubscriptionBridge - : public MTRTimeSynchronizationEventListListAttributeCallbackBridge -{ -public: - MTRTimeSynchronizationEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeSynchronizationEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRTimeSynchronizationEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTimeSynchronizationEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge : public MTRCallbackBridge { @@ -7247,39 +5840,6 @@ class MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackSu MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRBridgedDeviceBasicInformationEventListListAttributeCallbackSubscriptionBridge - : public MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge -{ -public: - MTRBridgedDeviceBasicInformationEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -7379,36 +5939,6 @@ class MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRSwitchEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRSwitchEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRSwitchEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRSwitchEventListListAttributeCallbackSubscriptionBridge : public MTRSwitchEventListListAttributeCallbackBridge -{ -public: - MTRSwitchEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSwitchEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRSwitchEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRSwitchEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRSwitchAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -7507,39 +6037,6 @@ class MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubsc MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRAdministratorCommissioningEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRAdministratorCommissioningEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAdministratorCommissioningEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRAdministratorCommissioningEventListListAttributeCallbackSubscriptionBridge - : public MTRAdministratorCommissioningEventListListAttributeCallbackBridge -{ -public: - MTRAdministratorCommissioningEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAdministratorCommissioningEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAdministratorCommissioningEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAdministratorCommissioningEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -7745,39 +6242,6 @@ class MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscript MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalCredentialsEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROperationalCredentialsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROperationalCredentialsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTROperationalCredentialsEventListListAttributeCallbackSubscriptionBridge - : public MTROperationalCredentialsEventListListAttributeCallbackBridge -{ -public: - MTROperationalCredentialsEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalCredentialsEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROperationalCredentialsEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalCredentialsEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTROperationalCredentialsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -7947,55 +6411,22 @@ class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionB MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRGroupKeyManagementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRGroupKeyManagementAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRGroupKeyManagementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGroupKeyManagementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRGroupKeyManagementEventListListAttributeCallbackSubscriptionBridge - : public MTRGroupKeyManagementEventListListAttributeCallbackBridge -{ -public: - MTRGroupKeyManagementEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupKeyManagementEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRGroupKeyManagementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGroupKeyManagementEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRGroupKeyManagementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRGroupKeyManagementAttributeListListAttributeCallbackBridge +class MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge + : public MTRGroupKeyManagementAttributeListListAttributeCallbackBridge { public: MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( @@ -8111,36 +6542,6 @@ class MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFixedLabelEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRFixedLabelEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRFixedLabelEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRFixedLabelEventListListAttributeCallbackSubscriptionBridge : public MTRFixedLabelEventListListAttributeCallbackBridge -{ -public: - MTRFixedLabelEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFixedLabelEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRFixedLabelEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFixedLabelEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRFixedLabelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -8270,36 +6671,6 @@ class MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRUserLabelEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRUserLabelEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUserLabelEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRUserLabelEventListListAttributeCallbackSubscriptionBridge : public MTRUserLabelEventListListAttributeCallbackBridge -{ -public: - MTRUserLabelEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUserLabelEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUserLabelEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUserLabelEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRUserLabelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -8330,100 +6701,6 @@ class MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge : public MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRProxyConfigurationEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRProxyConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRProxyConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRProxyConfigurationEventListListAttributeCallbackSubscriptionBridge - : public MTRProxyConfigurationEventListListAttributeCallbackBridge -{ -public: - MTRProxyConfigurationEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRProxyConfigurationEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRProxyConfigurationEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRProxyConfigurationEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRProxyDiscoveryEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRProxyDiscoveryEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRProxyDiscoveryEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRProxyDiscoveryEventListListAttributeCallbackSubscriptionBridge - : public MTRProxyDiscoveryEventListListAttributeCallbackBridge -{ -public: - MTRProxyDiscoveryEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRProxyDiscoveryEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRProxyDiscoveryEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRProxyDiscoveryEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRProxyValidEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRProxyValidEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRProxyValidEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRProxyValidEventListListAttributeCallbackSubscriptionBridge : public MTRProxyValidEventListListAttributeCallbackBridge -{ -public: - MTRProxyValidEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRProxyValidEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRProxyValidEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRProxyValidEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -8490,36 +6767,6 @@ class MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBooleanStateEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRBooleanStateEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRBooleanStateEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRBooleanStateEventListListAttributeCallbackSubscriptionBridge : public MTRBooleanStateEventListListAttributeCallbackBridge -{ -public: - MTRBooleanStateEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBooleanStateEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRBooleanStateEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBooleanStateEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRBooleanStateAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -8654,36 +6901,6 @@ class MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRModeSelectEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRModeSelectEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRModeSelectEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRModeSelectEventListListAttributeCallbackSubscriptionBridge : public MTRModeSelectEventListListAttributeCallbackBridge -{ -public: - MTRModeSelectEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRModeSelectEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRModeSelectEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRModeSelectEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRModeSelectAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -8715,19059 +6932,12188 @@ class MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockCredentialRulesSupportAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackSubscriptionBridge - : public MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge +class MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge + : public MTRDoorLockCredentialRulesSupportAttributeCallbackBridge { public: - MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge(queue, handler, action), + MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge::OnDone; + using MTRDoorLockCredentialRulesSupportAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockCredentialRulesSupportAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTemperatureControlGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockSupportedOperatingModesAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRTemperatureControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTemperatureControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRTemperatureControlGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRTemperatureControlGeneratedCommandListListAttributeCallbackBridge +class MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge + : public MTRDoorLockSupportedOperatingModesAttributeCallbackBridge { public: - MTRTemperatureControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTemperatureControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTemperatureControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTemperatureControlGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRDoorLockSupportedOperatingModesAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockSupportedOperatingModesAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTemperatureControlAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRTemperatureControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTemperatureControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRTemperatureControlAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRTemperatureControlAcceptedCommandListListAttributeCallbackBridge +class MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge + : public MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge { public: - MTRTemperatureControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTemperatureControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTemperatureControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTemperatureControlAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTemperatureControlEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRTemperatureControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTemperatureControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRTemperatureControlEventListListAttributeCallbackSubscriptionBridge - : public MTRTemperatureControlEventListListAttributeCallbackBridge +class MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge + : public MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge { public: - MTRTemperatureControlEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTemperatureControlEventListListAttributeCallbackBridge(queue, handler, action), + MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTemperatureControlEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTemperatureControlEventListListAttributeCallbackBridge::OnDone; + using MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTemperatureControlAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRTemperatureControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTemperatureControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRTemperatureControlAttributeListListAttributeCallbackSubscriptionBridge - : public MTRTemperatureControlAttributeListListAttributeCallbackBridge +class MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRDoorLockGeneratedCommandListListAttributeCallbackBridge { public: - MTRTemperatureControlAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTemperatureControlAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTemperatureControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTemperatureControlAttributeListListAttributeCallbackBridge::OnDone; - + using MTRDoorLockGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockGeneratedCommandListListAttributeCallbackBridge::OnDone; + private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRefrigeratorAlarmMaskAttributeCallbackBridge : public MTRCallbackBridge +class MTRDoorLockAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRRefrigeratorAlarmMaskAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRefrigeratorAlarmMaskAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRRefrigeratorAlarmMaskAttributeCallbackSubscriptionBridge : public MTRRefrigeratorAlarmMaskAttributeCallbackBridge +class MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRDoorLockAcceptedCommandListListAttributeCallbackBridge { public: - MTRRefrigeratorAlarmMaskAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRefrigeratorAlarmMaskAttributeCallbackBridge(queue, handler, action), + MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRefrigeratorAlarmMaskAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRefrigeratorAlarmMaskAttributeCallbackBridge::OnDone; + using MTRDoorLockAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRefrigeratorAlarmStateAttributeCallbackBridge : public MTRCallbackBridge +class MTRDoorLockAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRRefrigeratorAlarmStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRefrigeratorAlarmStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRRefrigeratorAlarmStateAttributeCallbackSubscriptionBridge : public MTRRefrigeratorAlarmStateAttributeCallbackBridge +class MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge : public MTRDoorLockAttributeListListAttributeCallbackBridge { public: - MTRRefrigeratorAlarmStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRefrigeratorAlarmStateAttributeCallbackBridge(queue, handler, action), + MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRefrigeratorAlarmStateAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRefrigeratorAlarmStateAttributeCallbackBridge::OnDone; + using MTRDoorLockAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRefrigeratorAlarmSupportedAttributeCallbackBridge : public MTRCallbackBridge +class MTRWindowCoveringConfigStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRRefrigeratorAlarmSupportedAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWindowCoveringConfigStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRefrigeratorAlarmSupportedAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRWindowCoveringConfigStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRRefrigeratorAlarmSupportedAttributeCallbackSubscriptionBridge : public MTRRefrigeratorAlarmSupportedAttributeCallbackBridge +class MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge : public MTRWindowCoveringConfigStatusAttributeCallbackBridge { public: - MTRRefrigeratorAlarmSupportedAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRefrigeratorAlarmSupportedAttributeCallbackBridge(queue, handler, action), + MTRWindowCoveringConfigStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRefrigeratorAlarmSupportedAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRefrigeratorAlarmSupportedAttributeCallbackBridge::OnDone; + using MTRWindowCoveringConfigStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringConfigStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRefrigeratorAlarmGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWindowCoveringOperationalStatusAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRRefrigeratorAlarmGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWindowCoveringOperationalStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRefrigeratorAlarmGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRWindowCoveringOperationalStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRRefrigeratorAlarmGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRRefrigeratorAlarmGeneratedCommandListListAttributeCallbackBridge +class MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge + : public MTRWindowCoveringOperationalStatusAttributeCallbackBridge { public: - MTRRefrigeratorAlarmGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRefrigeratorAlarmGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringOperationalStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRefrigeratorAlarmGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRefrigeratorAlarmGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRWindowCoveringOperationalStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringOperationalStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRefrigeratorAlarmAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWindowCoveringModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRRefrigeratorAlarmAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWindowCoveringModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRefrigeratorAlarmAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRWindowCoveringModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRRefrigeratorAlarmAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRRefrigeratorAlarmAcceptedCommandListListAttributeCallbackBridge +class MTRWindowCoveringModeAttributeCallbackSubscriptionBridge : public MTRWindowCoveringModeAttributeCallbackBridge { public: - MTRRefrigeratorAlarmAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRefrigeratorAlarmAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRWindowCoveringModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRefrigeratorAlarmAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRefrigeratorAlarmAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRWindowCoveringModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRefrigeratorAlarmEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWindowCoveringSafetyStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRRefrigeratorAlarmEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWindowCoveringSafetyStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRefrigeratorAlarmEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRWindowCoveringSafetyStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRRefrigeratorAlarmEventListListAttributeCallbackSubscriptionBridge - : public MTRRefrigeratorAlarmEventListListAttributeCallbackBridge +class MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge : public MTRWindowCoveringSafetyStatusAttributeCallbackBridge { public: - MTRRefrigeratorAlarmEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRefrigeratorAlarmEventListListAttributeCallbackBridge(queue, handler, action), + MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringSafetyStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRefrigeratorAlarmEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRefrigeratorAlarmEventListListAttributeCallbackBridge::OnDone; + using MTRWindowCoveringSafetyStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringSafetyStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRefrigeratorAlarmAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRRefrigeratorAlarmAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRefrigeratorAlarmAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRRefrigeratorAlarmAttributeListListAttributeCallbackSubscriptionBridge - : public MTRRefrigeratorAlarmAttributeListListAttributeCallbackBridge +class MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge { public: - MTRRefrigeratorAlarmAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRefrigeratorAlarmAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRefrigeratorAlarmAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRefrigeratorAlarmAttributeListListAttributeCallbackBridge::OnDone; + using MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRAirQualityGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRAirQualityGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAirQualityGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(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 MTRAirQualityGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRAirQualityGeneratedCommandListListAttributeCallbackBridge +class MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge { public: - MTRAirQualityGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAirQualityGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRAirQualityGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAirQualityGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRAirQualityAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWindowCoveringAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRAirQualityAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWindowCoveringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAirQualityAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRWindowCoveringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRAirQualityAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRAirQualityAcceptedCommandListListAttributeCallbackBridge +class MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge + : public MTRWindowCoveringAttributeListListAttributeCallbackBridge { public: - MTRAirQualityAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAirQualityAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRAirQualityAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAirQualityAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRWindowCoveringAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRAirQualityEventListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRAirQualityEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAirQualityEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRAirQualityEventListListAttributeCallbackSubscriptionBridge : public MTRAirQualityEventListListAttributeCallbackBridge +class MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge { public: - MTRAirQualityEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAirQualityEventListListAttributeCallbackBridge(queue, handler, action), + MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRAirQualityEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAirQualityEventListListAttributeCallbackBridge::OnDone; + using MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRAirQualityAttributeListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRAirQualityAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAirQualityAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRAirQualityAttributeListListAttributeCallbackSubscriptionBridge - : public MTRAirQualityAttributeListListAttributeCallbackBridge +class MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge { public: - MTRAirQualityAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAirQualityAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRAirQualityAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAirQualityAttributeListListAttributeCallbackBridge::OnDone; + using MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRSmokeCOAlarmGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRBarrierControlAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRSmokeCOAlarmGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRBarrierControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRSmokeCOAlarmGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRBarrierControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRSmokeCOAlarmGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRSmokeCOAlarmGeneratedCommandListListAttributeCallbackBridge +class MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge + : public MTRBarrierControlAttributeListListAttributeCallbackBridge { public: - MTRSmokeCOAlarmGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSmokeCOAlarmGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBarrierControlAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRSmokeCOAlarmGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRSmokeCOAlarmGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRBarrierControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBarrierControlAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRSmokeCOAlarmAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRSmokeCOAlarmAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRSmokeCOAlarmAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + chip::BitMask value); }; -class MTRSmokeCOAlarmAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRSmokeCOAlarmAcceptedCommandListListAttributeCallbackBridge +class MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge + : public MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge { public: - MTRSmokeCOAlarmAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSmokeCOAlarmAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRSmokeCOAlarmAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRSmokeCOAlarmAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRSmokeCOAlarmEventListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRSmokeCOAlarmEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRSmokeCOAlarmEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRSmokeCOAlarmEventListListAttributeCallbackSubscriptionBridge : public MTRSmokeCOAlarmEventListListAttributeCallbackBridge +class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge { public: - MTRSmokeCOAlarmEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSmokeCOAlarmEventListListAttributeCallbackBridge(queue, handler, action), + MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRSmokeCOAlarmEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRSmokeCOAlarmEventListListAttributeCallbackBridge::OnDone; + using MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRSmokeCOAlarmAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRSmokeCOAlarmAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRSmokeCOAlarmAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(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 MTRSmokeCOAlarmAttributeListListAttributeCallbackSubscriptionBridge - : public MTRSmokeCOAlarmAttributeListListAttributeCallbackBridge +class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge { public: - MTRSmokeCOAlarmAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSmokeCOAlarmAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRSmokeCOAlarmAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRSmokeCOAlarmAttributeListListAttributeCallbackBridge::OnDone; + using MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalStatePhaseListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROperationalStatePhaseListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalStatePhaseListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable> & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROperationalStatePhaseListListAttributeCallbackSubscriptionBridge - : public MTROperationalStatePhaseListListAttributeCallbackBridge +class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge + : public MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge { public: - MTROperationalStatePhaseListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalStatePhaseListListAttributeCallbackBridge(queue, handler, action), + MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROperationalStatePhaseListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalStatePhaseListListAttributeCallbackBridge::OnDone; + using MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalStateOperationalStateListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRThermostatGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROperationalStateOperationalStateListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRThermostatGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalStateOperationalStateListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRThermostatGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROperationalStateOperationalStateListListAttributeCallbackSubscriptionBridge - : public MTROperationalStateOperationalStateListListAttributeCallbackBridge +class MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRThermostatGeneratedCommandListListAttributeCallbackBridge { public: - MTROperationalStateOperationalStateListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalStateOperationalStateListListAttributeCallbackBridge(queue, handler, action), + MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRThermostatGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROperationalStateOperationalStateListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalStateOperationalStateListListAttributeCallbackBridge::OnDone; + using MTRThermostatGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalStateOperationalStateStructAttributeCallbackBridge - : public MTRCallbackBridge +class MTRThermostatAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROperationalStateOperationalStateStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRThermostatAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalStateOperationalStateStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRThermostatAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROperationalStateOperationalStateStructAttributeCallbackSubscriptionBridge - : public MTROperationalStateOperationalStateStructAttributeCallbackBridge +class MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRThermostatAcceptedCommandListListAttributeCallbackBridge { public: - MTROperationalStateOperationalStateStructAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalStateOperationalStateStructAttributeCallbackBridge(queue, handler, action), + MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRThermostatAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROperationalStateOperationalStateStructAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalStateOperationalStateStructAttributeCallbackBridge::OnDone; + using MTRThermostatAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalStateOperationalErrorStructAttributeCallbackBridge - : public MTRCallbackBridge +class MTRThermostatAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROperationalStateOperationalErrorStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRThermostatAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalStateOperationalErrorStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRThermostatAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROperationalStateOperationalErrorStructAttributeCallbackSubscriptionBridge - : public MTROperationalStateOperationalErrorStructAttributeCallbackBridge +class MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge + : public MTRThermostatAttributeListListAttributeCallbackBridge { public: - MTROperationalStateOperationalErrorStructAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalStateOperationalErrorStructAttributeCallbackBridge(queue, handler, action), + MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRThermostatAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROperationalStateOperationalErrorStructAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalStateOperationalErrorStructAttributeCallbackBridge::OnDone; + using MTRThermostatAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalStateGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFanControlRockSupportAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROperationalStateGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFanControlRockSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalStateGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRFanControlRockSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTROperationalStateGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTROperationalStateGeneratedCommandListListAttributeCallbackBridge +class MTRFanControlRockSupportAttributeCallbackSubscriptionBridge : public MTRFanControlRockSupportAttributeCallbackBridge { public: - MTROperationalStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalStateGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRFanControlRockSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlRockSupportAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROperationalStateGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalStateGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRFanControlRockSupportAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlRockSupportAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalStateAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFanControlRockSettingAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROperationalStateAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFanControlRockSettingAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalStateAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRFanControlRockSettingAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTROperationalStateAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTROperationalStateAcceptedCommandListListAttributeCallbackBridge +class MTRFanControlRockSettingAttributeCallbackSubscriptionBridge : public MTRFanControlRockSettingAttributeCallbackBridge { public: - MTROperationalStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalStateAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRFanControlRockSettingAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlRockSettingAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROperationalStateAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalStateAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRFanControlRockSettingAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlRockSettingAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalStateEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFanControlWindSupportAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROperationalStateEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFanControlWindSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalStateEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRFanControlWindSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTROperationalStateEventListListAttributeCallbackSubscriptionBridge - : public MTROperationalStateEventListListAttributeCallbackBridge +class MTRFanControlWindSupportAttributeCallbackSubscriptionBridge : public MTRFanControlWindSupportAttributeCallbackBridge { public: - MTROperationalStateEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalStateEventListListAttributeCallbackBridge(queue, handler, action), + MTRFanControlWindSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlWindSupportAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROperationalStateEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalStateEventListListAttributeCallbackBridge::OnDone; + using MTRFanControlWindSupportAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlWindSupportAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalStateAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFanControlWindSettingAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROperationalStateAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFanControlWindSettingAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalStateAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRFanControlWindSettingAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTROperationalStateAttributeListListAttributeCallbackSubscriptionBridge - : public MTROperationalStateAttributeListListAttributeCallbackBridge +class MTRFanControlWindSettingAttributeCallbackSubscriptionBridge : public MTRFanControlWindSettingAttributeCallbackBridge { public: - MTROperationalStateAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalStateAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRFanControlWindSettingAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlWindSettingAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROperationalStateAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalStateAttributeListListAttributeCallbackBridge::OnDone; + using MTRFanControlWindSettingAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlWindSettingAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRHEPAFilterMonitoringGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFanControlGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRHEPAFilterMonitoringGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFanControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRHEPAFilterMonitoringGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRFanControlGeneratedCommandListListAttributeCallbackBridge(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 MTRHEPAFilterMonitoringGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRHEPAFilterMonitoringGeneratedCommandListListAttributeCallbackBridge +class MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRFanControlGeneratedCommandListListAttributeCallbackBridge { public: - MTRHEPAFilterMonitoringGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRHEPAFilterMonitoringGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRHEPAFilterMonitoringGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRHEPAFilterMonitoringGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRFanControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRHEPAFilterMonitoringAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFanControlAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRHEPAFilterMonitoringAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFanControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRHEPAFilterMonitoringAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRFanControlAcceptedCommandListListAttributeCallbackBridge(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 MTRHEPAFilterMonitoringAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRHEPAFilterMonitoringAcceptedCommandListListAttributeCallbackBridge +class MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRFanControlAcceptedCommandListListAttributeCallbackBridge { public: - MTRHEPAFilterMonitoringAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRHEPAFilterMonitoringAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRHEPAFilterMonitoringAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRHEPAFilterMonitoringAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRFanControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRHEPAFilterMonitoringEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFanControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRHEPAFilterMonitoringEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFanControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRHEPAFilterMonitoringEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRFanControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRHEPAFilterMonitoringEventListListAttributeCallbackSubscriptionBridge - : public MTRHEPAFilterMonitoringEventListListAttributeCallbackBridge +class MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge + : public MTRFanControlAttributeListListAttributeCallbackBridge { public: - MTRHEPAFilterMonitoringEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRHEPAFilterMonitoringEventListListAttributeCallbackBridge(queue, handler, action), + MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRHEPAFilterMonitoringEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRHEPAFilterMonitoringEventListListAttributeCallbackBridge::OnDone; + using MTRFanControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRHEPAFilterMonitoringAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRHEPAFilterMonitoringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRHEPAFilterMonitoringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRHEPAFilterMonitoringAttributeListListAttributeCallbackSubscriptionBridge - : public MTRHEPAFilterMonitoringAttributeListListAttributeCallbackBridge +class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge { public: - MTRHEPAFilterMonitoringAttributeListListAttributeCallbackSubscriptionBridge( + MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRHEPAFilterMonitoringAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRHEPAFilterMonitoringAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRHEPAFilterMonitoringAttributeListListAttributeCallbackBridge::OnDone; + using MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(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 MTRActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallbackBridge +class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge { public: - MTRActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallbackSubscriptionBridge( + MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallbackBridge::OnDone; - + using MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; + private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallbackBridge +class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge + : public MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge { public: - MTRActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRActivatedCarbonFilterMonitoringEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRColorControlGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRActivatedCarbonFilterMonitoringEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRColorControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRActivatedCarbonFilterMonitoringEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRColorControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRActivatedCarbonFilterMonitoringEventListListAttributeCallbackSubscriptionBridge - : public MTRActivatedCarbonFilterMonitoringEventListListAttributeCallbackBridge +class MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRColorControlGeneratedCommandListListAttributeCallbackBridge { public: - MTRActivatedCarbonFilterMonitoringEventListListAttributeCallbackSubscriptionBridge( + MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActivatedCarbonFilterMonitoringEventListListAttributeCallbackBridge(queue, handler, action), + MTRColorControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRActivatedCarbonFilterMonitoringEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRActivatedCarbonFilterMonitoringEventListListAttributeCallbackBridge::OnDone; + using MTRColorControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRActivatedCarbonFilterMonitoringAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRColorControlAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRActivatedCarbonFilterMonitoringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRColorControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRActivatedCarbonFilterMonitoringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRColorControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRActivatedCarbonFilterMonitoringAttributeListListAttributeCallbackSubscriptionBridge - : public MTRActivatedCarbonFilterMonitoringAttributeListListAttributeCallbackBridge +class MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRColorControlAcceptedCommandListListAttributeCallbackBridge { public: - MTRActivatedCarbonFilterMonitoringAttributeListListAttributeCallbackSubscriptionBridge( + MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActivatedCarbonFilterMonitoringAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRColorControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRActivatedCarbonFilterMonitoringAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRActivatedCarbonFilterMonitoringAttributeListListAttributeCallbackBridge::OnDone; + using MTRColorControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockCredentialRulesSupportAttributeCallbackBridge - : public MTRCallbackBridge +class MTRColorControlAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRColorControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRColorControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge - : public MTRDoorLockCredentialRulesSupportAttributeCallbackBridge +class MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge + : public MTRColorControlAttributeListListAttributeCallbackBridge { public: - MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(queue, handler, action), + MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockCredentialRulesSupportAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockCredentialRulesSupportAttributeCallbackBridge::OnDone; + using MTRColorControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockSupportedOperatingModesAttributeCallbackBridge - : public MTRCallbackBridge +class MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge - : public MTRDoorLockSupportedOperatingModesAttributeCallbackBridge +class MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge { public: - MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(queue, handler, action), + MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockSupportedOperatingModesAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockSupportedOperatingModesAttributeCallbackBridge::OnDone; + using MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge - : public MTRCallbackBridge +class MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge - : public MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge +class MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge { public: - MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( + MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(queue, handler, action), + MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::OnDone; + using MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge - : public MTRCallbackBridge +class MTRBallastConfigurationAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRBallastConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRBallastConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge - : public MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge +class MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge + : public MTRBallastConfigurationAttributeListListAttributeCallbackBridge { public: - MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(queue, handler, action), + MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBallastConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::OnDone; + using MTRBallastConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBallastConfigurationAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(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 MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRDoorLockGeneratedCommandListListAttributeCallbackBridge +class MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge { public: - MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(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 MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRDoorLockAcceptedCommandListListAttributeCallbackBridge +class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge { public: - MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockEventListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRDoorLockEventListListAttributeCallbackSubscriptionBridge : public MTRDoorLockEventListListAttributeCallbackBridge +class MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge + : public MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge { public: - MTRDoorLockEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockEventListListAttributeCallbackBridge(queue, handler, action), + MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockEventListListAttributeCallbackBridge::OnDone; - + using MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge::OnDone; + private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockAttributeListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge : public MTRDoorLockAttributeListListAttributeCallbackBridge +class MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge { public: - MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockAttributeListListAttributeCallbackBridge::OnDone; + using MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWindowCoveringConfigStatusAttributeCallbackBridge : public MTRCallbackBridge +class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWindowCoveringConfigStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringConfigStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge : public MTRWindowCoveringConfigStatusAttributeCallbackBridge +class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge { public: - MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringConfigStatusAttributeCallbackBridge(queue, handler, action), + MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWindowCoveringConfigStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWindowCoveringConfigStatusAttributeCallbackBridge::OnDone; + using MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWindowCoveringOperationalStatusAttributeCallbackBridge - : public MTRCallbackBridge +class MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWindowCoveringOperationalStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringOperationalStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge - : public MTRWindowCoveringOperationalStatusAttributeCallbackBridge +class MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge + : public MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge { public: - MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringOperationalStatusAttributeCallbackBridge(queue, handler, action), + MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWindowCoveringOperationalStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWindowCoveringOperationalStatusAttributeCallbackBridge::OnDone; + using MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWindowCoveringModeAttributeCallbackBridge : public MTRCallbackBridge +class MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWindowCoveringModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRWindowCoveringModeAttributeCallbackSubscriptionBridge : public MTRWindowCoveringModeAttributeCallbackBridge +class MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge { public: - MTRWindowCoveringModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringModeAttributeCallbackBridge(queue, handler, action), + MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWindowCoveringModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWindowCoveringModeAttributeCallbackBridge::OnDone; + using MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWindowCoveringSafetyStatusAttributeCallbackBridge : public MTRCallbackBridge +class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWindowCoveringSafetyStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringSafetyStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge : public MTRWindowCoveringSafetyStatusAttributeCallbackBridge +class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge { public: - MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringSafetyStatusAttributeCallbackBridge(queue, handler, action), + MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWindowCoveringSafetyStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWindowCoveringSafetyStatusAttributeCallbackBridge::OnDone; + using MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPressureMeasurementAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPressureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPressureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge +class MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge + : public MTRPressureMeasurementAttributeListListAttributeCallbackBridge { public: - MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge( + MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRPressureMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRPressureMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPressureMeasurementAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(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 MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge +class MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge { public: - MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWindowCoveringEventListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWindowCoveringEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRWindowCoveringEventListListAttributeCallbackSubscriptionBridge - : public MTRWindowCoveringEventListListAttributeCallbackBridge +class MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge { public: - MTRWindowCoveringEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringEventListListAttributeCallbackBridge(queue, handler, action), + MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWindowCoveringEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWindowCoveringEventListListAttributeCallbackBridge::OnDone; + using MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWindowCoveringAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFlowMeasurementAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWindowCoveringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFlowMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRFlowMeasurementAttributeListListAttributeCallbackBridge(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 MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge - : public MTRWindowCoveringAttributeListListAttributeCallbackBridge +class MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge + : public MTRFlowMeasurementAttributeListListAttributeCallbackBridge { public: - MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFlowMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWindowCoveringAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWindowCoveringAttributeListListAttributeCallbackBridge::OnDone; + using MTRFlowMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFlowMeasurementAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(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 MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge +class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge { public: - MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge +class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge { public: - MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBarrierControlEventListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRBarrierControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBarrierControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRBarrierControlEventListListAttributeCallbackSubscriptionBridge - : public MTRBarrierControlEventListListAttributeCallbackBridge +class MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge + : public MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge { public: - MTRBarrierControlEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBarrierControlEventListListAttributeCallbackBridge(queue, handler, action), + MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBarrierControlEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBarrierControlEventListListAttributeCallbackBridge::OnDone; + using MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBarrierControlAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROccupancySensingOccupancyAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBarrierControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROccupancySensingOccupancyAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBarrierControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROccupancySensingOccupancyAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge - : public MTRBarrierControlAttributeListListAttributeCallbackBridge +class MTROccupancySensingOccupancyAttributeCallbackSubscriptionBridge : public MTROccupancySensingOccupancyAttributeCallbackBridge { public: - MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBarrierControlAttributeListListAttributeCallbackBridge(queue, handler, action), + MTROccupancySensingOccupancyAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROccupancySensingOccupancyAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBarrierControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBarrierControlAttributeListListAttributeCallbackBridge::OnDone; + using MTROccupancySensingOccupancyAttributeCallbackBridge::KeepAliveOnCallback; + using MTROccupancySensingOccupancyAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge - : public MTRCallbackBridge +class MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - chip::BitMask value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge - : public MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge +class MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackSubscriptionBridge + : public MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge { public: - MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( + MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(queue, handler, action), + MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge::OnDone; + using MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge::KeepAliveOnCallback; + using MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(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 MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge +class MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge { public: - MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(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 MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge +class MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge { public: - MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROccupancySensingAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROccupancySensingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROccupancySensingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRPumpConfigurationAndControlEventListListAttributeCallbackSubscriptionBridge - : public MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge +class MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge + : public MTROccupancySensingAttributeListListAttributeCallbackBridge { public: - MTRPumpConfigurationAndControlEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge(queue, handler, action), + MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROccupancySensingAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge::OnDone; + using MTROccupancySensingAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROccupancySensingAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge - : public MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge +class MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge { public: - MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge::OnDone; + using MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThermostatGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRThermostatGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThermostatGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge(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 MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRThermostatGeneratedCommandListListAttributeCallbackBridge +class MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge { public: - MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - + MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + void OnSubscriptionEstablished(); - using MTRThermostatGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThermostatGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThermostatAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWakeOnLANAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThermostatAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWakeOnLANAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThermostatAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRWakeOnLANAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRThermostatAcceptedCommandListListAttributeCallbackBridge +class MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge : public MTRWakeOnLANAttributeListListAttributeCallbackBridge { public: - MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWakeOnLANAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThermostatAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThermostatAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRWakeOnLANAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWakeOnLANAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThermostatEventListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRChannelChannelListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThermostatEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRChannelChannelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThermostatEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRChannelChannelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::DecodableList & value); }; -class MTRThermostatEventListListAttributeCallbackSubscriptionBridge : public MTRThermostatEventListListAttributeCallbackBridge +class MTRChannelChannelListListAttributeCallbackSubscriptionBridge : public MTRChannelChannelListListAttributeCallbackBridge { public: - MTRThermostatEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatEventListListAttributeCallbackBridge(queue, handler, action), + MTRChannelChannelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRChannelChannelListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThermostatEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThermostatEventListListAttributeCallbackBridge::OnDone; + using MTRChannelChannelListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelChannelListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThermostatAttributeListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRChannelLineupStructAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThermostatAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRChannelLineupStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThermostatAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRChannelLineupStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge - : public MTRThermostatAttributeListListAttributeCallbackBridge +class MTRChannelLineupStructAttributeCallbackSubscriptionBridge : public MTRChannelLineupStructAttributeCallbackBridge { public: - MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRChannelLineupStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRChannelLineupStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThermostatAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThermostatAttributeListListAttributeCallbackBridge::OnDone; + using MTRChannelLineupStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelLineupStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlRockSupportAttributeCallbackBridge : public MTRCallbackBridge +class MTRChannelCurrentChannelStructAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFanControlRockSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRChannelCurrentChannelStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlRockSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRChannelCurrentChannelStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRFanControlRockSupportAttributeCallbackSubscriptionBridge : public MTRFanControlRockSupportAttributeCallbackBridge +class MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge + : public MTRChannelCurrentChannelStructAttributeCallbackBridge { public: - MTRFanControlRockSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlRockSupportAttributeCallbackBridge(queue, handler, action), + MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRChannelCurrentChannelStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlRockSupportAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlRockSupportAttributeCallbackBridge::OnDone; + using MTRChannelCurrentChannelStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelCurrentChannelStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlRockSettingAttributeCallbackBridge : public MTRCallbackBridge +class MTRChannelGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFanControlRockSettingAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRChannelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlRockSettingAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRChannelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRFanControlRockSettingAttributeCallbackSubscriptionBridge : public MTRFanControlRockSettingAttributeCallbackBridge +class MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRChannelGeneratedCommandListListAttributeCallbackBridge { public: - MTRFanControlRockSettingAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlRockSettingAttributeCallbackBridge(queue, handler, action), + MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRChannelGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlRockSettingAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlRockSettingAttributeCallbackBridge::OnDone; + using MTRChannelGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlWindSupportAttributeCallbackBridge : public MTRCallbackBridge +class MTRChannelAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFanControlWindSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRChannelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlWindSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRChannelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRFanControlWindSupportAttributeCallbackSubscriptionBridge : public MTRFanControlWindSupportAttributeCallbackBridge +class MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRChannelAcceptedCommandListListAttributeCallbackBridge { public: - MTRFanControlWindSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlWindSupportAttributeCallbackBridge(queue, handler, action), + MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRChannelAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlWindSupportAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlWindSupportAttributeCallbackBridge::OnDone; + using MTRChannelAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlWindSettingAttributeCallbackBridge : public MTRCallbackBridge +class MTRChannelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFanControlWindSettingAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRChannelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlWindSettingAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRChannelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRFanControlWindSettingAttributeCallbackSubscriptionBridge : public MTRFanControlWindSettingAttributeCallbackBridge +class MTRChannelAttributeListListAttributeCallbackSubscriptionBridge : public MTRChannelAttributeListListAttributeCallbackBridge { public: - MTRFanControlWindSettingAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlWindSettingAttributeCallbackBridge(queue, handler, action), + MTRChannelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRChannelAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlWindSettingAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlWindSettingAttributeCallbackBridge::OnDone; + using MTRChannelAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRTargetNavigatorTargetListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFanControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTargetNavigatorTargetListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRTargetNavigatorTargetListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::DecodableList & + value); }; -class MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRFanControlGeneratedCommandListListAttributeCallbackBridge +class MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge + : public MTRTargetNavigatorTargetListListAttributeCallbackBridge { public: - MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTargetNavigatorTargetListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRTargetNavigatorTargetListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTargetNavigatorTargetListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFanControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(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 MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRFanControlAcceptedCommandListListAttributeCallbackBridge +class MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge { public: - MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlEventListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFanControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRFanControlEventListListAttributeCallbackSubscriptionBridge : public MTRFanControlEventListListAttributeCallbackBridge +class MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge { public: - MTRFanControlEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlEventListListAttributeCallbackBridge(queue, handler, action), + MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlEventListListAttributeCallbackBridge::OnDone; + using MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRTargetNavigatorAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFanControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTargetNavigatorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRTargetNavigatorAttributeListListAttributeCallbackBridge(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 MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge - : public MTRFanControlAttributeListListAttributeCallbackBridge +class MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge + : public MTRTargetNavigatorAttributeListListAttributeCallbackBridge { public: - MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTargetNavigatorAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlAttributeListListAttributeCallbackBridge::OnDone; + using MTRTargetNavigatorAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTargetNavigatorAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & + value); }; -class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge +class MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge + : public MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge { public: - MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(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 MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge +class MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge { public: - MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackSubscriptionBridge - : public MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge +class MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge { public: - MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackSubscriptionBridge( + MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge(queue, handler, action), + MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge::OnDone; + using MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRMediaPlaybackAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRMediaPlaybackAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRMediaPlaybackAttributeListListAttributeCallbackBridge(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 MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge - : public MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge +class MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge + : public MTRMediaPlaybackAttributeListListAttributeCallbackBridge { public: - MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge::OnDone; + using MTRMediaPlaybackAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaPlaybackAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRColorControlGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRMediaInputInputListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRMediaInputInputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRMediaInputInputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::DecodableList & + value); }; -class MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRColorControlGeneratedCommandListListAttributeCallbackBridge +class MTRMediaInputInputListListAttributeCallbackSubscriptionBridge : public MTRMediaInputInputListListAttributeCallbackBridge { public: - MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRMediaInputInputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaInputInputListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRColorControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRColorControlGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRMediaInputInputListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaInputInputListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRColorControlAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRMediaInputGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRColorControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(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 MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRColorControlAcceptedCommandListListAttributeCallbackBridge +class MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRMediaInputGeneratedCommandListListAttributeCallbackBridge { public: - MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRColorControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRColorControlAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRMediaInputGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaInputGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRColorControlEventListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRMediaInputAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRColorControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRColorControlEventListListAttributeCallbackSubscriptionBridge : public MTRColorControlEventListListAttributeCallbackBridge +class MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRMediaInputAcceptedCommandListListAttributeCallbackBridge { public: - MTRColorControlEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlEventListListAttributeCallbackBridge(queue, handler, action), + MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRColorControlEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRColorControlEventListListAttributeCallbackBridge::OnDone; + using MTRMediaInputAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaInputAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRColorControlAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRMediaInputAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRMediaInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRMediaInputAttributeListListAttributeCallbackBridge(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 MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge - : public MTRColorControlAttributeListListAttributeCallbackBridge +class MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge + : public MTRMediaInputAttributeListListAttributeCallbackBridge { public: - MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaInputAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRColorControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRColorControlAttributeListListAttributeCallbackBridge::OnDone; + using MTRMediaInputAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaInputAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRLowPowerGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(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 MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge +class MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRLowPowerGeneratedCommandListListAttributeCallbackBridge { public: - MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRLowPowerGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLowPowerGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRLowPowerAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(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 MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge +class MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRLowPowerAcceptedCommandListListAttributeCallbackBridge { public: - MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRLowPowerAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLowPowerAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBallastConfigurationEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRLowPowerAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBallastConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRLowPowerAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBallastConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRLowPowerAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRBallastConfigurationEventListListAttributeCallbackSubscriptionBridge - : public MTRBallastConfigurationEventListListAttributeCallbackBridge +class MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge : public MTRLowPowerAttributeListListAttributeCallbackBridge { public: - MTRBallastConfigurationEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBallastConfigurationEventListListAttributeCallbackBridge(queue, handler, action), + MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLowPowerAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBallastConfigurationEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBallastConfigurationEventListListAttributeCallbackBridge::OnDone; + using MTRLowPowerAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLowPowerAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBallastConfigurationAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRBallastConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBallastConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge - : public MTRBallastConfigurationAttributeListListAttributeCallbackBridge +class MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge { public: - MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBallastConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBallastConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBallastConfigurationAttributeListListAttributeCallbackBridge::OnDone; + using MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(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 MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge { public: - MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRKeypadInputAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRKeypadInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRKeypadInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge + : public MTRKeypadInputAttributeListListAttributeCallbackBridge { public: - MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRKeypadInputAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRKeypadInputAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRKeypadInputAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRIlluminanceMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRContentLauncherAcceptHeaderListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRIlluminanceMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRIlluminanceMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRIlluminanceMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRIlluminanceMeasurementEventListListAttributeCallbackBridge +class MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge + : public MTRContentLauncherAcceptHeaderListAttributeCallbackBridge { public: - MTRIlluminanceMeasurementEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIlluminanceMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRIlluminanceMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRIlluminanceMeasurementEventListListAttributeCallbackBridge::OnDone; + using MTRContentLauncherAcceptHeaderListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRContentLauncherAcceptHeaderListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge +class MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge { public: - MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge::OnDone; + using MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(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 MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge { public: - MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRContentLauncherAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRContentLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRContentLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge + : public MTRContentLauncherAttributeListListAttributeCallbackBridge { public: - MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRContentLauncherAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRContentLauncherAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRContentLauncherAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTemperatureMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAudioOutputOutputListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTemperatureMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAudioOutputOutputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTemperatureMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAudioOutputOutputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::DecodableList & + value); }; -class MTRTemperatureMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRTemperatureMeasurementEventListListAttributeCallbackBridge +class MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge : public MTRAudioOutputOutputListListAttributeCallbackBridge { public: - MTRTemperatureMeasurementEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTemperatureMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAudioOutputOutputListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTemperatureMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTemperatureMeasurementEventListListAttributeCallbackBridge::OnDone; + using MTRAudioOutputOutputListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAudioOutputOutputListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge +class MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge { public: - MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge::OnDone; + using MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(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 MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge { public: - MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAudioOutputAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAudioOutputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAudioOutputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge + : public MTRAudioOutputAttributeListListAttributeCallbackBridge { public: - MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAudioOutputAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRAudioOutputAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAudioOutputAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPressureMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRApplicationLauncherCatalogListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPressureMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRApplicationLauncherCatalogListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPressureMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRApplicationLauncherCatalogListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRPressureMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRPressureMeasurementEventListListAttributeCallbackBridge +class MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge + : public MTRApplicationLauncherCatalogListListAttributeCallbackBridge { public: - MTRPressureMeasurementEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPressureMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRApplicationLauncherCatalogListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPressureMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPressureMeasurementEventListListAttributeCallbackBridge::OnDone; + using MTRApplicationLauncherCatalogListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationLauncherCatalogListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPressureMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPressureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPressureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable< + chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType> & value); }; -class MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRPressureMeasurementAttributeListListAttributeCallbackBridge +class MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge + : public MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge { public: - MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPressureMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPressureMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPressureMeasurementAttributeListListAttributeCallbackBridge::OnDone; + using MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(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 MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge { public: - MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(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 MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge { public: - MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFlowMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRApplicationLauncherAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFlowMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRApplicationLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFlowMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRApplicationLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRFlowMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRFlowMeasurementEventListListAttributeCallbackBridge +class MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge + : public MTRApplicationLauncherAttributeListListAttributeCallbackBridge { public: - MTRFlowMeasurementEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFlowMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRApplicationLauncherAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFlowMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFlowMeasurementEventListListAttributeCallbackBridge::OnDone; + using MTRApplicationLauncherAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationLauncherAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFlowMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRApplicationBasicApplicationStructAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFlowMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRApplicationBasicApplicationStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFlowMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRApplicationBasicApplicationStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType & value); }; -class MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRFlowMeasurementAttributeListListAttributeCallbackBridge +class MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge + : public MTRApplicationBasicApplicationStructAttributeCallbackBridge { public: - MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFlowMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRApplicationBasicApplicationStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFlowMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFlowMeasurementAttributeListListAttributeCallbackBridge::OnDone; + using MTRApplicationBasicApplicationStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationBasicApplicationStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge + : public MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge { public: - MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge { public: - MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRRelativeHumidityMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge +class MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge { public: - MTRRelativeHumidityMeasurementEventListListAttributeCallbackSubscriptionBridge( + MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge::OnDone; + using MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRApplicationBasicAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRApplicationBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRApplicationBasicAttributeListListAttributeCallbackBridge(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 MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge +class MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge + : public MTRApplicationBasicAttributeListListAttributeCallbackBridge { public: - MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRApplicationBasicAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge::OnDone; + using MTRApplicationBasicAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationBasicAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROccupancySensingOccupancyAttributeCallbackBridge : public MTRCallbackBridge +class MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROccupancySensingOccupancyAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROccupancySensingOccupancyAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROccupancySensingOccupancyAttributeCallbackSubscriptionBridge : public MTROccupancySensingOccupancyAttributeCallbackBridge +class MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge { public: - MTROccupancySensingOccupancyAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROccupancySensingOccupancyAttributeCallbackBridge(queue, handler, action), + MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROccupancySensingOccupancyAttributeCallbackBridge::KeepAliveOnCallback; - using MTROccupancySensingOccupancyAttributeCallbackBridge::OnDone; + using MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::BitMask value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackSubscriptionBridge - : public MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge +class MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge { public: - MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackSubscriptionBridge( + MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge(queue, handler, action), + MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge::KeepAliveOnCallback; - using MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge::OnDone; + using MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAccountLoginAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAccountLoginAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAccountLoginAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge +class MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge + : public MTRAccountLoginAttributeListListAttributeCallbackBridge { public: - MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccountLoginAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRAccountLoginAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccountLoginAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(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 MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge +class MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge { public: - MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROccupancySensingEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ +class MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ public: - MTROccupancySensingEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROccupancySensingEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTROccupancySensingEventListListAttributeCallbackSubscriptionBridge - : public MTROccupancySensingEventListListAttributeCallbackBridge +class MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge { public: - MTROccupancySensingEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROccupancySensingEventListListAttributeCallbackBridge(queue, handler, action), + MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROccupancySensingEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROccupancySensingEventListListAttributeCallbackBridge::OnDone; + using MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROccupancySensingAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRElectricalMeasurementAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROccupancySensingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROccupancySensingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(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 MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge - : public MTROccupancySensingAttributeListListAttributeCallbackBridge +class MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge + : public MTRElectricalMeasurementAttributeListListAttributeCallbackBridge { public: - MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROccupancySensingAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROccupancySensingAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROccupancySensingAttributeListListAttributeCallbackBridge::OnDone; + using MTRElectricalMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRElectricalMeasurementAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingBitmap8AttributeCallbackBridge : public MTRCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRUnitTestingBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRCarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRCarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge : public MTRUnitTestingBitmap8AttributeCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingBitmap8AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingBitmap8AttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingBitmap8AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingBitmap16AttributeCallbackBridge : public MTRCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRUnitTestingBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRCarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRCarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge : public MTRUnitTestingBitmap16AttributeCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingBitmap16AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingBitmap16AttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingBitmap16AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonMonoxideConcentrationMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingBitmap32AttributeCallbackBridge : public MTRCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonMonoxideConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRCarbonMonoxideConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRCarbonMonoxideConcentrationMeasurementEventListListAttributeCallbackBridge +class MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge : public MTRUnitTestingBitmap32AttributeCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonMonoxideConcentrationMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingBitmap32AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonMonoxideConcentrationMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonMonoxideConcentrationMeasurementEventListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingBitmap32AttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingBitmap32AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingBitmap64AttributeCallbackBridge : public MTRCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitMask value); }; -class MTRCarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRCarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallbackBridge +class MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge : public MTRUnitTestingBitmap64AttributeCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingBitmap64AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingBitmap64AttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingBitmap64AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingListInt8uListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRUnitTestingListInt8uListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingListInt8uListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRCarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRCarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge : public MTRUnitTestingListInt8uListAttributeCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingListInt8uListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingListInt8uListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingListInt8uListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingListOctetStringListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRUnitTestingListOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingListOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRCarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRCarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge + : public MTRUnitTestingListOctetStringListAttributeCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingListOctetStringListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingListOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingListOctetStringListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonDioxideConcentrationMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingListStructOctetStringListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingListStructOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonDioxideConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingListStructOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::DecodableList & + value); }; -class MTRCarbonDioxideConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRCarbonDioxideConcentrationMeasurementEventListListAttributeCallbackBridge +class MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge + : public MTRUnitTestingListStructOctetStringListAttributeCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge( + MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonDioxideConcentrationMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingListStructOctetStringListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonDioxideConcentrationMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonDioxideConcentrationMeasurementEventListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingListStructOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingListStructOctetStringListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> & value); }; -class MTRCarbonDioxideConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRCarbonDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge +class MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge + : public MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingStructAttrStructAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRUnitTestingStructAttrStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingStructAttrStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value); }; -class MTRNitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRNitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge + : public MTRUnitTestingStructAttrStructAttributeCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingStructAttrStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingStructAttrStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingStructAttrStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingListLongOctetStringListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRUnitTestingListLongOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingListLongOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRNitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRNitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge + : public MTRUnitTestingListLongOctetStringListAttributeCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - + MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingListLongOctetStringListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + void OnSubscriptionEstablished(); - using MTRNitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingListLongOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingListLongOctetStringListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNitrogenDioxideConcentrationMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingListFabricScopedListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingListFabricScopedListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNitrogenDioxideConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingListFabricScopedListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::DecodableList & + value); }; -class MTRNitrogenDioxideConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRNitrogenDioxideConcentrationMeasurementEventListListAttributeCallbackBridge +class MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge + : public MTRUnitTestingListFabricScopedListAttributeCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNitrogenDioxideConcentrationMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingListFabricScopedListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNitrogenDioxideConcentrationMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNitrogenDioxideConcentrationMeasurementEventListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingListFabricScopedListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingListFabricScopedListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingNullableBitmap8AttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingNullableBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingNullableBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable> & value); }; -class MTRNitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRNitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge +class MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge : public MTRUnitTestingNullableBitmap8AttributeCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingNullableBitmap8AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingNullableBitmap8AttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingNullableBitmap8AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROzoneConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingNullableBitmap16AttributeCallbackBridge : public MTRCallbackBridge { public: - MTROzoneConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingNullableBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROzoneConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingNullableBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable> & value); }; -class MTROzoneConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTROzoneConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge + : public MTRUnitTestingNullableBitmap16AttributeCallbackBridge { public: - MTROzoneConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROzoneConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingNullableBitmap16AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROzoneConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROzoneConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingNullableBitmap16AttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingNullableBitmap16AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROzoneConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingNullableBitmap32AttributeCallbackBridge : public MTRCallbackBridge { public: - MTROzoneConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingNullableBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROzoneConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingNullableBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable> & value); }; -class MTROzoneConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTROzoneConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge + : public MTRUnitTestingNullableBitmap32AttributeCallbackBridge { public: - MTROzoneConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROzoneConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingNullableBitmap32AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROzoneConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROzoneConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingNullableBitmap32AttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingNullableBitmap32AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROzoneConcentrationMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingNullableBitmap64AttributeCallbackBridge : public MTRCallbackBridge { public: - MTROzoneConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingNullableBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROzoneConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRUnitTestingNullableBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable> & value); }; -class MTROzoneConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTROzoneConcentrationMeasurementEventListListAttributeCallbackBridge +class MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge + : public MTRUnitTestingNullableBitmap64AttributeCallbackBridge { public: - MTROzoneConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROzoneConcentrationMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingNullableBitmap64AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROzoneConcentrationMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROzoneConcentrationMeasurementEventListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingNullableBitmap64AttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingNullableBitmap64AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROzoneConcentrationMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingNullableStructStructAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROzoneConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingNullableStructStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROzoneConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRUnitTestingNullableStructStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); }; -class MTROzoneConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTROzoneConcentrationMeasurementAttributeListListAttributeCallbackBridge +class MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge + : public MTRUnitTestingNullableStructStructAttributeCallbackBridge { public: - MTROzoneConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROzoneConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingNullableStructStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROzoneConcentrationMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTROzoneConcentrationMeasurementAttributeListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingNullableStructStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingNullableStructStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPM25ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPM25ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM25ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge(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 MTRPM25ConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRPM25ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge { public: - MTRPM25ConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM25ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPM25ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM25ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPM25ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPM25ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM25ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge(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 MTRPM25ConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRPM25ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge { public: - MTRPM25ConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM25ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPM25ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM25ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPM25ConcentrationMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPM25ConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM25ConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRUnitTestingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRPM25ConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRPM25ConcentrationMeasurementEventListListAttributeCallbackBridge +class MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge + : public MTRUnitTestingAttributeListListAttributeCallbackBridge { public: - MTRPM25ConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM25ConcentrationMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPM25ConcentrationMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM25ConcentrationMeasurementEventListListAttributeCallbackBridge::OnDone; + using MTRUnitTestingAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPM25ConcentrationMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRGroupsClusterAddGroupResponseCallbackBridge : public MTRCallbackBridge { public: - MTRPM25ConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRGroupsClusterAddGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM25ConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRGroupsClusterAddGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & data); }; -class MTRPM25ConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRPM25ConcentrationMeasurementAttributeListListAttributeCallbackBridge +class MTRGroupsClusterViewGroupResponseCallbackBridge : public MTRCallbackBridge { public: - MTRPM25ConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM25ConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRGroupsClusterViewGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRPM25ConcentrationMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM25ConcentrationMeasurementAttributeListListAttributeCallbackBridge::OnDone; + MTRGroupsClusterViewGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType & data); }; -class MTRFormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRGroupsClusterGetGroupMembershipResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType & data); }; -class MTRFormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRFormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRGroupsClusterRemoveGroupResponseCallbackBridge : public MTRCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRGroupsClusterRemoveGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRFormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + MTRGroupsClusterRemoveGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType & data); }; -class MTRFormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRScenesClusterAddSceneResponseCallbackBridge : public MTRCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRScenesClusterAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRScenesClusterAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType & data); }; -class MTRFormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRFormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRScenesClusterViewSceneResponseCallbackBridge : public MTRCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRScenesClusterViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRFormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + MTRScenesClusterViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & data); }; -class MTRFormaldehydeConcentrationMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRScenesClusterRemoveSceneResponseCallbackBridge : public MTRCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRScenesClusterRemoveSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFormaldehydeConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRScenesClusterRemoveSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & data); }; -class MTRFormaldehydeConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRFormaldehydeConcentrationMeasurementEventListListAttributeCallbackBridge +class MTRScenesClusterRemoveAllScenesResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFormaldehydeConcentrationMeasurementEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRScenesClusterRemoveAllScenesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRFormaldehydeConcentrationMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFormaldehydeConcentrationMeasurementEventListListAttributeCallbackBridge::OnDone; + MTRScenesClusterRemoveAllScenesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType & data); }; -class MTRFormaldehydeConcentrationMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRScenesClusterStoreSceneResponseCallbackBridge : public MTRCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRScenesClusterStoreSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFormaldehydeConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRScenesClusterStoreSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType & data); }; -class MTRFormaldehydeConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRFormaldehydeConcentrationMeasurementAttributeListListAttributeCallbackBridge +class MTRScenesClusterGetSceneMembershipResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFormaldehydeConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRScenesClusterGetSceneMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRFormaldehydeConcentrationMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFormaldehydeConcentrationMeasurementAttributeListListAttributeCallbackBridge::OnDone; + MTRScenesClusterGetSceneMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & data); }; -class MTRPM1ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRScenesClusterEnhancedAddSceneResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM1ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM1ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType & data); }; -class MTRPM1ConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRPM1ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRScenesClusterEnhancedViewSceneResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM1ConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM1ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRPM1ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM1ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType & data); }; -class MTRPM1ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRScenesClusterCopySceneResponseCallbackBridge : public MTRCallbackBridge { public: - MTRPM1ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRScenesClusterCopySceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM1ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRScenesClusterCopySceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType & data); }; -class MTRPM1ConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRPM1ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM1ConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM1ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRPM1ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM1ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void + OnSuccessFn(void * context, + const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & data); }; -class MTRPM1ConcentrationMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM1ConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM1ConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void + OnSuccessFn(void * context, + const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & data); }; -class MTRPM1ConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRPM1ConcentrationMeasurementEventListListAttributeCallbackBridge +class MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM1ConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM1ConcentrationMeasurementEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRPM1ConcentrationMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM1ConcentrationMeasurementEventListListAttributeCallbackBridge::OnDone; + MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data); }; -class MTRPM1ConcentrationMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM1ConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM1ConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void + OnSuccessFn(void * context, + const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & data); }; -class MTRPM1ConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRPM1ConcentrationMeasurementAttributeListListAttributeCallbackBridge +class MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM1ConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM1ConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRPM1ConcentrationMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM1ConcentrationMeasurementAttributeListListAttributeCallbackBridge::OnDone; + MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void + OnSuccessFn(void * context, + const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & data); }; -class MTRPM10ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM10ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM10ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & data); }; -class MTRPM10ConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRPM10ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM10ConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM10ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRPM10ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM10ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data); }; -class MTRPM10ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM10ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM10ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void + OnSuccessFn(void * context, + const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & data); }; -class MTRPM10ConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRPM10ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM10ConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM10ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRPM10ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM10ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & data); }; -class MTRPM10ConcentrationMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROperationalCredentialsClusterAttestationResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM10ConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROperationalCredentialsClusterAttestationResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM10ConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROperationalCredentialsClusterAttestationResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & data); }; -class MTRPM10ConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRPM10ConcentrationMeasurementEventListListAttributeCallbackBridge +class MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM10ConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM10ConcentrationMeasurementEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRPM10ConcentrationMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM10ConcentrationMeasurementEventListListAttributeCallbackBridge::OnDone; + MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void + OnSuccessFn(void * context, + const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType & data); }; -class MTRPM10ConcentrationMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROperationalCredentialsClusterCSRResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM10ConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROperationalCredentialsClusterCSRResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM10ConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROperationalCredentialsClusterCSRResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType & data); }; -class MTRPM10ConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRPM10ConcentrationMeasurementAttributeListListAttributeCallbackBridge +class MTROperationalCredentialsClusterNOCResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRPM10ConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM10ConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTROperationalCredentialsClusterNOCResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRPM10ConcentrationMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM10ConcentrationMeasurementAttributeListListAttributeCallbackBridge::OnDone; + MTROperationalCredentialsClusterNOCResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType & data); }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge( - dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge( - queue, handler, OnSuccessFn){}; + MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & data); }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, - action), - mEstablishedHandler(establishedHandler) - {} + MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge:: - KeepAliveOnCallback; - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void + OnSuccessFn(void * context, + const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & data); }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge( - dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge( - queue, handler, OnSuccessFn){}; + MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType & data); }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, - action), - mEstablishedHandler(establishedHandler) - {} + MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge:: - KeepAliveOnCallback; - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType & data); }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & data); }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRTotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallbackBridge +class MTRDoorLockClusterGetUserResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRDoorLockClusterGetUserResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallbackBridge::OnDone; + MTRDoorLockClusterGetUserResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType & data); }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterSetCredentialResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRDoorLockClusterSetCredentialResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterSetCredentialResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType & data); }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackBridge +class MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackBridge::OnDone; + MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & data); }; -class MTRRadonConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRRadonConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRadonConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & data); }; -class MTRRadonConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRRadonConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge +class MTRChannelClusterChangeChannelResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRRadonConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRadonConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRChannelClusterChangeChannelResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRRadonConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRadonConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; + MTRChannelClusterChangeChannelResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & data); }; -class MTRRadonConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRRadonConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRadonConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & data); }; -class MTRRadonConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRRadonConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRMediaPlaybackClusterPlaybackResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRRadonConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRadonConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRRadonConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRadonConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType & data); }; -class MTRRadonConcentrationMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRKeypadInputClusterSendKeyResponseCallbackBridge : public MTRCallbackBridge { public: - MTRRadonConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRKeypadInputClusterSendKeyResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRadonConcentrationMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRKeypadInputClusterSendKeyResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType & data); }; -class MTRRadonConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRRadonConcentrationMeasurementEventListListAttributeCallbackBridge +class MTRContentLauncherClusterLauncherResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRRadonConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRadonConcentrationMeasurementEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRContentLauncherClusterLauncherResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRRadonConcentrationMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRadonConcentrationMeasurementEventListListAttributeCallbackBridge::OnDone; + MTRContentLauncherClusterLauncherResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType & data); }; -class MTRRadonConcentrationMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRApplicationLauncherClusterLauncherResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRRadonConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRApplicationLauncherClusterLauncherResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRadonConcentrationMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRApplicationLauncherClusterLauncherResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType & data); }; -class MTRRadonConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRRadonConcentrationMeasurementAttributeListListAttributeCallbackBridge +class MTRAccountLoginClusterGetSetupPINResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRRadonConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRadonConcentrationMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRRadonConcentrationMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRadonConcentrationMeasurementAttributeListListAttributeCallbackBridge::OnDone; + MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & data); }; -class MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingClusterTestSpecificResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge(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 MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge(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 MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRWakeOnLANEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRWakeOnLANEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRWakeOnLANEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRWakeOnLANEventListListAttributeCallbackSubscriptionBridge : public MTRWakeOnLANEventListListAttributeCallbackBridge -{ -public: - MTRWakeOnLANEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWakeOnLANEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRWakeOnLANEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWakeOnLANEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRWakeOnLANAttributeListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRWakeOnLANAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRWakeOnLANAttributeListListAttributeCallbackBridge(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 MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge : public MTRWakeOnLANAttributeListListAttributeCallbackBridge -{ -public: - MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWakeOnLANAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRWakeOnLANAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWakeOnLANAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRChannelChannelListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRChannelChannelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRChannelChannelListListAttributeCallbackBridge(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 MTRChannelChannelListListAttributeCallbackSubscriptionBridge : public MTRChannelChannelListListAttributeCallbackBridge -{ -public: - MTRChannelChannelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelChannelListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRChannelChannelListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRChannelChannelListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRChannelLineupStructAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRChannelLineupStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRChannelLineupStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRChannelLineupStructAttributeCallbackSubscriptionBridge : public MTRChannelLineupStructAttributeCallbackBridge -{ -public: - MTRChannelLineupStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelLineupStructAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRChannelLineupStructAttributeCallbackBridge::KeepAliveOnCallback; - using MTRChannelLineupStructAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRChannelCurrentChannelStructAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRChannelCurrentChannelStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRChannelCurrentChannelStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge - : public MTRChannelCurrentChannelStructAttributeCallbackBridge -{ -public: - MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelCurrentChannelStructAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRChannelCurrentChannelStructAttributeCallbackBridge::KeepAliveOnCallback; - using MTRChannelCurrentChannelStructAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRChannelGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRChannelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRChannelGeneratedCommandListListAttributeCallbackBridge(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 MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRChannelGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRChannelGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRChannelGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRChannelAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRChannelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRChannelAcceptedCommandListListAttributeCallbackBridge(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 MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRChannelAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRChannelAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRChannelAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRChannelEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRChannelEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRChannelEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRChannelEventListListAttributeCallbackSubscriptionBridge : public MTRChannelEventListListAttributeCallbackBridge -{ -public: - MTRChannelEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRChannelEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRChannelEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRChannelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRChannelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRChannelAttributeListListAttributeCallbackBridge(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 MTRChannelAttributeListListAttributeCallbackSubscriptionBridge : public MTRChannelAttributeListListAttributeCallbackBridge -{ -public: - MTRChannelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRChannelAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRChannelAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRTargetNavigatorTargetListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRTargetNavigatorTargetListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRTargetNavigatorTargetListListAttributeCallbackBridge(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 MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge - : public MTRTargetNavigatorTargetListListAttributeCallbackBridge -{ -public: - MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTargetNavigatorTargetListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRTargetNavigatorTargetListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTargetNavigatorTargetListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(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 MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(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 MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRTargetNavigatorEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRTargetNavigatorEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRTargetNavigatorEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRTargetNavigatorEventListListAttributeCallbackSubscriptionBridge - : public MTRTargetNavigatorEventListListAttributeCallbackBridge -{ -public: - MTRTargetNavigatorEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTargetNavigatorEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRTargetNavigatorEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTargetNavigatorEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRTargetNavigatorAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRTargetNavigatorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRTargetNavigatorAttributeListListAttributeCallbackBridge(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 MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge - : public MTRTargetNavigatorAttributeListListAttributeCallbackBridge -{ -public: - MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTargetNavigatorAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRTargetNavigatorAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTargetNavigatorAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & - value); -}; - -class MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge - : public MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge -{ -public: - MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::KeepAliveOnCallback; - using MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(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 MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(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 MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRMediaPlaybackEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRMediaPlaybackEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRMediaPlaybackEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRMediaPlaybackEventListListAttributeCallbackSubscriptionBridge : public MTRMediaPlaybackEventListListAttributeCallbackBridge -{ -public: - MTRMediaPlaybackEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaPlaybackEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRMediaPlaybackEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRMediaPlaybackEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRMediaPlaybackAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRMediaPlaybackAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRMediaPlaybackAttributeListListAttributeCallbackBridge(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 MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge - : public MTRMediaPlaybackAttributeListListAttributeCallbackBridge -{ -public: - MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaPlaybackAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRMediaPlaybackAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRMediaPlaybackAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRMediaInputInputListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRMediaInputInputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRMediaInputInputListListAttributeCallbackBridge(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 MTRMediaInputInputListListAttributeCallbackSubscriptionBridge : public MTRMediaInputInputListListAttributeCallbackBridge -{ -public: - MTRMediaInputInputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaInputInputListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRMediaInputInputListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRMediaInputInputListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRMediaInputGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(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 MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRMediaInputGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRMediaInputGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRMediaInputGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRMediaInputAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(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 MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRMediaInputAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRMediaInputAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRMediaInputAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRMediaInputEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRMediaInputEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRMediaInputEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRMediaInputEventListListAttributeCallbackSubscriptionBridge : public MTRMediaInputEventListListAttributeCallbackBridge -{ -public: - MTRMediaInputEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaInputEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRMediaInputEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRMediaInputEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRMediaInputAttributeListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRMediaInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRMediaInputAttributeListListAttributeCallbackBridge(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 MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge - : public MTRMediaInputAttributeListListAttributeCallbackBridge -{ -public: - MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaInputAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRMediaInputAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRMediaInputAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRLowPowerGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(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 MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRLowPowerGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRLowPowerGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRLowPowerGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRLowPowerAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(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 MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRLowPowerAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRLowPowerAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRLowPowerAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRLowPowerEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRLowPowerEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRLowPowerEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRLowPowerEventListListAttributeCallbackSubscriptionBridge : public MTRLowPowerEventListListAttributeCallbackBridge -{ -public: - MTRLowPowerEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLowPowerEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRLowPowerEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRLowPowerEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRLowPowerAttributeListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRLowPowerAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRLowPowerAttributeListListAttributeCallbackBridge(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 MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge : public MTRLowPowerAttributeListListAttributeCallbackBridge -{ -public: - MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLowPowerAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRLowPowerAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRLowPowerAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(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 MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(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 MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRKeypadInputEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRKeypadInputEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRKeypadInputEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRKeypadInputEventListListAttributeCallbackSubscriptionBridge : public MTRKeypadInputEventListListAttributeCallbackBridge -{ -public: - MTRKeypadInputEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRKeypadInputEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRKeypadInputEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRKeypadInputEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRKeypadInputAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRKeypadInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRKeypadInputAttributeListListAttributeCallbackBridge(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 MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge - : public MTRKeypadInputAttributeListListAttributeCallbackBridge -{ -public: - MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRKeypadInputAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRKeypadInputAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRKeypadInputAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRContentLauncherAcceptHeaderListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(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 MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge - : public MTRContentLauncherAcceptHeaderListAttributeCallbackBridge -{ -public: - MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRContentLauncherAcceptHeaderListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRContentLauncherAcceptHeaderListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(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 MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(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 MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRContentLauncherEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRContentLauncherEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRContentLauncherEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRContentLauncherEventListListAttributeCallbackSubscriptionBridge - : public MTRContentLauncherEventListListAttributeCallbackBridge -{ -public: - MTRContentLauncherEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRContentLauncherEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRContentLauncherEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRContentLauncherEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRContentLauncherAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRContentLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRContentLauncherAttributeListListAttributeCallbackBridge(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 MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge - : public MTRContentLauncherAttributeListListAttributeCallbackBridge -{ -public: - MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRContentLauncherAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRContentLauncherAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRContentLauncherAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRAudioOutputOutputListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRAudioOutputOutputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAudioOutputOutputListListAttributeCallbackBridge(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 MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge : public MTRAudioOutputOutputListListAttributeCallbackBridge -{ -public: - MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAudioOutputOutputListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAudioOutputOutputListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAudioOutputOutputListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(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 MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(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 MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRAudioOutputEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRAudioOutputEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAudioOutputEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRAudioOutputEventListListAttributeCallbackSubscriptionBridge : public MTRAudioOutputEventListListAttributeCallbackBridge -{ -public: - MTRAudioOutputEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAudioOutputEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAudioOutputEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAudioOutputEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRAudioOutputAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRAudioOutputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAudioOutputAttributeListListAttributeCallbackBridge(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 MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge - : public MTRAudioOutputAttributeListListAttributeCallbackBridge -{ -public: - MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAudioOutputAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAudioOutputAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAudioOutputAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRApplicationLauncherCatalogListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRApplicationLauncherCatalogListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRApplicationLauncherCatalogListListAttributeCallbackBridge(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 MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge - : public MTRApplicationLauncherCatalogListListAttributeCallbackBridge -{ -public: - MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationLauncherCatalogListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRApplicationLauncherCatalogListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRApplicationLauncherCatalogListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable< - chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType> & value); -}; - -class MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge - : public MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge -{ -public: - MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge::KeepAliveOnCallback; - using MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(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 MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(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 MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRApplicationLauncherEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRApplicationLauncherEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRApplicationLauncherEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRApplicationLauncherEventListListAttributeCallbackSubscriptionBridge - : public MTRApplicationLauncherEventListListAttributeCallbackBridge -{ -public: - MTRApplicationLauncherEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationLauncherEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRApplicationLauncherEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRApplicationLauncherEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRApplicationLauncherAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRApplicationLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRApplicationLauncherAttributeListListAttributeCallbackBridge(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 MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge - : public MTRApplicationLauncherAttributeListListAttributeCallbackBridge -{ -public: - MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationLauncherAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRApplicationLauncherAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRApplicationLauncherAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRApplicationBasicApplicationStructAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRApplicationBasicApplicationStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRApplicationBasicApplicationStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType & value); -}; - -class MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge - : public MTRApplicationBasicApplicationStructAttributeCallbackBridge -{ -public: - MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationBasicApplicationStructAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRApplicationBasicApplicationStructAttributeCallbackBridge::KeepAliveOnCallback; - using MTRApplicationBasicApplicationStructAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(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 MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge - : public MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge -{ -public: - MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(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 MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRApplicationBasicEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRApplicationBasicEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRApplicationBasicEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRApplicationBasicEventListListAttributeCallbackSubscriptionBridge - : public MTRApplicationBasicEventListListAttributeCallbackBridge -{ -public: - MTRApplicationBasicEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationBasicEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRApplicationBasicEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRApplicationBasicEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRApplicationBasicAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRApplicationBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRApplicationBasicAttributeListListAttributeCallbackBridge(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 MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge - : public MTRApplicationBasicAttributeListListAttributeCallbackBridge -{ -public: - MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationBasicAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRApplicationBasicAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRApplicationBasicAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(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 MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(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 MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRAccountLoginEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRAccountLoginEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAccountLoginEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRAccountLoginEventListListAttributeCallbackSubscriptionBridge : public MTRAccountLoginEventListListAttributeCallbackBridge -{ -public: - MTRAccountLoginEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccountLoginEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAccountLoginEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAccountLoginEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRAccountLoginAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRAccountLoginAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAccountLoginAttributeListListAttributeCallbackBridge(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 MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge - : public MTRAccountLoginAttributeListListAttributeCallbackBridge -{ -public: - MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccountLoginAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAccountLoginAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAccountLoginAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(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 MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(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 MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRElectricalMeasurementEventListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRElectricalMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRElectricalMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRElectricalMeasurementEventListListAttributeCallbackSubscriptionBridge - : public MTRElectricalMeasurementEventListListAttributeCallbackBridge -{ -public: - MTRElectricalMeasurementEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRElectricalMeasurementEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRElectricalMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRElectricalMeasurementEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRElectricalMeasurementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(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 MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRElectricalMeasurementAttributeListListAttributeCallbackBridge -{ -public: - MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRElectricalMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRElectricalMeasurementAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingBitmap8AttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRUnitTestingBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::BitMask value); -}; - -class MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge : public MTRUnitTestingBitmap8AttributeCallbackBridge -{ -public: - MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingBitmap8AttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingBitmap8AttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingBitmap8AttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingBitmap16AttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRUnitTestingBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::BitMask value); -}; - -class MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge : public MTRUnitTestingBitmap16AttributeCallbackBridge -{ -public: - MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingBitmap16AttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingBitmap16AttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingBitmap16AttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingBitmap32AttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRUnitTestingBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::BitMask value); -}; - -class MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge : public MTRUnitTestingBitmap32AttributeCallbackBridge -{ -public: - MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingBitmap32AttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingBitmap32AttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingBitmap32AttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingBitmap64AttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRUnitTestingBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::BitMask value); -}; - -class MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge : public MTRUnitTestingBitmap64AttributeCallbackBridge -{ -public: - MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingBitmap64AttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingBitmap64AttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingBitmap64AttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingListInt8uListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRUnitTestingListInt8uListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingListInt8uListAttributeCallbackBridge(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 MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge : public MTRUnitTestingListInt8uListAttributeCallbackBridge -{ -public: - MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingListInt8uListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingListInt8uListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingListInt8uListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingListOctetStringListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingListOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingListOctetStringListAttributeCallbackBridge(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 MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge - : public MTRUnitTestingListOctetStringListAttributeCallbackBridge -{ -public: - MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingListOctetStringListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingListOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingListOctetStringListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingListStructOctetStringListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingListStructOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingListStructOctetStringListAttributeCallbackBridge(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 MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge - : public MTRUnitTestingListStructOctetStringListAttributeCallbackBridge -{ -public: - MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingListStructOctetStringListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingListStructOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingListStructOctetStringListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> & value); -}; - -class MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge - : public MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge -{ -public: - MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingStructAttrStructAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRUnitTestingStructAttrStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingStructAttrStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value); -}; - -class MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge - : public MTRUnitTestingStructAttrStructAttributeCallbackBridge -{ -public: - MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingStructAttrStructAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingStructAttrStructAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingStructAttrStructAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingListLongOctetStringListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingListLongOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingListLongOctetStringListAttributeCallbackBridge(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 MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge - : public MTRUnitTestingListLongOctetStringListAttributeCallbackBridge -{ -public: - MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingListLongOctetStringListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingListLongOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingListLongOctetStringListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingListFabricScopedListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingListFabricScopedListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingListFabricScopedListAttributeCallbackBridge(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 MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge - : public MTRUnitTestingListFabricScopedListAttributeCallbackBridge -{ -public: - MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingListFabricScopedListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingListFabricScopedListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingListFabricScopedListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingNullableBitmap8AttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRUnitTestingNullableBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingNullableBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable> & value); -}; - -class MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge : public MTRUnitTestingNullableBitmap8AttributeCallbackBridge -{ -public: - MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingNullableBitmap8AttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingNullableBitmap8AttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingNullableBitmap8AttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingNullableBitmap16AttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRUnitTestingNullableBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingNullableBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable> & value); -}; - -class MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge - : public MTRUnitTestingNullableBitmap16AttributeCallbackBridge -{ -public: - MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingNullableBitmap16AttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingNullableBitmap16AttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingNullableBitmap16AttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingNullableBitmap32AttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRUnitTestingNullableBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingNullableBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable> & value); -}; - -class MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge - : public MTRUnitTestingNullableBitmap32AttributeCallbackBridge -{ -public: - MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingNullableBitmap32AttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingNullableBitmap32AttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingNullableBitmap32AttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingNullableBitmap64AttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRUnitTestingNullableBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingNullableBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable> & value); -}; - -class MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge - : public MTRUnitTestingNullableBitmap64AttributeCallbackBridge -{ -public: - MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingNullableBitmap64AttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingNullableBitmap64AttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingNullableBitmap64AttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingNullableStructStructAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingNullableStructStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingNullableStructStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge - : public MTRUnitTestingNullableStructStructAttributeCallbackBridge -{ -public: - MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingNullableStructStructAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingNullableStructStructAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingNullableStructStructAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge(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 MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge(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 MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRUnitTestingEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRUnitTestingEventListListAttributeCallbackSubscriptionBridge : public MTRUnitTestingEventListListAttributeCallbackBridge -{ -public: - MTRUnitTestingEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitTestingAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingAttributeListListAttributeCallbackBridge(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 MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge - : public MTRUnitTestingAttributeListListAttributeCallbackBridge -{ -public: - MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitTestingAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitTestingAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitTestingAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRFaultInjectionEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRFaultInjectionEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRFaultInjectionEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class MTRFaultInjectionEventListListAttributeCallbackSubscriptionBridge - : public MTRFaultInjectionEventListListAttributeCallbackBridge -{ -public: - MTRFaultInjectionEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFaultInjectionEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRFaultInjectionEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFaultInjectionEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRGroupsClusterAddGroupResponseCallbackBridge : public MTRCallbackBridge -{ -public: - MTRGroupsClusterAddGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGroupsClusterAddGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & data); -}; - -class MTRGroupsClusterViewGroupResponseCallbackBridge : public MTRCallbackBridge -{ -public: - MTRGroupsClusterViewGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGroupsClusterViewGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType & data); -}; - -class MTRGroupsClusterGetGroupMembershipResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType & data); -}; - -class MTRGroupsClusterRemoveGroupResponseCallbackBridge : public MTRCallbackBridge -{ -public: - MTRGroupsClusterRemoveGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGroupsClusterRemoveGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType & data); -}; - -class MTRScenesClusterAddSceneResponseCallbackBridge : public MTRCallbackBridge -{ -public: - MTRScenesClusterAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRScenesClusterAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType & data); -}; - -class MTRScenesClusterViewSceneResponseCallbackBridge : public MTRCallbackBridge -{ -public: - MTRScenesClusterViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRScenesClusterViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & data); -}; - -class MTRScenesClusterRemoveSceneResponseCallbackBridge : public MTRCallbackBridge -{ -public: - MTRScenesClusterRemoveSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRScenesClusterRemoveSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & data); -}; - -class MTRScenesClusterRemoveAllScenesResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRScenesClusterRemoveAllScenesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRScenesClusterRemoveAllScenesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType & data); -}; - -class MTRScenesClusterStoreSceneResponseCallbackBridge : public MTRCallbackBridge -{ -public: - MTRScenesClusterStoreSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRScenesClusterStoreSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType & data); -}; - -class MTRScenesClusterGetSceneMembershipResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRScenesClusterGetSceneMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRScenesClusterGetSceneMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & data); -}; - -class MTRScenesClusterEnhancedAddSceneResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType & data); -}; - -class MTRScenesClusterEnhancedViewSceneResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType & data); -}; - -class MTRScenesClusterCopySceneResponseCallbackBridge : public MTRCallbackBridge -{ -public: - MTRScenesClusterCopySceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRScenesClusterCopySceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType & data); -}; - -class MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & data); -}; - -class MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & data); -}; - -class MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data); -}; - -class MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & data); -}; - -class MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & data); -}; - -class MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & data); -}; - -class MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data); -}; - -class MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & data); -}; - -class MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & data); -}; - -class MTROperationalCredentialsClusterAttestationResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROperationalCredentialsClusterAttestationResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROperationalCredentialsClusterAttestationResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & data); -}; - -class MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType & data); -}; - -class MTROperationalCredentialsClusterCSRResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROperationalCredentialsClusterCSRResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROperationalCredentialsClusterCSRResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType & data); -}; - -class MTROperationalCredentialsClusterNOCResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROperationalCredentialsClusterNOCResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROperationalCredentialsClusterNOCResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType & data); -}; - -class MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & data); -}; - -class MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & data); -}; - -class MTROperationalStateClusterOperationalCommandResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROperationalStateClusterOperationalCommandResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROperationalStateClusterOperationalCommandResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType & data); -}; - -class MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType & data); -}; - -class MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType & data); -}; - -class MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & data); -}; - -class MTRDoorLockClusterGetUserResponseCallbackBridge : public MTRCallbackBridge -{ -public: - MTRDoorLockClusterGetUserResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRDoorLockClusterGetUserResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType & data); -}; - -class MTRDoorLockClusterSetCredentialResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRDoorLockClusterSetCredentialResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRDoorLockClusterSetCredentialResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType & data); -}; - -class MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & data); -}; - -class MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & data); -}; - -class MTRChannelClusterChangeChannelResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRChannelClusterChangeChannelResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRChannelClusterChangeChannelResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & data); -}; - -class MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & data); -}; - -class MTRMediaPlaybackClusterPlaybackResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType & data); -}; - -class MTRKeypadInputClusterSendKeyResponseCallbackBridge : public MTRCallbackBridge -{ -public: - MTRKeypadInputClusterSendKeyResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRKeypadInputClusterSendKeyResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType & data); -}; - -class MTRContentLauncherClusterLauncherResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRContentLauncherClusterLauncherResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRContentLauncherClusterLauncherResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType & data); -}; - -class MTRApplicationLauncherClusterLauncherResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRApplicationLauncherClusterLauncherResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRApplicationLauncherClusterLauncherResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType & data); -}; - -class MTRAccountLoginClusterGetSetupPINResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & data); -}; - -class MTRUnitTestingClusterTestSpecificResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & data); -}; - -class MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & data); -}; - -class MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & data); -}; - -class MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & data); -}; - -class MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & data); -}; - -class MTRUnitTestingClusterTestEnumsResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType & data); -}; - -class MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & data); -}; - -class MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & data); -}; - -class MTRUnitTestingClusterBooleanResponseCallbackBridge : public MTRCallbackBridge -{ -public: - MTRUnitTestingClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType & data); -}; - -class MTRUnitTestingClusterSimpleStructResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType & data); -}; - -class MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & data); -}; - -class MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & data); -}; - -class MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::Identify::EffectIdentifierEnum value); -}; - -class MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge - : public MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge -{ -public: - MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge - : public MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge -{ -public: - MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::Identify::EffectVariantEnum value); -}; - -class MTRIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge - : public MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge -{ -public: - MTRIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge - : public MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge -{ -public: - MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::Identify::IdentifyTypeEnum value); -}; - -class MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge - : public MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge -{ -public: - MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge -{ -public: - MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::OnOff::OnOffDelayedAllOffEffectVariant value); -}; - -class MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge - : public MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge -{ -public: - MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; - using MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge - : public MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge -{ -public: - MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::OnOff::OnOffDyingLightEffectVariant value); -}; - -class MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge - : public MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge -{ -public: - MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; - using MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge - : public MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge -{ -public: - MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::OnOff::OnOffEffectIdentifier value); -}; - -class MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge - : public MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge -{ -public: - MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; - using MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge - : public MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge -{ -public: - MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::OnOff::OnOffStartUpOnOff value); -}; - -class MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge - : public MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge -{ -public: - MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::KeepAliveOnCallback; - using MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge - : public MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge -{ -public: - MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRLevelControlClusterMoveModeAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::LevelControl::MoveMode value); -}; - -class MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge - : public MTRLevelControlClusterMoveModeAttributeCallbackBridge -{ -public: - MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLevelControlClusterMoveModeAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRLevelControlClusterMoveModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRLevelControlClusterMoveModeAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge - : public MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge -{ -public: - MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRLevelControlClusterStepModeAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::LevelControl::StepMode value); -}; - -class MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge - : public MTRLevelControlClusterStepModeAttributeCallbackBridge -{ -public: - MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLevelControlClusterStepModeAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRLevelControlClusterStepModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRLevelControlClusterStepModeAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableLevelControlClusterStepModeAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge - : public MTRNullableLevelControlClusterStepModeAttributeCallbackBridge -{ -public: - MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableLevelControlClusterStepModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableLevelControlClusterStepModeAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::AccessControlEntryAuthModeEnum value); -}; - -class MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge - : public MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge -{ -public: - MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; - - MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge -{ -public: - MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::AccessControlEntryPrivilegeEnum value); -}; - -class MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge - : public MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge -{ -public: - MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; - - MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge -{ -public: - MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::ChangeTypeEnum value); -}; - -class MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge - : public MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge -{ -public: - MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge -{ -public: - MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRActionsClusterActionErrorEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::Actions::ActionErrorEnum value); -}; - -class MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge - : public MTRActionsClusterActionErrorEnumAttributeCallbackBridge -{ -public: - MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsClusterActionErrorEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRActionsClusterActionErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRActionsClusterActionErrorEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge - : public MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge -{ -public: - MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRActionsClusterActionStateEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::Actions::ActionStateEnum value); -}; - -class MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge - : public MTRActionsClusterActionStateEnumAttributeCallbackBridge -{ -public: - MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsClusterActionStateEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRActionsClusterActionStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRActionsClusterActionStateEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge - : public MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge -{ -public: - MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRActionsClusterActionTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::Actions::ActionTypeEnum value); -}; - -class MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge - : public MTRActionsClusterActionTypeEnumAttributeCallbackBridge -{ -public: - MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsClusterActionTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRActionsClusterActionTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRActionsClusterActionTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge -{ -public: - MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::Actions::EndpointListTypeEnum value); -}; - -class MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge - : public MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge -{ -public: - MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge -{ -public: - MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRBasicInformationClusterColorEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::BasicInformation::ColorEnum value); -}; - -class MTRBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge - : public MTRBasicInformationClusterColorEnumAttributeCallbackBridge -{ -public: - MTRBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBasicInformationClusterColorEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRBasicInformationClusterColorEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBasicInformationClusterColorEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge - : public MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge -{ -public: - MTRNullableBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::BasicInformation::ProductFinishEnum value); -}; - -class MTRBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge - : public MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge -{ -public: - MTRBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge - : public MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge -{ -public: - MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAApplyUpdateAction value); -}; - -class MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge -{ -public: - MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::KeepAliveOnCallback; - using MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; - - MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge - : public MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge -{ -public: - MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTADownloadProtocol value); -}; - -class MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge -{ -public: - MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::KeepAliveOnCallback; - using MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; - - MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge - : public MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge -{ -public: - MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAQueryStatus value); -}; - -class MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge -{ -public: - MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge - : public MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge -{ -public: - MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAAnnouncementReason value); -}; - -class MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge -{ -public: - MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::KeepAliveOnCallback; - using MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; - - MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge - : public MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge -{ -public: - MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum value); -}; - -class MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge -{ -public: - MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; - - MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge - : public MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge -{ -public: - MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum value); -}; - -class MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge - : public MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge -{ -public: - MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; - - MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge - : public MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge -{ -public: - MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value); -}; - -class MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackSubscriptionBridge - : public MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge -{ -public: - MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge -{ -public: - MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value); -}; - -class MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackSubscriptionBridge - : public MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge -{ -public: - MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackSubscriptionBridge - : public MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge -{ -public: - MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::UnitLocalization::TempUnitEnum value); -}; - -class MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge - : public MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge -{ -public: - MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge - : public MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge -{ -public: - MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value); -}; - -class MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge -{ -public: - MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeFaultEnum value); -}; - -class MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge -{ -public: - MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeLevelEnum value); -}; - -class MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge -{ -public: - MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeStateEnum value); -}; - -class MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge -{ -public: - MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value); -}; - -class MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge -{ -public: - MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatFaultEnum value); -}; - -class MTRPowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge -{ -public: - MTRPowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value); -}; - -class MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge -{ -public: - MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge -{ -public: - MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value); -}; - -class MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge -{ -public: - MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge -{ -public: - MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value); -}; - -class MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge -{ -public: - MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge -{ -public: - MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::WiredFaultEnum value); -}; - -class MTRPowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge -{ -public: - MTRPowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge -{ -public: - MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::GeneralCommissioning::CommissioningErrorEnum value); -}; - -class MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackSubscriptionBridge - : public MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge -{ -public: - MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; - - MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackSubscriptionBridge - : public MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge -{ -public: - MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum value); -}; - -class MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackSubscriptionBridge - : public MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge -{ -public: - MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; - - MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge -{ -public: - MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; - - MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatusEnum value); -}; - -class MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackSubscriptionBridge - : public MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge -{ -public: - MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; - - MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackSubscriptionBridge - : public MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge -{ -public: - MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::NetworkCommissioning::WiFiBandEnum value); -}; - -class MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackSubscriptionBridge - : public MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge -{ -public: - MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRUnitTestingClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackSubscriptionBridge - : public MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge -{ -public: - MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::DiagnosticLogs::IntentEnum value); -}; - -class MTRDiagnosticLogsClusterIntentEnumAttributeCallbackSubscriptionBridge - : public MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge -{ -public: - MTRDiagnosticLogsClusterIntentEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & data); }; -class MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge -{ -public: - MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::DiagnosticLogs::StatusEnum value); -}; - -class MTRDiagnosticLogsClusterStatusEnumAttributeCallbackSubscriptionBridge - : public MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge -{ -public: - MTRDiagnosticLogsClusterStatusEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & data); }; -class MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & data); }; -class MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge +class MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge::OnDone; + MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void + OnSuccessFn(void * context, + const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & data); }; -class MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DiagnosticLogs::TransferProtocolEnum value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & data); }; -class MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackSubscriptionBridge - : public MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge +class MTRUnitTestingClusterTestEnumsResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRUnitTestingClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge::OnDone; + MTRUnitTestingClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType & data); }; -class MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & data); }; -class MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge +class MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge::OnDone; + MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void + OnSuccessFn(void * context, + const chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & data); }; -class MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingClusterBooleanResponseCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRUnitTestingClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::BootReasonEnum value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType & data); }; -class MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackSubscriptionBridge - : public MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge +class MTRUnitTestingClusterSimpleStructResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRUnitTestingClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge::OnDone; + MTRUnitTestingClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void OnSuccessFn(void * context, + const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType & data); }; -class MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & data); }; -class MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackSubscriptionBridge - : public MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge +class MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} + MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - void OnSubscriptionEstablished(); - using MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge::OnDone; + MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; + static void + OnSuccessFn(void * context, + const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & data); }; -class MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::HardwareFaultEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::Identify::EffectIdentifierEnum value); }; -class MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackSubscriptionBridge - : public MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge +class MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge + : public MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge { public: - MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackSubscriptionBridge( + MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge(queue, handler, action), + MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge::OnDone; + using MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackSubscriptionBridge - : public MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge +class MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge + : public MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackSubscriptionBridge( + MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge::OnDone; + using MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::InterfaceTypeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::Identify::EffectVariantEnum value); }; -class MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackSubscriptionBridge - : public MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge +class MTRIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge + : public MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge { public: - MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge::OnDone; + using MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge +class MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge + : public MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackSubscriptionBridge( + MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge::OnDone; + using MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::NetworkFaultEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::Identify::IdentifyTypeEnum value); }; -class MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge - : public MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge +class MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge + : public MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge { public: - MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(queue, handler, action), + MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnDone; + using MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge - : public MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge +class MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge( + MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnDone; + using MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::RadioFaultEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::OnOff::OnOffDelayedAllOffEffectVariant value); }; -class MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackSubscriptionBridge - : public MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge +class MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge + : public MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge { public: - MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackSubscriptionBridge( + MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge(queue, handler, action), + MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge::OnDone; + using MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackSubscriptionBridge - : public MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge +class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge + : public MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackSubscriptionBridge( + MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge::OnDone; + using MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::ThreadNetworkDiagnostics::ConnectionStatusEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::OnOff::OnOffDyingLightEffectVariant value); }; -class MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge - : public MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge +class MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge + : public MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge { public: - MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge( + MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(queue, handler, action), + MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnDone; + using MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge - : public MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge +class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge + : public MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge { public: - MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge( + MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnDone; + using MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::ThreadNetworkDiagnostics::NetworkFaultEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::OnOff::OnOffEffectIdentifier value); }; -class MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge - : public MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge +class MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge + : public MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge { public: - MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(queue, handler, action), + MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnDone; + using MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge - : public MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge +class MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge + : public MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge { public: - MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge( + MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnDone; + using MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::ThreadNetworkDiagnostics::RoutingRoleEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::OnOff::OnOffStartUpOnOff value); }; -class MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackSubscriptionBridge - : public MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge +class MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge + : public MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge { public: - MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge(queue, handler, action), + MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge::OnDone; + using MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackSubscriptionBridge - : public MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge +class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge + : public MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge { public: - MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackSubscriptionBridge( + MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge::OnDone; + using MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRLevelControlClusterMoveModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::LevelControl::MoveMode value); }; -class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge - : public MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge +class MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge + : public MTRLevelControlClusterMoveModeAttributeCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(queue, handler, action), + MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLevelControlClusterMoveModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::OnDone; + using MTRLevelControlClusterMoveModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLevelControlClusterMoveModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge - : public MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge +class MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge + : public MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge( + MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::OnDone; + using MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRLevelControlClusterStepModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::LevelControl::StepMode value); }; -class MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge - : public MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge +class MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge + : public MTRLevelControlClusterStepModeAttributeCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(queue, handler, action), + MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLevelControlClusterStepModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnDone; + using MTRLevelControlClusterStepModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLevelControlClusterStepModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableLevelControlClusterStepModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge - : public MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge +class MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge + : public MTRNullableLevelControlClusterStepModeAttributeCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge( + MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnDone; + using MTRNullableLevelControlClusterStepModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableLevelControlClusterStepModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::AccessControlEntryAuthModeEnum value); }; -class MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge - : public MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge +class MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge + : public MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge( + MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::OnDone; + using MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge +class MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge( + MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::OnDone; + using MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::AccessControlEntryPrivilegeEnum value); }; -class MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge - : public MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge +class MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge + : public MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge( + MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(queue, handler, action), + MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::OnDone; + using MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge - : public MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge +class MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge( + MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::OnDone; + using MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::ChangeTypeEnum value); }; -class MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackSubscriptionBridge - : public MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge +class MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge + : public MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge { public: - MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge(queue, handler, action), + MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge::OnDone; + using MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackSubscriptionBridge - : public MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge +class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge { public: - MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackSubscriptionBridge( + MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge::OnDone; + using MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRActionsClusterActionErrorEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::TimeSynchronization::GranularityEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::Actions::ActionErrorEnum value); }; -class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge - : public MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge +class MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge + : public MTRActionsClusterActionErrorEnumAttributeCallbackBridge { public: - MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, handler, action), + MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionsClusterActionErrorEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnDone; + using MTRActionsClusterActionErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsClusterActionErrorEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge - : public MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge +class MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge + : public MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge { public: - MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( + MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnDone; + using MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRActionsClusterActionStateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::Actions::ActionStateEnum value); }; -class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge - : public MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge +class MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge + : public MTRActionsClusterActionStateEnumAttributeCallbackBridge { public: - MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, handler, action), + MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionsClusterActionStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnDone; + using MTRActionsClusterActionStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsClusterActionStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge - : public MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge +class MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge + : public MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge { public: - MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( + MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnDone; + using MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRActionsClusterActionTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::BridgedDeviceBasicInformation::ColorEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::Actions::ActionTypeEnum value); }; -class MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge - : public MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge +class MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge + : public MTRActionsClusterActionTypeEnumAttributeCallbackBridge { public: - MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(queue, handler, action), + MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionsClusterActionTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::OnDone; + using MTRActionsClusterActionTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsClusterActionTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge - : public MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge +class MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge { public: - MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge( + MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::OnDone; + using MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::BridgedDeviceBasicInformation::ProductFinishEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::Actions::EndpointListTypeEnum value); }; -class MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge - : public MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge +class MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge + : public MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge { public: - MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(queue, handler, action), + MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnDone; + using MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge - : public MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge +class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge { public: - MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge( + MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnDone; + using MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRBasicInformationClusterColorEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::BasicInformation::ColorEnum value); }; -class MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackSubscriptionBridge - : public MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge +class MTRBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge + : public MTRBasicInformationClusterColorEnumAttributeCallbackBridge { public: - MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(queue, handler, action), + MTRBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBasicInformationClusterColorEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge::OnDone; + using MTRBasicInformationClusterColorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBasicInformationClusterColorEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & - value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackSubscriptionBridge - : public MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge +class MTRNullableBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge + : public MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge { public: - MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackSubscriptionBridge( + MTRNullableBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge::OnDone; + using MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::AdministratorCommissioning::StatusCode value); + static void OnSuccessFn(void * context, chip::app::Clusters::BasicInformation::ProductFinishEnum value); }; -class MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge - : public MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge +class MTRBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge + : public MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge { public: - MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( + MTRBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, handler, action), + MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::OnDone; + using MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge - : public MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge +class MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge + : public MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge { public: - MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( + MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, handler, action), + MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::OnDone; + using MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::OperationalCredentials::CertificateChainTypeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAApplyUpdateAction value); }; -class MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge - : public MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge +class MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge + : public MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge { public: - MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge( + MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(queue, handler, action), + MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::OnDone; + using MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::KeepAliveOnCallback; + using MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge +class MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge + : public MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge { public: - MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge( + MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::OnDone; + using MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::OperationalCredentials::NodeOperationalCertStatusEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTADownloadProtocol value); }; -class MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge - : public MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge +class MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge + : public MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge { public: - MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge( + MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(queue, handler, action), + MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::OnDone; + using MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::KeepAliveOnCallback; + using MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge - : public MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge +class MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge + : public MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge { public: - MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge( + MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::OnDone; + using MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicyEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAQueryStatus value); }; -class MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackSubscriptionBridge - : public MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge +class MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge + : public MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge { public: - MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackSubscriptionBridge( + MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge(queue, handler, action), + MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge::OnDone; + using MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackSubscriptionBridge - : public MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge +class MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge + : public MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge { public: - MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackSubscriptionBridge( + MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge::OnDone; + using MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRAirQualityClusterAirQualityEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRAirQualityClusterAirQualityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAirQualityClusterAirQualityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::AirQuality::AirQualityEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAAnnouncementReason value); }; -class MTRAirQualityClusterAirQualityEnumAttributeCallbackSubscriptionBridge - : public MTRAirQualityClusterAirQualityEnumAttributeCallbackBridge +class MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge + : public MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge { public: - MTRAirQualityClusterAirQualityEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAirQualityClusterAirQualityEnumAttributeCallbackBridge(queue, handler, action), + MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRAirQualityClusterAirQualityEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRAirQualityClusterAirQualityEnumAttributeCallbackBridge::OnDone; + using MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::KeepAliveOnCallback; + using MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableAirQualityClusterAirQualityEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableAirQualityClusterAirQualityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableAirQualityClusterAirQualityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableAirQualityClusterAirQualityEnumAttributeCallbackSubscriptionBridge - : public MTRNullableAirQualityClusterAirQualityEnumAttributeCallbackBridge +class MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge + : public MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge { public: - MTRNullableAirQualityClusterAirQualityEnumAttributeCallbackSubscriptionBridge( + MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAirQualityClusterAirQualityEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableAirQualityClusterAirQualityEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableAirQualityClusterAirQualityEnumAttributeCallbackBridge::OnDone; + using MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum value); }; -class MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackSubscriptionBridge - : public MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge +class MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge + : public MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge { public: - MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge(queue, handler, action), + MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge::OnDone; + using MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackSubscriptionBridge - : public MTRNullableSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge +class MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge + : public MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge { public: - MTRNullableSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackSubscriptionBridge( + MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge::OnDone; + using MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum value); }; -class MTRSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackSubscriptionBridge - : public MTRSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge +class MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge + : public MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge { public: - MTRSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackSubscriptionBridge( + MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge(queue, handler, action), + MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge::OnDone; + using MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackSubscriptionBridge - : public MTRNullableSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge +class MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge + : public MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge { public: - MTRNullableSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackSubscriptionBridge( + MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge::OnDone; + using MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value); }; -class MTRSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackSubscriptionBridge - : public MTRSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge +class MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackSubscriptionBridge + : public MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge { public: - MTRSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackSubscriptionBridge( + MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge(queue, handler, action), + MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge::OnDone; + using MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackSubscriptionBridge - : public MTRNullableSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge +class MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge { public: - MTRNullableSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackSubscriptionBridge( + MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge::OnDone; + using MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value); }; -class MTRSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackSubscriptionBridge - : public MTRSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge +class MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackSubscriptionBridge + : public MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge { public: - MTRSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackSubscriptionBridge( + MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge(queue, handler, action), + MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge::OnDone; + using MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackSubscriptionBridge - : public MTRNullableSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge +class MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackSubscriptionBridge + : public MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge { public: - MTRNullableSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackSubscriptionBridge( + MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge::OnDone; + using MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::UnitLocalization::TempUnitEnum value); }; -class MTRSmokeCOAlarmClusterMuteStateEnumAttributeCallbackSubscriptionBridge - : public MTRSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge +class MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge + : public MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge { public: - MTRSmokeCOAlarmClusterMuteStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge(queue, handler, action), + MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge::OnDone; + using MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableSmokeCOAlarmClusterMuteStateEnumAttributeCallbackSubscriptionBridge - : public MTRNullableSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge +class MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge + : public MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge { public: - MTRNullableSmokeCOAlarmClusterMuteStateEnumAttributeCallbackSubscriptionBridge( + MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge::OnDone; + using MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value); }; -class MTRSmokeCOAlarmClusterSensitivityEnumAttributeCallbackSubscriptionBridge - : public MTRSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge +class MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge { public: - MTRSmokeCOAlarmClusterSensitivityEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableSmokeCOAlarmClusterSensitivityEnumAttributeCallbackSubscriptionBridge - : public MTRNullableSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge +class MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge { public: - MTRNullableSmokeCOAlarmClusterSensitivityEnumAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalStateClusterErrorStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROperationalStateClusterErrorStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalStateClusterErrorStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::OperationalState::ErrorStateEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeFaultEnum value); }; -class MTROperationalStateClusterErrorStateEnumAttributeCallbackSubscriptionBridge - : public MTROperationalStateClusterErrorStateEnumAttributeCallbackBridge +class MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge { public: - MTROperationalStateClusterErrorStateEnumAttributeCallbackSubscriptionBridge( + MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalStateClusterErrorStateEnumAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROperationalStateClusterErrorStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalStateClusterErrorStateEnumAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOperationalStateClusterErrorStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOperationalStateClusterErrorStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableOperationalStateClusterErrorStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableOperationalStateClusterErrorStateEnumAttributeCallbackSubscriptionBridge - : public MTRNullableOperationalStateClusterErrorStateEnumAttributeCallbackBridge +class MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge { public: - MTRNullableOperationalStateClusterErrorStateEnumAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOperationalStateClusterErrorStateEnumAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableOperationalStateClusterErrorStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOperationalStateClusterErrorStateEnumAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalStateClusterOperationalStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROperationalStateClusterOperationalStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalStateClusterOperationalStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::OperationalState::OperationalStateEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeLevelEnum value); }; -class MTROperationalStateClusterOperationalStateEnumAttributeCallbackSubscriptionBridge - : public MTROperationalStateClusterOperationalStateEnumAttributeCallbackBridge +class MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge { public: - MTROperationalStateClusterOperationalStateEnumAttributeCallbackSubscriptionBridge( + MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalStateClusterOperationalStateEnumAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROperationalStateClusterOperationalStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalStateClusterOperationalStateEnumAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOperationalStateClusterOperationalStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOperationalStateClusterOperationalStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableOperationalStateClusterOperationalStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableOperationalStateClusterOperationalStateEnumAttributeCallbackSubscriptionBridge - : public MTRNullableOperationalStateClusterOperationalStateEnumAttributeCallbackBridge +class MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge { public: - MTRNullableOperationalStateClusterOperationalStateEnumAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOperationalStateClusterOperationalStateEnumAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableOperationalStateClusterOperationalStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOperationalStateClusterOperationalStateEnumAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::HepaFilterMonitoring::ChangeIndicationEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeStateEnum value); }; -class MTRHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackSubscriptionBridge - : public MTRHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge +class MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge { public: - MTRHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackSubscriptionBridge( + MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackSubscriptionBridge - : public MTRNullableHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge +class MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge { public: - MTRNullableHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::HepaFilterMonitoring::DegradationDirectionEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value); }; -class MTRHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackSubscriptionBridge - : public MTRHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge +class MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge { public: - MTRHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackSubscriptionBridge( + MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackSubscriptionBridge - : public MTRNullableHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge +class MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge { public: - MTRNullableHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatFaultEnum value); }; -class MTRActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackSubscriptionBridge - : public MTRActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge +class MTRPowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge { public: - MTRActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackSubscriptionBridge - : public MTRNullableActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge +class MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge { public: - MTRNullableActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value); }; -class MTRActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackSubscriptionBridge - : public MTRActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge +class MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge { public: - MTRActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackSubscriptionBridge( + MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & - value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackSubscriptionBridge - : public MTRNullableActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge +class MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge { public: - MTRNullableActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::AlarmCodeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value); }; -class MTRDoorLockClusterAlarmCodeEnumAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge +class MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge { public: - MTRDoorLockClusterAlarmCodeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge +class MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::CredentialRuleEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value); }; -class MTRDoorLockClusterCredentialRuleEnumAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge +class MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge { public: - MTRDoorLockClusterCredentialRuleEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge +class MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::CredentialTypeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::WiredFaultEnum value); }; -class MTRDoorLockClusterCredentialTypeEnumAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge +class MTRPowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge { public: - MTRDoorLockClusterCredentialTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge +class MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DataOperationTypeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::GeneralCommissioning::CommissioningErrorEnum value); }; -class MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge +class MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackSubscriptionBridge + : public MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge { public: - MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackSubscriptionBridge( + MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge::OnDone; + using MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge +class MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackSubscriptionBridge + : public MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackSubscriptionBridge( + MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge::OnDone; + using MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterDlLockStateAttributeCallbackBridge : public MTRCallbackBridge +class MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlLockState value); + static void OnSuccessFn(void * context, chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum value); }; -class MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlLockStateAttributeCallbackBridge +class MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackSubscriptionBridge + : public MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge { public: - MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlLockStateAttributeCallbackBridge(queue, handler, action), + MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterDlLockStateAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterDlLockStateAttributeCallbackBridge::OnDone; + using MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge +class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(queue, handler, action), + MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge::OnDone; + using MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterDlLockTypeAttributeCallbackBridge : public MTRCallbackBridge +class MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlLockType value); + static void OnSuccessFn(void * context, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatusEnum value); }; -class MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlLockTypeAttributeCallbackBridge +class MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackSubscriptionBridge + : public MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge { public: - MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, handler, action), + MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterDlLockTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterDlLockTypeAttributeCallbackBridge::OnDone; + using MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge( + queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge +class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackSubscriptionBridge + : public MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, handler, action), + MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge::OnDone; + using MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterDlStatusAttributeCallbackBridge : public MTRCallbackBridge +class MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlStatus value); + static void OnSuccessFn(void * context, chip::app::Clusters::NetworkCommissioning::WiFiBandEnum value); }; -class MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlStatusAttributeCallbackBridge +class MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackSubscriptionBridge + : public MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge { public: - MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlStatusAttributeCallbackBridge(queue, handler, action), + MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterDlStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterDlStatusAttributeCallbackBridge::OnDone; + using MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge +class MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackSubscriptionBridge + : public MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(queue, handler, action), + MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge::OnDone; + using MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DoorLockOperationEventCode value); + static void OnSuccessFn(void * context, chip::app::Clusters::DiagnosticLogs::IntentEnum value); }; -class MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge +class MTRDiagnosticLogsClusterIntentEnumAttributeCallbackSubscriptionBridge + : public MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge { public: - MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, handler, action), + MTRDiagnosticLogsClusterIntentEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::OnDone; + using MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge +class MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( + MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, handler, action), + MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::OnDone; + using MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DoorLockProgrammingEventCode value); + static void OnSuccessFn(void * context, chip::app::Clusters::DiagnosticLogs::StatusEnum value); }; -class MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge +class MTRDiagnosticLogsClusterStatusEnumAttributeCallbackSubscriptionBridge + : public MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge { public: - MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, handler, action), + MTRDiagnosticLogsClusterStatusEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::OnDone; + using MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge +class MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( + MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, handler, action), + MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::OnDone; + using MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DoorLockSetPinOrIdStatus value); + static void OnSuccessFn(void * context, chip::app::Clusters::DiagnosticLogs::TransferProtocolEnum value); }; -class MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge +class MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackSubscriptionBridge + : public MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge { public: - MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( + MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, handler, action), + MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::OnDone; + using MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge +class MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( + MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, handler, action), + MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::OnDone; + using MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DoorStateEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::BootReasonEnum value); }; -class MTRDoorLockClusterDoorStateEnumAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge +class MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackSubscriptionBridge + : public MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge { public: - MTRDoorLockClusterDoorStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge(queue, handler, action), + MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge::OnDone; + using MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge +class MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackSubscriptionBridge + : public MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackSubscriptionBridge( + MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge::OnDone; + using MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::LockDataTypeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::HardwareFaultEnum value); }; -class MTRDoorLockClusterLockDataTypeEnumAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge +class MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackSubscriptionBridge + : public MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge { public: - MTRDoorLockClusterLockDataTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge::OnDone; + using MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge +class MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackSubscriptionBridge + : public MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackSubscriptionBridge( + MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge::OnDone; + using MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::LockOperationTypeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::InterfaceTypeEnum value); }; -class MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge +class MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackSubscriptionBridge + : public MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge { public: - MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackSubscriptionBridge( + MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge::OnDone; + using MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge +class MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackSubscriptionBridge( + MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge::OnDone; + using MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::OperatingModeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::NetworkFaultEnum value); }; -class MTRDoorLockClusterOperatingModeEnumAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge +class MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge + : public MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge { public: - MTRDoorLockClusterOperatingModeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge(queue, handler, action), + MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge::OnDone; + using MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge +class MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge + : public MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackSubscriptionBridge( + MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge::OnDone; + using MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::OperationErrorEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::RadioFaultEnum value); }; -class MTRDoorLockClusterOperationErrorEnumAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge +class MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackSubscriptionBridge + : public MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge { public: - MTRDoorLockClusterOperationErrorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge(queue, handler, action), + MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge::OnDone; + using MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge +class MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackSubscriptionBridge + : public MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackSubscriptionBridge( + MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge::OnDone; + using MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::OperationSourceEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::ThreadNetworkDiagnostics::ConnectionStatusEnum value); }; -class MTRDoorLockClusterOperationSourceEnumAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge +class MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge + : public MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge { public: - MTRDoorLockClusterOperationSourceEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge(queue, handler, action), + MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge::OnDone; + using MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge +class MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge + : public MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackSubscriptionBridge( + MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge::OnDone; + using MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::UserStatusEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::ThreadNetworkDiagnostics::NetworkFaultEnum value); }; -class MTRDoorLockClusterUserStatusEnumAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge +class MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge + : public MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge { public: - MTRDoorLockClusterUserStatusEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge(queue, handler, action), + MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge::OnDone; + using MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge +class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge + : public MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackSubscriptionBridge( + MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge::OnDone; + using MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge : public MTRCallbackBridge +class MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::UserTypeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::ThreadNetworkDiagnostics::RoutingRoleEnum value); }; -class MTRDoorLockClusterUserTypeEnumAttributeCallbackSubscriptionBridge - : public MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge +class MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackSubscriptionBridge + : public MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge { public: - MTRDoorLockClusterUserTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge::OnDone; + using MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge +class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackSubscriptionBridge + : public MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge { public: - MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackSubscriptionBridge( + MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge::OnDone; + using MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::WindowCovering::EndProductType value); + static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum value); }; -class MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge - : public MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge + : public MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge { public: - MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( + MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, handler, action), + MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge::OnDone; + using MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge - : public MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge + : public MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge { public: - MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( + MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, handler, action), + MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge::OnDone; + using MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWindowCoveringClusterTypeAttributeCallbackBridge : public MTRCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::WindowCovering::Type value); + static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum value); }; -class MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge : public MTRWindowCoveringClusterTypeAttributeCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge + : public MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge { public: - MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringClusterTypeAttributeCallbackBridge(queue, handler, action), + MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWindowCoveringClusterTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWindowCoveringClusterTypeAttributeCallbackBridge::OnDone; + using MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge - : public MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge + : public MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge { public: - MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(queue, handler, action), + MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge::OnDone; + using MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum value); }; -class MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackSubscriptionBridge - : public MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge + : public MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge { public: - MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackSubscriptionBridge( + MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(queue, handler, action), + MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge::OnDone; + using MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge { public: - MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackSubscriptionBridge( + MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge::OnDone; + using MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum value); }; -class MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackSubscriptionBridge - : public MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge + : public MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge { public: - MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackSubscriptionBridge( + MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(queue, handler, action), + MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge::OnDone; + using MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; - - MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge + : public MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge { public: - MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackSubscriptionBridge( + MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge::OnDone; + using MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Thermostat::SetpointAdjustMode value); + static void OnSuccessFn(void * context, chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum value); }; -class MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge - : public MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge +class MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackSubscriptionBridge + : public MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge { public: - MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( + MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, handler, action), + MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge::OnDone; + using MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge - : public MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge +class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackSubscriptionBridge + : public MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge { public: - MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( + MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, handler, action), + MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge::OnDone; + using MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge - : public MTRCallbackBridge +class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Thermostat::ThermostatControlSequence value); + static void OnSuccessFn(void * context, chip::app::Clusters::TimeSynchronization::GranularityEnum value); }; -class MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge - : public MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge +class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge + : public MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge { public: - MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( + MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, handler, action), + MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge::OnDone; + using MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge - : public MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge +class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge + : public MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge { public: - MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( + MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, handler, action), + MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge::OnDone; + using MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Thermostat::ThermostatRunningMode value); + static void OnSuccessFn(void * context, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value); }; -class MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge - : public MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge +class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge + : public MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge { public: - MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( + MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, handler, action), + MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge::OnDone; + using MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge - : public MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge +class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge + : public MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge { public: - MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( + MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, handler, action), + MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge::OnDone; + using MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Thermostat::ThermostatSystemMode value); + static void OnSuccessFn(void * context, chip::app::Clusters::BridgedDeviceBasicInformation::ColorEnum value); }; -class MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge - : public MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge +class MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge + : public MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge { public: - MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( + MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, handler, action), + MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge::OnDone; + using MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge - : public MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge +class MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge + : public MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge { public: - MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( + MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, handler, action), + MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge::OnDone; + using MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlClusterAirflowDirectionEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFanControlClusterAirflowDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlClusterAirflowDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::AirflowDirectionEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::BridgedDeviceBasicInformation::ProductFinishEnum value); }; -class MTRFanControlClusterAirflowDirectionEnumAttributeCallbackSubscriptionBridge - : public MTRFanControlClusterAirflowDirectionEnumAttributeCallbackBridge +class MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge + : public MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge { public: - MTRFanControlClusterAirflowDirectionEnumAttributeCallbackSubscriptionBridge( + MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlClusterAirflowDirectionEnumAttributeCallbackBridge(queue, handler, action), + MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlClusterAirflowDirectionEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlClusterAirflowDirectionEnumAttributeCallbackBridge::OnDone; + using MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableFanControlClusterAirflowDirectionEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableFanControlClusterAirflowDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableFanControlClusterAirflowDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableFanControlClusterAirflowDirectionEnumAttributeCallbackSubscriptionBridge - : public MTRNullableFanControlClusterAirflowDirectionEnumAttributeCallbackBridge +class MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge + : public MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge { public: - MTRNullableFanControlClusterAirflowDirectionEnumAttributeCallbackSubscriptionBridge( + MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFanControlClusterAirflowDirectionEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableFanControlClusterAirflowDirectionEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableFanControlClusterAirflowDirectionEnumAttributeCallbackBridge::OnDone; + using MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlClusterFanModeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFanControlClusterFanModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRFanControlClusterFanModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanModeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value); }; -class MTRFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge - : public MTRFanControlClusterFanModeEnumAttributeCallbackBridge +class MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackSubscriptionBridge + : public MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge { public: - MTRFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlClusterFanModeEnumAttributeCallbackBridge(queue, handler, action), + MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlClusterFanModeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlClusterFanModeEnumAttributeCallbackBridge::OnDone; + using MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge( + queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & + value); }; -class MTRNullableFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge +class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackSubscriptionBridge + : public MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge { public: - MTRNullableFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge( + MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge::OnDone; + using MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanModeSequenceEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::AdministratorCommissioning::StatusCode value); }; -class MTRFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge - : public MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge +class MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge + : public MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge { public: - MTRFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge( + MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(queue, handler, action), + MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::OnDone; + using MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge - : public MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge +class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge + : public MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge { public: - MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge( + MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::OnDone; + using MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::StepDirectionEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::OperationalCredentials::CertificateChainTypeEnum value); }; -class MTRFanControlClusterStepDirectionEnumAttributeCallbackSubscriptionBridge - : public MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge +class MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge + : public MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge { public: - MTRFanControlClusterStepDirectionEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge(queue, handler, action), + MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge::OnDone; + using MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackSubscriptionBridge - : public MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge +class MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge { public: - MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackSubscriptionBridge( + MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge::OnDone; + using MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRColorControlClusterColorLoopActionAttributeCallbackBridge - : public MTRCallbackBridge +class MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::ColorLoopAction value); + static void OnSuccessFn(void * context, chip::app::Clusters::OperationalCredentials::NodeOperationalCertStatusEnum value); }; -class MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge - : public MTRColorControlClusterColorLoopActionAttributeCallbackBridge +class MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge + : public MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge { public: - MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterColorLoopActionAttributeCallbackBridge(queue, handler, action), + MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRColorControlClusterColorLoopActionAttributeCallbackBridge::KeepAliveOnCallback; - using MTRColorControlClusterColorLoopActionAttributeCallbackBridge::OnDone; + using MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge( + queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge - : public MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge +class MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge + : public MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge { public: - MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge( + MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(queue, handler, action), + MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge::OnDone; + using MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge - : public MTRCallbackBridge +class MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::ColorLoopDirection value); + static void OnSuccessFn(void * context, chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicyEnum value); }; -class MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge - : public MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge +class MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackSubscriptionBridge + : public MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge { public: - MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( + MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, handler, action), + MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge::KeepAliveOnCallback; - using MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge::OnDone; + using MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge - : public MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge +class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackSubscriptionBridge + : public MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge { public: - MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( + MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, handler, action), + MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge::OnDone; + using MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRColorControlClusterColorModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::ColorMode value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::AlarmCodeEnum value); }; -class MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge - : public MTRColorControlClusterColorModeAttributeCallbackBridge +class MTRDoorLockClusterAlarmCodeEnumAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge { public: - MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRDoorLockClusterAlarmCodeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterColorModeAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRColorControlClusterColorModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRColorControlClusterColorModeAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableColorControlClusterColorModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge - : public MTRNullableColorControlClusterColorModeAttributeCallbackBridge +class MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge { public: - MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterColorModeAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableColorControlClusterColorModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableColorControlClusterColorModeAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRColorControlClusterHueDirectionAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::HueDirection value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::CredentialRuleEnum value); }; -class MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge - : public MTRColorControlClusterHueDirectionAttributeCallbackBridge +class MTRDoorLockClusterCredentialRuleEnumAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge { public: - MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterHueDirectionAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterCredentialRuleEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRColorControlClusterHueDirectionAttributeCallbackBridge::KeepAliveOnCallback; - using MTRColorControlClusterHueDirectionAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge - : public MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge +class MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge { public: - MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRColorControlClusterHueMoveModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::HueMoveMode value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::CredentialTypeEnum value); }; -class MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge - : public MTRColorControlClusterHueMoveModeAttributeCallbackBridge +class MTRDoorLockClusterCredentialTypeEnumAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge { public: - MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterHueMoveModeAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterCredentialTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRColorControlClusterHueMoveModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRColorControlClusterHueMoveModeAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge - : public MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge +class MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge { public: - MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRColorControlClusterHueStepModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::HueStepMode value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DataOperationTypeEnum value); }; -class MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge - : public MTRColorControlClusterHueStepModeAttributeCallbackBridge +class MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge { public: - MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterHueStepModeAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRColorControlClusterHueStepModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRColorControlClusterHueStepModeAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge - : public MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge +class MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge { public: - MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterDlLockStateAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::SaturationMoveMode value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlLockState value); }; -class MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge - : public MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge +class MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlLockStateAttributeCallbackBridge { public: - MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockClusterDlLockStateAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterDlLockStateAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlLockStateAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge - : public MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge +class MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge { public: - MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRColorControlClusterSaturationStepModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterDlLockTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::SaturationStepMode value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlLockType value); }; -class MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge - : public MTRColorControlClusterSaturationStepModeAttributeCallbackBridge +class MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlLockTypeAttributeCallbackBridge { public: - MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRColorControlClusterSaturationStepModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRColorControlClusterSaturationStepModeAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterDlLockTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlLockTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge - : public MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge +class MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge { public: - MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterDlStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::IlluminanceMeasurement::LightSensorTypeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlStatus value); }; -class MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackSubscriptionBridge - : public MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge +class MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlStatusAttributeCallbackBridge { public: - MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockClusterDlStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterDlStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; -class MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge +class MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge { public: - MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DoorLockOperationEventCode value); }; -class MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackSubscriptionBridge - : public MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge +class MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge { public: - MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackSubscriptionBridge( + MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackSubscriptionBridge - : public MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge +class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge { public: - MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DoorLockProgrammingEventCode value); }; -class MTRCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRNullableCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge { public: - MTRNullableCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DoorLockSetPinOrIdStatus value); }; -class MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge( - queue, handler, OnSuccessFn){}; + MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & - value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge { public: - MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, - action), + MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DoorStateEnum value); }; -class MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRDoorLockClusterDoorStateEnumAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge { public: - MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterDoorStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & - value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge { public: - MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::LockDataTypeEnum value); }; -class MTRCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRDoorLockClusterLockDataTypeEnumAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterLockDataTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRNullableCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge { public: - MTRNullableCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::LockOperationTypeEnum value); }; -class MTRCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge( - queue, handler, OnSuccessFn){}; + MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & - value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge { public: - MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::OperatingModeEnum value); }; -class MTRCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRDoorLockClusterOperatingModeEnumAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge { public: - MTRCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterOperatingModeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & - value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge { public: - MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::OperationErrorEnum value); }; -class MTRNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRDoorLockClusterOperationErrorEnumAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterOperationErrorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRNullableNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge { public: - MTRNullableNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::OperationSourceEnum value); }; -class MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRDoorLockClusterOperationSourceEnumAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterOperationSourceEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge( - queue, handler, OnSuccessFn){}; + MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & - value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge { public: - MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, - action), + MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge:: - KeepAliveOnCallback; - using MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::UserStatusEnum value); }; -class MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRDoorLockClusterUserStatusEnumAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge { public: - MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterUserStatusEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge( - queue, handler, OnSuccessFn){}; + MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & - value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge { public: - MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::UserTypeEnum value); }; -class MTROzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTROzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRDoorLockClusterUserTypeEnumAttributeCallbackSubscriptionBridge + : public MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge { public: - MTROzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRDoorLockClusterUserTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTROzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableOzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableOzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRNullableOzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge { public: - MTRNullableOzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableOzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::WindowCovering::EndProductType value); }; -class MTROzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTROzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge + : public MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge { public: - MTROzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTROzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableOzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableOzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRNullableOzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge + : public MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge { public: - MTRNullableOzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableOzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWindowCoveringClusterTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::WindowCovering::Type value); }; -class MTROzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTROzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge : public MTRWindowCoveringClusterTypeAttributeCallbackBridge { public: - MTROzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTROzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringClusterTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTROzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRWindowCoveringClusterTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringClusterTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableOzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableOzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableOzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRNullableOzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge + : public MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge { public: - MTRNullableOzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableOzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value); }; -class MTRPM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRPM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackSubscriptionBridge + : public MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge { public: - MTRPM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, + MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, + MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullablePM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge { public: - MTRNullablePM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value); }; -class MTRPM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRPM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackSubscriptionBridge + : public MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge { public: - MTRPM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullablePM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullablePM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge { public: - MTRNullablePM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::Thermostat::SetpointAdjustMode value); }; -class MTRPM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRPM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge + : public MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge { public: - MTRPM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( + MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullablePM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge + : public MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge { public: - MTRNullablePM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( + MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::Thermostat::ThermostatControlSequence value); }; -class MTRFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge + : public MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRNullableFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge + : public MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge { public: - MTRNullableFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::Thermostat::ThermostatRunningMode value); }; -class MTRFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge + : public MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & - value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge + : public MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge { public: - MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::Thermostat::ThermostatSystemMode value); }; -class MTRFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge + : public MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge { public: - MTRFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( + MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & - value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge + : public MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge { public: - MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( + MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFanControlClusterFanModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFanControlClusterFanModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRFanControlClusterFanModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanModeEnum value); }; -class MTRPM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRPM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge + : public MTRFanControlClusterFanModeEnumAttributeCallbackBridge { public: - MTRPM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlClusterFanModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRFanControlClusterFanModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlClusterFanModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullablePM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRNullableFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge { public: - MTRNullablePM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRNullableFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanModeSequenceEnum value); }; -class MTRPM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRPM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge + : public MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge { public: - MTRPM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullablePM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge + : public MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge { public: - MTRNullablePM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRColorControlClusterColorLoopActionAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::ColorLoopAction value); }; -class MTRPM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRPM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge + : public MTRColorControlClusterColorLoopActionAttributeCallbackBridge { public: - MTRPM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterColorLoopActionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRColorControlClusterColorLoopActionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterColorLoopActionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullablePM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge + : public MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge { public: - MTRNullablePM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( + MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::ColorLoopDirection value); }; -class MTRPM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRPM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge + : public MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge { public: - MTRPM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullablePM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge + : public MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge { public: - MTRNullablePM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRColorControlClusterColorModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::ColorMode value); }; -class MTRPM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRPM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge + : public MTRColorControlClusterColorModeAttributeCallbackBridge { public: - MTRPM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterColorModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRColorControlClusterColorModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterColorModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableColorControlClusterColorModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullablePM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge + : public MTRNullableColorControlClusterColorModeAttributeCallbackBridge { public: - MTRNullablePM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableColorControlClusterColorModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRNullableColorControlClusterColorModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterColorModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRColorControlClusterHueDirectionAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::HueDirection value); }; -class MTRPM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRPM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge + : public MTRColorControlClusterHueDirectionAttributeCallbackBridge { public: - MTRPM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterHueDirectionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRColorControlClusterHueDirectionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterHueDirectionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; - - MTRNullablePM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullablePM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRNullablePM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge + : public MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge { public: - MTRNullablePM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( + MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRColorControlClusterHueMoveModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge( - queue, handler, OnSuccessFn){}; + MTRColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::HueMoveMode value); }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge + : public MTRColorControlClusterHueMoveModeAttributeCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, - action), + MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterHueMoveModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRColorControlClusterHueMoveModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterHueMoveModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge( - dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge( - queue, handler, OnSuccessFn){}; + MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable< - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum> & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge + : public MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge { public: - MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, - action), + MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge:: - KeepAliveOnCallback; - using MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRColorControlClusterHueStepModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge( - dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge( - queue, handler, OnSuccessFn){}; + MTRColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::HueStepMode value); }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge + : public MTRColorControlClusterHueStepModeAttributeCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, - action), + MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterHueStepModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge:: - KeepAliveOnCallback; - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRColorControlClusterHueStepModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterHueStepModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge< - NullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback> +class MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge( - dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge< - NullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback>( - queue, handler, OnSuccessFn){}; + MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge< - NullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallback>( - queue, handler, action, OnSuccessFn){}; + MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable< - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum> & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class - MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge + : public MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge { public: - MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge( - queue, handler, action), + MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge:: - KeepAliveOnCallback; - using MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge:: - OnDone; + using MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge( - dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge( - queue, handler, OnSuccessFn){}; + MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::SaturationMoveMode value); }; -class MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge + : public MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge { public: - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( + MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, - action), + MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge:: - KeepAliveOnCallback; - using MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge< - NullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallback> +class MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge( - dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge( - queue, handler, OnSuccessFn){}; + MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable< - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum> & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge + : public MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge { public: - MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( + MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge( - queue, handler, action), + MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge:: - KeepAliveOnCallback; - using MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRColorControlClusterSaturationStepModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::SaturationStepMode value); }; -class MTRRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge + : public MTRColorControlClusterSaturationStepModeAttributeCallbackBridge { public: - MTRRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRColorControlClusterSaturationStepModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterSaturationStepModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge - : public MTRNullableRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge +class MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge + : public MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge { public: - MTRNullableRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge( + MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnDone; + using MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::IlluminanceMeasurement::LightSensorTypeEnum value); }; -class MTRRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackSubscriptionBridge + : public MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge { public: - MTRRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn){}; + MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge - : public MTRNullableRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge +class MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge { public: - MTRNullableRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge( + MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnDone; + using MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value); }; -class MTRRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackSubscriptionBridge + : public MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge { public: - MTRRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( + MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge - : public MTRNullableRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge +class MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge { public: - MTRNullableRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge( + MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnDone; + using MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index c1db00a3dfafa9..54e130054bf680 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -792,44 +792,6 @@ } } -void MTRIdentifyEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) -{ - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } - DispatchSuccess(context, objCValue); -}; - -void MTRIdentifyEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() -{ - if (!mQueue) { - return; - } - - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; - } -} - void MTRIdentifyAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -967,8 +929,8 @@ } } -void MTRGroupsEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGroupsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -990,7 +952,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1005,8 +967,8 @@ } } -void MTRGroupsAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRScenesGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1028,7 +990,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1043,7 +1005,7 @@ } } -void MTRScenesGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRScenesAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1066,7 +1028,7 @@ DispatchSuccess(context, objCValue); }; -void MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1081,8 +1043,8 @@ } } -void MTRScenesAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRScenesAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1104,7 +1066,7 @@ DispatchSuccess(context, objCValue); }; -void MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1119,8 +1081,8 @@ } } -void MTRScenesEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROnOffGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1142,7 +1104,7 @@ DispatchSuccess(context, objCValue); }; -void MTRScenesEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1157,8 +1119,8 @@ } } -void MTRScenesAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROnOffAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1180,7 +1142,7 @@ DispatchSuccess(context, objCValue); }; -void MTRScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1195,8 +1157,8 @@ } } -void MTROnOffGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROnOffAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1218,7 +1180,7 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1233,7 +1195,7 @@ } } -void MTROnOffAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1256,7 +1218,7 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1271,8 +1233,8 @@ } } -void MTROnOffEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1294,7 +1256,7 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1309,7 +1271,7 @@ } } -void MTROnOffAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1332,7 +1294,7 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1347,30 +1309,15 @@ } } -void MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRLevelControlOptionsAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLevelControlOptionsAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1385,7 +1332,7 @@ } } -void MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRLevelControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1408,7 +1355,7 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1423,8 +1370,8 @@ } } -void MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRLevelControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1446,7 +1393,7 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffSwitchConfigurationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1461,7 +1408,7 @@ } } -void MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRLevelControlAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1484,30 +1431,7 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::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 MTRLevelControlOptionsAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRLevelControlOptionsAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1522,7 +1446,7 @@ } } -void MTRLevelControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1545,7 +1469,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1560,7 +1484,7 @@ } } -void MTRLevelControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1583,7 +1507,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1598,8 +1522,8 @@ } } -void MTRLevelControlEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBinaryInputBasicAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1621,7 +1545,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLevelControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1636,8 +1560,8 @@ } } -void MTRLevelControlAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDescriptorDeviceTypeListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1645,8 +1569,10 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRDescriptorClusterDeviceTypeStruct * newElement_0; + newElement_0 = [MTRDescriptorClusterDeviceTypeStruct new]; + newElement_0.deviceType = [NSNumber numberWithUnsignedInt:entry_0.deviceType]; + newElement_0.revision = [NSNumber numberWithUnsignedShort:entry_0.revision]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -1659,7 +1585,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1674,8 +1600,8 @@ } } -void MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDescriptorServerListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1697,7 +1623,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1712,8 +1638,8 @@ } } -void MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDescriptorClientListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1735,7 +1661,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1750,8 +1676,8 @@ } } -void MTRBinaryInputBasicEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDescriptorPartsListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1760,7 +1686,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -1773,7 +1699,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBinaryInputBasicEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1788,8 +1714,8 @@ } } -void MTRBinaryInputBasicAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDescriptorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1811,7 +1737,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1826,8 +1752,8 @@ } } -void MTRPulseWidthModulationEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDescriptorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1849,7 +1775,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPulseWidthModulationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1864,8 +1790,8 @@ } } -void MTRDescriptorDeviceTypeListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRDescriptorAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1873,10 +1799,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRDescriptorClusterDeviceTypeStruct * newElement_0; - newElement_0 = [MTRDescriptorClusterDeviceTypeStruct new]; - newElement_0.deviceType = [NSNumber numberWithUnsignedInt:entry_0.deviceType]; - newElement_0.revision = [NSNumber numberWithUnsignedShort:entry_0.revision]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -1889,7 +1813,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1904,8 +1828,8 @@ } } -void MTRDescriptorServerListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBindingBindingListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1913,8 +1837,29 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRBindingClusterTargetStruct * newElement_0; + newElement_0 = [MTRBindingClusterTargetStruct new]; + if (entry_0.node.HasValue()) { + newElement_0.node = [NSNumber numberWithUnsignedLongLong:entry_0.node.Value()]; + } else { + newElement_0.node = nil; + } + if (entry_0.group.HasValue()) { + newElement_0.group = [NSNumber numberWithUnsignedShort:entry_0.group.Value()]; + } else { + newElement_0.group = nil; + } + if (entry_0.endpoint.HasValue()) { + newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint.Value()]; + } else { + newElement_0.endpoint = nil; + } + if (entry_0.cluster.HasValue()) { + newElement_0.cluster = [NSNumber numberWithUnsignedInt:entry_0.cluster.Value()]; + } else { + newElement_0.cluster = nil; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -1927,7 +1872,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1942,8 +1887,8 @@ } } -void MTRDescriptorClientListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBindingGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1965,7 +1910,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1980,8 +1925,8 @@ } } -void MTRDescriptorPartsListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBindingAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1990,7 +1935,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2003,7 +1948,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2018,8 +1963,8 @@ } } -void MTRDescriptorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBindingAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2041,7 +1986,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2056,8 +2001,9 @@ } } -void MTRDescriptorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAccessControlACLListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2065,8 +2011,66 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRAccessControlClusterAccessControlEntryStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlEntryStruct new]; + newElement_0.privilege = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.privilege)]; + newElement_0.authMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.authMode)]; + if (entry_0.subjects.IsNull()) { + newElement_0.subjects = nil; + } else { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.subjects.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + NSNumber * newElement_3; + newElement_3 = [NSNumber numberWithUnsignedLongLong:entry_3]; + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.subjects = array_3; + } + } + if (entry_0.targets.IsNull()) { + newElement_0.targets = nil; + } else { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.targets.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + MTRAccessControlClusterAccessControlTargetStruct * newElement_3; + newElement_3 = [MTRAccessControlClusterAccessControlTargetStruct new]; + if (entry_3.cluster.IsNull()) { + newElement_3.cluster = nil; + } else { + newElement_3.cluster = [NSNumber numberWithUnsignedInt:entry_3.cluster.Value()]; + } + if (entry_3.endpoint.IsNull()) { + newElement_3.endpoint = nil; + } else { + newElement_3.endpoint = [NSNumber numberWithUnsignedShort:entry_3.endpoint.Value()]; + } + if (entry_3.deviceType.IsNull()) { + newElement_3.deviceType = nil; + } else { + newElement_3.deviceType = [NSNumber numberWithUnsignedInt:entry_3.deviceType.Value()]; + } + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.targets = array_3; + } + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2079,7 +2083,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccessControlACLListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2094,8 +2098,9 @@ } } -void MTRDescriptorEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAccessControlExtensionListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2103,8 +2108,10 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRAccessControlClusterAccessControlExtensionStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlExtensionStruct new]; + newElement_0.data = AsData(entry_0.data); + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2117,7 +2124,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2132,8 +2139,8 @@ } } -void MTRDescriptorAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAccessControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2155,7 +2162,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2170,8 +2177,8 @@ } } -void MTRBindingBindingListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRAccessControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2179,29 +2186,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRBindingClusterTargetStruct * newElement_0; - newElement_0 = [MTRBindingClusterTargetStruct new]; - if (entry_0.node.HasValue()) { - newElement_0.node = [NSNumber numberWithUnsignedLongLong:entry_0.node.Value()]; - } else { - newElement_0.node = nil; - } - if (entry_0.group.HasValue()) { - newElement_0.group = [NSNumber numberWithUnsignedShort:entry_0.group.Value()]; - } else { - newElement_0.group = nil; - } - if (entry_0.endpoint.HasValue()) { - newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint.Value()]; - } else { - newElement_0.endpoint = nil; - } - if (entry_0.cluster.HasValue()) { - newElement_0.cluster = [NSNumber numberWithUnsignedInt:entry_0.cluster.Value()]; - } else { - newElement_0.cluster = nil; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2214,7 +2200,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2229,8 +2215,8 @@ } } -void MTRBindingGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAccessControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2252,7 +2238,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2267,8 +2253,8 @@ } } -void MTRBindingAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRActionsActionListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2276,8 +2262,19 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRActionsClusterActionStruct * newElement_0; + newElement_0 = [MTRActionsClusterActionStruct new]; + newElement_0.actionID = [NSNumber numberWithUnsignedShort:entry_0.actionID]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; + newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; + newElement_0.supportedCommands = [NSNumber numberWithUnsignedShort:entry_0.supportedCommands.Raw()]; + newElement_0.state = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.state)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2290,7 +2287,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2305,8 +2302,8 @@ } } -void MTRBindingEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRActionsEndpointListsListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2314,8 +2311,32 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRActionsClusterEndpointListStruct * newElement_0; + newElement_0 = [MTRActionsClusterEndpointListStruct new]; + newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.endpoints.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.endpoints = array_2; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2328,7 +2349,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBindingEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2343,8 +2364,8 @@ } } -void MTRBindingAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRActionsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2366,7 +2387,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2381,9 +2402,8 @@ } } -void MTRAccessControlACLListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & value) +void MTRActionsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2391,66 +2411,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRAccessControlClusterAccessControlEntryStruct * newElement_0; - newElement_0 = [MTRAccessControlClusterAccessControlEntryStruct new]; - newElement_0.privilege = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.privilege)]; - newElement_0.authMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.authMode)]; - if (entry_0.subjects.IsNull()) { - newElement_0.subjects = nil; - } else { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - auto iter_3 = entry_0.subjects.Value().begin(); - while (iter_3.Next()) { - auto & entry_3 = iter_3.GetValue(); - NSNumber * newElement_3; - newElement_3 = [NSNumber numberWithUnsignedLongLong:entry_3]; - [array_3 addObject:newElement_3]; - } - CHIP_ERROR err = iter_3.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.subjects = array_3; - } - } - if (entry_0.targets.IsNull()) { - newElement_0.targets = nil; - } else { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - auto iter_3 = entry_0.targets.Value().begin(); - while (iter_3.Next()) { - auto & entry_3 = iter_3.GetValue(); - MTRAccessControlClusterAccessControlTargetStruct * newElement_3; - newElement_3 = [MTRAccessControlClusterAccessControlTargetStruct new]; - if (entry_3.cluster.IsNull()) { - newElement_3.cluster = nil; - } else { - newElement_3.cluster = [NSNumber numberWithUnsignedInt:entry_3.cluster.Value()]; - } - if (entry_3.endpoint.IsNull()) { - newElement_3.endpoint = nil; - } else { - newElement_3.endpoint = [NSNumber numberWithUnsignedShort:entry_3.endpoint.Value()]; - } - if (entry_3.deviceType.IsNull()) { - newElement_3.deviceType = nil; - } else { - newElement_3.deviceType = [NSNumber numberWithUnsignedInt:entry_3.deviceType.Value()]; - } - [array_3 addObject:newElement_3]; - } - CHIP_ERROR err = iter_3.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.targets = array_3; - } - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2463,7 +2425,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlACLListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2478,9 +2440,8 @@ } } -void MTRAccessControlExtensionListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & value) +void MTRActionsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2488,10 +2449,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRAccessControlClusterAccessControlExtensionStruct * newElement_0; - newElement_0 = [MTRAccessControlClusterAccessControlExtensionStruct new]; - newElement_0.data = AsData(entry_0.data); - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2504,7 +2463,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2519,7 +2478,61 @@ } } -void MTRAccessControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRBasicInformationCapabilityMinimaStructAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType & value) +{ + MTRBasicInformationClusterCapabilityMinimaStruct * _Nonnull objCValue; + objCValue = [MTRBasicInformationClusterCapabilityMinimaStruct new]; + objCValue.caseSessionsPerFabric = [NSNumber numberWithUnsignedShort:value.caseSessionsPerFabric]; + objCValue.subscriptionsPerFabric = [NSNumber numberWithUnsignedShort:value.subscriptionsPerFabric]; + DispatchSuccess(context, objCValue); +}; + +void MTRBasicInformationCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRBasicInformationProductAppearanceStructAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType & value) +{ + MTRBasicInformationClusterProductAppearanceStruct * _Nonnull objCValue; + objCValue = [MTRBasicInformationClusterProductAppearanceStruct new]; + objCValue.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.finish)]; + if (value.primaryColor.IsNull()) { + objCValue.primaryColor = nil; + } else { + objCValue.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.primaryColor.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRBasicInformationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2542,7 +2555,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBasicInformationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2557,7 +2570,7 @@ } } -void MTRAccessControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRBasicInformationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2580,7 +2593,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2595,8 +2608,8 @@ } } -void MTRAccessControlEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBasicInformationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2618,7 +2631,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBasicInformationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2633,8 +2646,8 @@ } } -void MTRAccessControlAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2656,7 +2669,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2671,8 +2684,8 @@ } } -void MTRActionsActionListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2680,19 +2693,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRActionsClusterActionStruct * newElement_0; - newElement_0 = [MTRActionsClusterActionStruct new]; - newElement_0.actionID = [NSNumber numberWithUnsignedShort:entry_0.actionID]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; - newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; - newElement_0.supportedCommands = [NSNumber numberWithUnsignedShort:entry_0.supportedCommands.Raw()]; - newElement_0.state = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.state)]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2705,7 +2707,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2720,8 +2722,8 @@ } } -void MTRActionsEndpointListsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2729,32 +2731,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRActionsClusterEndpointListStruct * newElement_0; - newElement_0 = [MTRActionsClusterEndpointListStruct new]; - newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.endpoints.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.endpoints = array_2; - } + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2767,7 +2745,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2782,8 +2760,9 @@ } } -void MTRActionsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2791,8 +2770,11 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTROTASoftwareUpdateRequestorClusterProviderLocation * newElement_0; + newElement_0 = [MTROTASoftwareUpdateRequestorClusterProviderLocation new]; + newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; + newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2805,7 +2787,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2820,7 +2802,7 @@ } } -void MTRActionsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2843,7 +2825,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2858,8 +2840,8 @@ } } -void MTRActionsEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2881,7 +2863,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2896,7 +2878,7 @@ } } -void MTRActionsAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2919,7 +2901,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2934,17 +2916,35 @@ } } -void MTRBasicInformationCapabilityMinimaStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType & value) +void MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - MTRBasicInformationClusterCapabilityMinimaStruct * _Nonnull objCValue; - objCValue = [MTRBasicInformationClusterCapabilityMinimaStruct new]; - objCValue.caseSessionsPerFabric = [NSNumber numberWithUnsignedShort:value.caseSessionsPerFabric]; - objCValue.subscriptionsPerFabric = [NSNumber numberWithUnsignedShort:value.subscriptionsPerFabric]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + 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 MTRBasicInformationCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2959,21 +2959,30 @@ } } -void MTRBasicInformationProductAppearanceStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType & value) +void MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - MTRBasicInformationClusterProductAppearanceStruct * _Nonnull objCValue; - objCValue = [MTRBasicInformationClusterProductAppearanceStruct new]; - objCValue.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.finish)]; - if (value.primaryColor.IsNull()) { - objCValue.primaryColor = nil; - } else { - objCValue.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.primaryColor.Value())]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + 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 MTRBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2988,7 +2997,7 @@ } } -void MTRBasicInformationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3011,7 +3020,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBasicInformationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3026,8 +3035,8 @@ } } -void MTRBasicInformationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3049,7 +3058,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3064,8 +3073,8 @@ } } -void MTRBasicInformationEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3074,7 +3083,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3087,7 +3096,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBasicInformationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3102,8 +3111,8 @@ } } -void MTRBasicInformationAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3125,7 +3134,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBasicInformationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3140,7 +3149,7 @@ } } -void MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3163,7 +3172,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3178,8 +3187,8 @@ } } -void MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3201,7 +3210,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3216,8 +3225,8 @@ } } -void MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3239,7 +3248,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateProviderEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3254,8 +3263,8 @@ } } -void MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3277,7 +3286,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3292,9 +3301,8 @@ } } -void MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & value) +void MTRUnitLocalizationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3302,11 +3310,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTROTASoftwareUpdateRequestorClusterProviderLocation * newElement_0; - newElement_0 = [MTROTASoftwareUpdateRequestorClusterProviderLocation new]; - newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; - newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3319,7 +3324,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3334,8 +3339,8 @@ } } -void MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3344,7 +3349,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3357,7 +3362,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3372,7 +3377,7 @@ } } -void MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3395,7 +3400,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3410,8 +3415,8 @@ } } -void MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3433,7 +3438,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3448,7 +3453,7 @@ } } -void MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3471,7 +3476,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3486,8 +3491,8 @@ } } -void MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3495,13 +3500,8 @@ 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; - } + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3514,7 +3514,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3529,8 +3529,8 @@ } } -void MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3539,7 +3539,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3552,7 +3552,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3567,8 +3567,8 @@ } } -void MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3577,7 +3577,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3590,7 +3590,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3605,8 +3605,8 @@ } } -void MTRLocalizationConfigurationEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3628,7 +3628,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLocalizationConfigurationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3643,8 +3643,8 @@ } } -void MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3666,7 +3666,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3681,8 +3681,8 @@ } } -void MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRPowerSourceAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3691,7 +3691,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3704,7 +3704,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3719,30 +3719,17 @@ } } -void MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType & value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - 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; - } + MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nonnull objCValue; + objCValue = [MTRGeneralCommissioningClusterBasicCommissioningInfo new]; + objCValue.failSafeExpiryLengthSeconds = [NSNumber numberWithUnsignedShort:value.failSafeExpiryLengthSeconds]; + objCValue.maxCumulativeFailsafeSeconds = [NSNumber numberWithUnsignedShort:value.maxCumulativeFailsafeSeconds]; DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3757,7 +3744,7 @@ } } -void MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3780,7 +3767,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3795,8 +3782,8 @@ } } -void MTRTimeFormatLocalizationEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3818,7 +3805,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3833,7 +3820,7 @@ } } -void MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRGeneralCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3856,7 +3843,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3871,8 +3858,9 @@ } } -void MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRNetworkCommissioningNetworksListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::NetworkCommissioning::Structs::NetworkInfoStruct::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3880,8 +3868,10 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRNetworkCommissioningClusterNetworkInfoStruct * newElement_0; + newElement_0 = [MTRNetworkCommissioningClusterNetworkInfoStruct new]; + newElement_0.networkID = AsData(entry_0.networkID); + newElement_0.connected = [NSNumber numberWithBool:entry_0.connected]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3894,7 +3884,7 @@ DispatchSuccess(context, objCValue); }; -void MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3909,7 +3899,7 @@ } } -void MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3932,7 +3922,7 @@ DispatchSuccess(context, objCValue); }; -void MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3947,8 +3937,8 @@ } } -void MTRUnitLocalizationEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3970,7 +3960,7 @@ DispatchSuccess(context, objCValue); }; -void MTRUnitLocalizationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3985,7 +3975,7 @@ } } -void MTRUnitLocalizationAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRNetworkCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4008,7 +3998,7 @@ DispatchSuccess(context, objCValue); }; -void MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4023,8 +4013,8 @@ } } -void MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4033,7 +4023,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4046,7 +4036,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4061,7 +4051,7 @@ } } -void MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4084,7 +4074,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4099,8 +4089,8 @@ } } -void MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDiagnosticLogsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4122,7 +4112,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4137,8 +4127,9 @@ } } -void MTRPowerSourceConfigurationEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4146,8 +4137,61 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRGeneralDiagnosticsClusterNetworkInterface * newElement_0; + newElement_0 = [MTRGeneralDiagnosticsClusterNetworkInterface new]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + newElement_0.isOperational = [NSNumber numberWithBool:entry_0.isOperational]; + if (entry_0.offPremiseServicesReachableIPv4.IsNull()) { + newElement_0.offPremiseServicesReachableIPv4 = nil; + } else { + newElement_0.offPremiseServicesReachableIPv4 = + [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv4.Value()]; + } + if (entry_0.offPremiseServicesReachableIPv6.IsNull()) { + newElement_0.offPremiseServicesReachableIPv6 = nil; + } else { + newElement_0.offPremiseServicesReachableIPv6 = + [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6.Value()]; + } + newElement_0.hardwareAddress = AsData(entry_0.hardwareAddress); + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.IPv4Addresses.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSData * newElement_2; + newElement_2 = AsData(entry_2); + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.iPv4Addresses = array_2; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.IPv6Addresses.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSData * newElement_2; + newElement_2 = AsData(entry_2); + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.iPv6Addresses = array_2; + } + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4160,7 +4204,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceConfigurationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4175,8 +4219,8 @@ } } -void MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4185,7 +4229,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4198,7 +4242,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4213,8 +4257,8 @@ } } -void MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4236,7 +4280,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4251,8 +4295,8 @@ } } -void MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4274,7 +4318,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4289,8 +4333,8 @@ } } -void MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4299,7 +4343,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4312,7 +4356,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4327,7 +4371,7 @@ } } -void MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4350,7 +4394,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4365,8 +4409,8 @@ } } -void MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4388,7 +4432,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4403,8 +4447,9 @@ } } -void MTRPowerSourceEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetricsStruct::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4412,8 +4457,34 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRSoftwareDiagnosticsClusterThreadMetricsStruct * newElement_0; + newElement_0 = [MTRSoftwareDiagnosticsClusterThreadMetricsStruct new]; + newElement_0.id = [NSNumber numberWithUnsignedLongLong:entry_0.id]; + if (entry_0.name.HasValue()) { + newElement_0.name = AsString(entry_0.name.Value()); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + } else { + newElement_0.name = nil; + } + if (entry_0.stackFreeCurrent.HasValue()) { + newElement_0.stackFreeCurrent = [NSNumber numberWithUnsignedInt:entry_0.stackFreeCurrent.Value()]; + } else { + newElement_0.stackFreeCurrent = nil; + } + if (entry_0.stackFreeMinimum.HasValue()) { + newElement_0.stackFreeMinimum = [NSNumber numberWithUnsignedInt:entry_0.stackFreeMinimum.Value()]; + } else { + newElement_0.stackFreeMinimum = nil; + } + if (entry_0.stackSize.HasValue()) { + newElement_0.stackSize = [NSNumber numberWithUnsignedInt:entry_0.stackSize.Value()]; + } else { + newElement_0.stackSize = nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4426,7 +4497,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4441,8 +4512,8 @@ } } -void MTRPowerSourceAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4464,7 +4535,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4479,17 +4550,30 @@ } } -void MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType & value) +void MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nonnull objCValue; - objCValue = [MTRGeneralCommissioningClusterBasicCommissioningInfo new]; - objCValue.failSafeExpiryLengthSeconds = [NSNumber numberWithUnsignedShort:value.failSafeExpiryLengthSeconds]; - objCValue.maxCumulativeFailsafeSeconds = [NSNumber numberWithUnsignedShort:value.maxCumulativeFailsafeSeconds]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + 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 MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4504,8 +4588,8 @@ } } -void MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4527,7 +4611,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4542,8 +4626,9 @@ } } -void MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThreadNetworkDiagnosticsNeighborTableListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTableStruct::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4551,8 +4636,30 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRThreadNetworkDiagnosticsClusterNeighborTableStruct * newElement_0; + newElement_0 = [MTRThreadNetworkDiagnosticsClusterNeighborTableStruct new]; + newElement_0.extAddress = [NSNumber numberWithUnsignedLongLong:entry_0.extAddress]; + newElement_0.age = [NSNumber numberWithUnsignedInt:entry_0.age]; + newElement_0.rloc16 = [NSNumber numberWithUnsignedShort:entry_0.rloc16]; + newElement_0.linkFrameCounter = [NSNumber numberWithUnsignedInt:entry_0.linkFrameCounter]; + newElement_0.mleFrameCounter = [NSNumber numberWithUnsignedInt:entry_0.mleFrameCounter]; + newElement_0.lqi = [NSNumber numberWithUnsignedChar:entry_0.lqi]; + if (entry_0.averageRssi.IsNull()) { + newElement_0.averageRssi = nil; + } else { + newElement_0.averageRssi = [NSNumber numberWithChar:entry_0.averageRssi.Value()]; + } + if (entry_0.lastRssi.IsNull()) { + newElement_0.lastRssi = nil; + } else { + newElement_0.lastRssi = [NSNumber numberWithChar:entry_0.lastRssi.Value()]; + } + newElement_0.frameErrorRate = [NSNumber numberWithUnsignedChar:entry_0.frameErrorRate]; + newElement_0.messageErrorRate = [NSNumber numberWithUnsignedChar:entry_0.messageErrorRate]; + newElement_0.rxOnWhenIdle = [NSNumber numberWithBool:entry_0.rxOnWhenIdle]; + newElement_0.fullThreadDevice = [NSNumber numberWithBool:entry_0.fullThreadDevice]; + newElement_0.fullNetworkData = [NSNumber numberWithBool:entry_0.fullNetworkData]; + newElement_0.isChild = [NSNumber numberWithBool:entry_0.isChild]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4565,7 +4672,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsNeighborTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4580,8 +4687,9 @@ } } -void MTRGeneralCommissioningEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThreadNetworkDiagnosticsRouteTableListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::RouteTableStruct::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4589,8 +4697,18 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRThreadNetworkDiagnosticsClusterRouteTableStruct * newElement_0; + newElement_0 = [MTRThreadNetworkDiagnosticsClusterRouteTableStruct new]; + newElement_0.extAddress = [NSNumber numberWithUnsignedLongLong:entry_0.extAddress]; + newElement_0.rloc16 = [NSNumber numberWithUnsignedShort:entry_0.rloc16]; + newElement_0.routerId = [NSNumber numberWithUnsignedChar:entry_0.routerId]; + newElement_0.nextHop = [NSNumber numberWithUnsignedChar:entry_0.nextHop]; + newElement_0.pathCost = [NSNumber numberWithUnsignedChar:entry_0.pathCost]; + newElement_0.lqiIn = [NSNumber numberWithUnsignedChar:entry_0.LQIIn]; + newElement_0.lqiOut = [NSNumber numberWithUnsignedChar:entry_0.LQIOut]; + newElement_0.age = [NSNumber numberWithUnsignedChar:entry_0.age]; + newElement_0.allocated = [NSNumber numberWithBool:entry_0.allocated]; + newElement_0.linkEstablished = [NSNumber numberWithBool:entry_0.linkEstablished]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4603,7 +4721,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsRouteTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4618,8 +4736,78 @@ } } -void MTRGeneralCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & + value) +{ + MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [MTRThreadNetworkDiagnosticsClusterSecurityPolicy new]; + objCValue.rotationTime = [NSNumber numberWithUnsignedShort:value.Value().rotationTime]; + objCValue.flags = [NSNumber numberWithUnsignedShort:value.Value().flags]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> & value) +{ + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents new]; + objCValue.activeTimestampPresent = [NSNumber numberWithBool:value.Value().activeTimestampPresent]; + objCValue.pendingTimestampPresent = [NSNumber numberWithBool:value.Value().pendingTimestampPresent]; + objCValue.masterKeyPresent = [NSNumber numberWithBool:value.Value().masterKeyPresent]; + objCValue.networkNamePresent = [NSNumber numberWithBool:value.Value().networkNamePresent]; + objCValue.extendedPanIdPresent = [NSNumber numberWithBool:value.Value().extendedPanIdPresent]; + objCValue.meshLocalPrefixPresent = [NSNumber numberWithBool:value.Value().meshLocalPrefixPresent]; + objCValue.delayPresent = [NSNumber numberWithBool:value.Value().delayPresent]; + objCValue.panIdPresent = [NSNumber numberWithBool:value.Value().panIdPresent]; + objCValue.channelPresent = [NSNumber numberWithBool:value.Value().channelPresent]; + objCValue.pskcPresent = [NSNumber numberWithBool:value.Value().pskcPresent]; + objCValue.securityPolicyPresent = [NSNumber numberWithBool:value.Value().securityPolicyPresent]; + objCValue.channelMaskPresent = [NSNumber numberWithBool:value.Value().channelMaskPresent]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge::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 MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4628,7 +4816,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4641,7 +4829,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4656,9 +4844,8 @@ } } -void MTRNetworkCommissioningNetworksListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::NetworkCommissioning::Structs::NetworkInfoStruct::DecodableType> & value) +void MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4666,10 +4853,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRNetworkCommissioningClusterNetworkInfoStruct * newElement_0; - newElement_0 = [MTRNetworkCommissioningClusterNetworkInfoStruct new]; - newElement_0.networkID = AsData(entry_0.networkID); - newElement_0.connected = [NSNumber numberWithBool:entry_0.connected]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4682,7 +4867,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4697,7 +4882,7 @@ } } -void MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4720,7 +4905,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4735,8 +4920,8 @@ } } -void MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4758,7 +4943,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4773,8 +4958,8 @@ } } -void MTRNetworkCommissioningEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4796,7 +4981,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4811,8 +4996,8 @@ } } -void MTRNetworkCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4834,7 +5019,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4849,8 +5034,8 @@ } } -void MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4872,7 +5057,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4887,7 +5072,7 @@ } } -void MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4910,7 +5095,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4925,8 +5110,8 @@ } } -void MTRDiagnosticLogsEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4948,7 +5133,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDiagnosticLogsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4963,7 +5148,7 @@ } } -void MTRDiagnosticLogsAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4986,7 +5171,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5001,84 +5186,21 @@ } } -void MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & - value) -{ - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRGeneralDiagnosticsClusterNetworkInterface * newElement_0; - newElement_0 = [MTRGeneralDiagnosticsClusterNetworkInterface new]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - newElement_0.isOperational = [NSNumber numberWithBool:entry_0.isOperational]; - if (entry_0.offPremiseServicesReachableIPv4.IsNull()) { - newElement_0.offPremiseServicesReachableIPv4 = nil; - } else { - newElement_0.offPremiseServicesReachableIPv4 = - [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv4.Value()]; - } - if (entry_0.offPremiseServicesReachableIPv6.IsNull()) { - newElement_0.offPremiseServicesReachableIPv6 = nil; - } else { - newElement_0.offPremiseServicesReachableIPv6 = - [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6.Value()]; - } - newElement_0.hardwareAddress = AsData(entry_0.hardwareAddress); - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.IPv4Addresses.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSData * newElement_2; - newElement_2 = AsData(entry_2); - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.iPv4Addresses = array_2; - } - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.IPv6Addresses.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSData * newElement_2; - newElement_2 = AsData(entry_2); - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.iPv6Addresses = array_2; - } - newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; +void MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType & value) +{ + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nonnull objCValue; + objCValue = [MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct new]; + objCValue.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.finish)]; + if (value.primaryColor.IsNull()) { + objCValue.primaryColor = nil; + } else { + objCValue.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.primaryColor.Value())]; } DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5093,8 +5215,8 @@ } } -void MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5103,7 +5225,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5116,7 +5238,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5131,8 +5253,8 @@ } } -void MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5141,7 +5263,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5154,7 +5276,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5169,8 +5291,8 @@ } } -void MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5179,7 +5301,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5192,7 +5314,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5207,7 +5329,7 @@ } } -void MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRSwitchGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -5230,7 +5352,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5245,7 +5367,7 @@ } } -void MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRSwitchAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -5268,7 +5390,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5283,8 +5405,8 @@ } } -void MTRGeneralDiagnosticsEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRSwitchAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5306,7 +5428,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5321,8 +5443,8 @@ } } -void MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5344,7 +5466,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5359,9 +5481,8 @@ } } -void MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetricsStruct::DecodableType> & value) +void MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5369,34 +5490,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRSoftwareDiagnosticsClusterThreadMetricsStruct * newElement_0; - newElement_0 = [MTRSoftwareDiagnosticsClusterThreadMetricsStruct new]; - newElement_0.id = [NSNumber numberWithUnsignedLongLong:entry_0.id]; - if (entry_0.name.HasValue()) { - newElement_0.name = AsString(entry_0.name.Value()); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } else { - newElement_0.name = nil; - } - if (entry_0.stackFreeCurrent.HasValue()) { - newElement_0.stackFreeCurrent = [NSNumber numberWithUnsignedInt:entry_0.stackFreeCurrent.Value()]; - } else { - newElement_0.stackFreeCurrent = nil; - } - if (entry_0.stackFreeMinimum.HasValue()) { - newElement_0.stackFreeMinimum = [NSNumber numberWithUnsignedInt:entry_0.stackFreeMinimum.Value()]; - } else { - newElement_0.stackFreeMinimum = nil; - } - if (entry_0.stackSize.HasValue()) { - newElement_0.stackSize = [NSNumber numberWithUnsignedInt:entry_0.stackSize.Value()]; - } else { - newElement_0.stackSize = nil; - } + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5409,7 +5504,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5424,8 +5519,8 @@ } } -void MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5447,7 +5542,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5462,8 +5557,9 @@ } } -void MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROperationalCredentialsNOCsListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5471,8 +5567,15 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTROperationalCredentialsClusterNOCStruct * newElement_0; + newElement_0 = [MTROperationalCredentialsClusterNOCStruct new]; + newElement_0.noc = AsData(entry_0.noc); + if (entry_0.icac.IsNull()) { + newElement_0.icac = nil; + } else { + newElement_0.icac = AsData(entry_0.icac.Value()); + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5485,7 +5588,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5500,8 +5603,9 @@ } } -void MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROperationalCredentialsFabricsListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5509,8 +5613,19 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTROperationalCredentialsClusterFabricDescriptorStruct * newElement_0; + newElement_0 = [MTROperationalCredentialsClusterFabricDescriptorStruct new]; + newElement_0.rootPublicKey = AsData(entry_0.rootPublicKey); + newElement_0.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.vendorID)]; + newElement_0.fabricID = [NSNumber numberWithUnsignedLongLong:entry_0.fabricID]; + newElement_0.nodeID = [NSNumber numberWithUnsignedLongLong:entry_0.nodeID]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5523,7 +5638,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSoftwareDiagnosticsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5538,8 +5653,8 @@ } } -void MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5547,8 +5662,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + NSData * newElement_0; + newElement_0 = AsData(entry_0); [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5561,7 +5676,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5576,9 +5691,8 @@ } } -void MTRThreadNetworkDiagnosticsNeighborTableListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTableStruct::DecodableType> & value) +void MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5586,30 +5700,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRThreadNetworkDiagnosticsClusterNeighborTableStruct * newElement_0; - newElement_0 = [MTRThreadNetworkDiagnosticsClusterNeighborTableStruct new]; - newElement_0.extAddress = [NSNumber numberWithUnsignedLongLong:entry_0.extAddress]; - newElement_0.age = [NSNumber numberWithUnsignedInt:entry_0.age]; - newElement_0.rloc16 = [NSNumber numberWithUnsignedShort:entry_0.rloc16]; - newElement_0.linkFrameCounter = [NSNumber numberWithUnsignedInt:entry_0.linkFrameCounter]; - newElement_0.mleFrameCounter = [NSNumber numberWithUnsignedInt:entry_0.mleFrameCounter]; - newElement_0.lqi = [NSNumber numberWithUnsignedChar:entry_0.lqi]; - if (entry_0.averageRssi.IsNull()) { - newElement_0.averageRssi = nil; - } else { - newElement_0.averageRssi = [NSNumber numberWithChar:entry_0.averageRssi.Value()]; - } - if (entry_0.lastRssi.IsNull()) { - newElement_0.lastRssi = nil; - } else { - newElement_0.lastRssi = [NSNumber numberWithChar:entry_0.lastRssi.Value()]; - } - newElement_0.frameErrorRate = [NSNumber numberWithUnsignedChar:entry_0.frameErrorRate]; - newElement_0.messageErrorRate = [NSNumber numberWithUnsignedChar:entry_0.messageErrorRate]; - newElement_0.rxOnWhenIdle = [NSNumber numberWithBool:entry_0.rxOnWhenIdle]; - newElement_0.fullThreadDevice = [NSNumber numberWithBool:entry_0.fullThreadDevice]; - newElement_0.fullNetworkData = [NSNumber numberWithBool:entry_0.fullNetworkData]; - newElement_0.isChild = [NSNumber numberWithBool:entry_0.isChild]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5622,7 +5714,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsNeighborTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5637,9 +5729,8 @@ } } -void MTRThreadNetworkDiagnosticsRouteTableListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::RouteTableStruct::DecodableType> & value) +void MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5647,18 +5738,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRThreadNetworkDiagnosticsClusterRouteTableStruct * newElement_0; - newElement_0 = [MTRThreadNetworkDiagnosticsClusterRouteTableStruct new]; - newElement_0.extAddress = [NSNumber numberWithUnsignedLongLong:entry_0.extAddress]; - newElement_0.rloc16 = [NSNumber numberWithUnsignedShort:entry_0.rloc16]; - newElement_0.routerId = [NSNumber numberWithUnsignedChar:entry_0.routerId]; - newElement_0.nextHop = [NSNumber numberWithUnsignedChar:entry_0.nextHop]; - newElement_0.pathCost = [NSNumber numberWithUnsignedChar:entry_0.pathCost]; - newElement_0.lqiIn = [NSNumber numberWithUnsignedChar:entry_0.LQIIn]; - newElement_0.lqiOut = [NSNumber numberWithUnsignedChar:entry_0.LQIOut]; - newElement_0.age = [NSNumber numberWithUnsignedChar:entry_0.age]; - newElement_0.allocated = [NSNumber numberWithBool:entry_0.allocated]; - newElement_0.linkEstablished = [NSNumber numberWithBool:entry_0.linkEstablished]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5671,37 +5752,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsRouteTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() -{ - if (!mQueue) { - return; - } - - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; - } -} - -void MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & - value) -{ - MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [MTRThreadNetworkDiagnosticsClusterSecurityPolicy new]; - objCValue.rotationTime = [NSNumber numberWithUnsignedShort:value.Value().rotationTime]; - objCValue.flags = [NSNumber numberWithUnsignedShort:value.Value().flags]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5716,32 +5767,30 @@ } } -void MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> & value) +void MTROperationalCredentialsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents new]; - objCValue.activeTimestampPresent = [NSNumber numberWithBool:value.Value().activeTimestampPresent]; - objCValue.pendingTimestampPresent = [NSNumber numberWithBool:value.Value().pendingTimestampPresent]; - objCValue.masterKeyPresent = [NSNumber numberWithBool:value.Value().masterKeyPresent]; - objCValue.networkNamePresent = [NSNumber numberWithBool:value.Value().networkNamePresent]; - objCValue.extendedPanIdPresent = [NSNumber numberWithBool:value.Value().extendedPanIdPresent]; - objCValue.meshLocalPrefixPresent = [NSNumber numberWithBool:value.Value().meshLocalPrefixPresent]; - objCValue.delayPresent = [NSNumber numberWithBool:value.Value().delayPresent]; - objCValue.panIdPresent = [NSNumber numberWithBool:value.Value().panIdPresent]; - objCValue.channelPresent = [NSNumber numberWithBool:value.Value().channelPresent]; - objCValue.pskcPresent = [NSNumber numberWithBool:value.Value().pskcPresent]; - objCValue.securityPolicyPresent = [NSNumber numberWithBool:value.Value().securityPolicyPresent]; - objCValue.channelMaskPresent = [NSNumber numberWithBool:value.Value().channelMaskPresent]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5756,8 +5805,9 @@ } } -void MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5765,8 +5815,11 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; + newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; + newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; + newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5779,7 +5832,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5794,8 +5847,9 @@ } } -void MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGroupKeyManagementGroupTableListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5803,8 +5857,36 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRGroupKeyManagementClusterGroupInfoMapStruct * newElement_0; + newElement_0 = [MTRGroupKeyManagementClusterGroupInfoMapStruct new]; + newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.endpoints.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.endpoints = array_2; + } + if (entry_0.groupName.HasValue()) { + newElement_0.groupName = AsString(entry_0.groupName.Value()); + if (newElement_0.groupName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + } else { + newElement_0.groupName = nil; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5817,7 +5899,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5832,7 +5914,7 @@ } } -void MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -5855,7 +5937,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5870,8 +5952,8 @@ } } -void MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5893,7 +5975,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5908,7 +5990,7 @@ } } -void MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRGroupKeyManagementAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -5931,7 +6013,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5946,8 +6028,8 @@ } } -void MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFixedLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5955,8 +6037,20 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRFixedLabelClusterLabelStruct * newElement_0; + newElement_0 = [MTRFixedLabelClusterLabelStruct new]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + newElement_0.value = AsString(entry_0.value); + if (newElement_0.value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5969,7 +6063,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5984,7 +6078,7 @@ } } -void MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6007,7 +6101,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6022,8 +6116,8 @@ } } -void MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6045,7 +6139,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6060,7 +6154,7 @@ } } -void MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRFixedLabelAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6083,7 +6177,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6098,8 +6192,8 @@ } } -void MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUserLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6107,8 +6201,20 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRUserLabelClusterLabelStruct * newElement_0; + newElement_0 = [MTRUserLabelClusterLabelStruct new]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + newElement_0.value = AsString(entry_0.value); + if (newElement_0.value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -6121,7 +6227,7 @@ DispatchSuccess(context, objCValue); }; -void MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6136,7 +6242,7 @@ } } -void MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRUserLabelGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6159,7 +6265,7 @@ DispatchSuccess(context, objCValue); }; -void MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6174,8 +6280,8 @@ } } -void MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUserLabelAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6197,7 +6303,7 @@ DispatchSuccess(context, objCValue); }; -void MTREthernetNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6212,7 +6318,7 @@ } } -void MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRUserLabelAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6235,7 +6341,7 @@ DispatchSuccess(context, objCValue); }; -void MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6250,8 +6356,8 @@ } } -void MTRTimeSynchronizationEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6273,36 +6379,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeSynchronizationEventListListAttributeCallbackSubscriptionBridge::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 MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType & value) -{ - MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nonnull objCValue; - objCValue = [MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct new]; - objCValue.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.finish)]; - if (value.primaryColor.IsNull()) { - objCValue.primaryColor = nil; - } else { - objCValue.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.primaryColor.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6317,7 +6394,7 @@ } } -void MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6340,7 +6417,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6355,8 +6432,8 @@ } } -void MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBooleanStateAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6378,7 +6455,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6393,8 +6470,8 @@ } } -void MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRModeSelectSupportedModesListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6402,8 +6479,33 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRModeSelectClusterModeOptionStruct * newElement_0; + newElement_0 = [MTRModeSelectClusterModeOptionStruct new]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.semanticTags.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRModeSelectClusterSemanticTagStruct * newElement_2; + newElement_2 = [MTRModeSelectClusterSemanticTagStruct new]; + newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode)]; + newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.semanticTags = array_2; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -6416,7 +6518,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBridgedDeviceBasicInformationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6431,8 +6533,8 @@ } } -void MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRModeSelectGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6454,7 +6556,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6469,7 +6571,7 @@ } } -void MTRSwitchGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRModeSelectAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6492,7 +6594,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6507,8 +6609,8 @@ } } -void MTRSwitchAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRModeSelectAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6530,7 +6632,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6545,30 +6647,15 @@ } } -void MTRSwitchEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDoorLockCredentialRulesSupportAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRSwitchEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6583,30 +6670,15 @@ } } -void MTRSwitchAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDoorLockSupportedOperatingModesAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6621,30 +6693,15 @@ } } -void MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6659,30 +6716,15 @@ } } -void MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6697,8 +6739,8 @@ } } -void MTRAdministratorCommissioningEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDoorLockGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6720,7 +6762,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6735,8 +6777,8 @@ } } -void MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDoorLockAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6758,7 +6800,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6773,9 +6815,8 @@ } } -void MTROperationalCredentialsNOCsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & - value) +void MTRDoorLockAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6783,15 +6824,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTROperationalCredentialsClusterNOCStruct * newElement_0; - newElement_0 = [MTROperationalCredentialsClusterNOCStruct new]; - newElement_0.noc = AsData(entry_0.noc); - if (entry_0.icac.IsNull()) { - newElement_0.icac = nil; - } else { - newElement_0.icac = AsData(entry_0.icac.Value()); - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -6804,7 +6838,7 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6819,42 +6853,15 @@ } } -void MTROperationalCredentialsFabricsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & value) +void MTRWindowCoveringConfigStatusAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTROperationalCredentialsClusterFabricDescriptorStruct * newElement_0; - newElement_0 = [MTROperationalCredentialsClusterFabricDescriptorStruct new]; - newElement_0.rootPublicKey = AsData(entry_0.rootPublicKey); - newElement_0.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.vendorID)]; - newElement_0.fabricID = [NSNumber numberWithUnsignedLongLong:entry_0.fabricID]; - newElement_0.nodeID = [NSNumber numberWithUnsignedLongLong:entry_0.nodeID]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6869,30 +6876,15 @@ } } -void MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWindowCoveringOperationalStatusAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSData * newElement_0; - newElement_0 = AsData(entry_0); - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6907,30 +6899,15 @@ } } -void MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWindowCoveringModeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6945,30 +6922,15 @@ } } -void MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWindowCoveringSafetyStatusAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6983,8 +6945,8 @@ } } -void MTROperationalCredentialsEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7006,7 +6968,7 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7021,8 +6983,8 @@ } } -void MTROperationalCredentialsAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7044,7 +7006,7 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7059,9 +7021,8 @@ } } -void MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & - value) +void MTRWindowCoveringAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7069,11 +7030,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; - newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -7086,7 +7044,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7101,9 +7059,8 @@ } } -void MTRGroupKeyManagementGroupTableListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & - value) +void MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7111,36 +7068,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRGroupKeyManagementClusterGroupInfoMapStruct * newElement_0; - newElement_0 = [MTRGroupKeyManagementClusterGroupInfoMapStruct new]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.endpoints.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.endpoints = array_2; - } - if (entry_0.groupName.HasValue()) { - newElement_0.groupName = AsString(entry_0.groupName.Value()); - if (newElement_0.groupName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } else { - newElement_0.groupName = nil; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -7153,7 +7082,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7168,7 +7097,7 @@ } } -void MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7191,7 +7120,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7206,8 +7135,8 @@ } } -void MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBarrierControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7229,7 +7158,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7244,30 +7173,15 @@ } } -void MTRGroupKeyManagementEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7282,8 +7196,8 @@ } } -void MTRGroupKeyManagementAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7305,7 +7219,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7320,8 +7234,8 @@ } } -void MTRFixedLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7329,20 +7243,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRFixedLabelClusterLabelStruct * newElement_0; - newElement_0 = [MTRFixedLabelClusterLabelStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - newElement_0.value = AsString(entry_0.value); - if (newElement_0.value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -7355,7 +7257,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7370,8 +7272,8 @@ } } -void MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7393,7 +7295,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7408,7 +7310,7 @@ } } -void MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRThermostatGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7431,7 +7333,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7446,8 +7348,8 @@ } } -void MTRFixedLabelEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThermostatAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7469,7 +7371,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFixedLabelEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7484,7 +7386,7 @@ } } -void MTRFixedLabelAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRThermostatAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7507,7 +7409,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7522,42 +7424,15 @@ } } -void MTRUserLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRFanControlRockSupportAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRUserLabelClusterLabelStruct * newElement_0; - newElement_0 = [MTRUserLabelClusterLabelStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - newElement_0.value = AsString(entry_0.value); - if (newElement_0.value == 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; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlRockSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7572,30 +7447,15 @@ } } -void MTRUserLabelGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFanControlRockSettingAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlRockSettingAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7610,30 +7470,15 @@ } } -void MTRUserLabelAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFanControlWindSupportAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlWindSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7648,30 +7493,15 @@ } } -void MTRUserLabelEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFanControlWindSettingAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRUserLabelEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlWindSettingAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7686,8 +7516,8 @@ } } -void MTRUserLabelAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFanControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7709,7 +7539,7 @@ DispatchSuccess(context, objCValue); }; -void MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7724,8 +7554,8 @@ } } -void MTRProxyConfigurationEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFanControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7747,7 +7577,7 @@ DispatchSuccess(context, objCValue); }; -void MTRProxyConfigurationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7762,8 +7592,8 @@ } } -void MTRProxyDiscoveryEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFanControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7785,7 +7615,7 @@ DispatchSuccess(context, objCValue); }; -void MTRProxyDiscoveryEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7800,8 +7630,8 @@ } } -void MTRProxyValidEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7823,7 +7653,7 @@ DispatchSuccess(context, objCValue); }; -void MTRProxyValidEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7838,7 +7668,7 @@ } } -void MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7861,7 +7691,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7876,8 +7706,8 @@ } } -void MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7899,7 +7729,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7914,8 +7744,8 @@ } } -void MTRBooleanStateEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRColorControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7937,7 +7767,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBooleanStateEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7952,8 +7782,8 @@ } } -void MTRBooleanStateAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRColorControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7975,7 +7805,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7990,8 +7820,8 @@ } } -void MTRModeSelectSupportedModesListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRColorControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7999,33 +7829,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRModeSelectClusterModeOptionStruct * newElement_0; - newElement_0 = [MTRModeSelectClusterModeOptionStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.semanticTags.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - MTRModeSelectClusterSemanticTagStruct * newElement_2; - newElement_2 = [MTRModeSelectClusterSemanticTagStruct new]; - newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode)]; - newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.semanticTags = array_2; - } + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -8038,7 +7843,7 @@ DispatchSuccess(context, objCValue); }; -void MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8053,7 +7858,7 @@ } } -void MTRModeSelectGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8076,7 +7881,7 @@ DispatchSuccess(context, objCValue); }; -void MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8091,7 +7896,7 @@ } } -void MTRModeSelectAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8114,7 +7919,7 @@ DispatchSuccess(context, objCValue); }; -void MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8129,8 +7934,8 @@ } } -void MTRModeSelectEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBallastConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8152,7 +7957,7 @@ DispatchSuccess(context, objCValue); }; -void MTRModeSelectEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8167,8 +7972,8 @@ } } -void MTRModeSelectAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8190,7 +7995,7 @@ DispatchSuccess(context, objCValue); }; -void MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8205,8 +8010,8 @@ } } -void MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8214,13 +8019,8 @@ 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; - } + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -8233,7 +8033,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8248,8 +8048,8 @@ } } -void MTRTemperatureControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8271,7 +8071,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8286,7 +8086,7 @@ } } -void MTRTemperatureControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8309,7 +8109,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8324,8 +8124,8 @@ } } -void MTRTemperatureControlEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8347,7 +8147,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8362,7 +8162,7 @@ } } -void MTRTemperatureControlAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8385,7 +8185,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8400,38 +8200,30 @@ } } -void MTRRefrigeratorAlarmMaskAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedInt:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRRefrigeratorAlarmMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - if (!mQueue) { - return; - } - - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; } -} - -void MTRRefrigeratorAlarmStateAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedInt:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRRefrigeratorAlarmStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8446,15 +8238,30 @@ } } -void MTRRefrigeratorAlarmSupportedAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) +void MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedInt:value.Raw()]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void MTRRefrigeratorAlarmSupportedAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8469,8 +8276,8 @@ } } -void MTRRefrigeratorAlarmGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPressureMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8492,7 +8299,7 @@ DispatchSuccess(context, objCValue); }; -void MTRRefrigeratorAlarmGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8507,7 +8314,7 @@ } } -void MTRRefrigeratorAlarmAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8530,7 +8337,7 @@ DispatchSuccess(context, objCValue); }; -void MTRRefrigeratorAlarmAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8545,8 +8352,8 @@ } } -void MTRRefrigeratorAlarmEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8568,7 +8375,7 @@ DispatchSuccess(context, objCValue); }; -void MTRRefrigeratorAlarmEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8583,7 +8390,7 @@ } } -void MTRRefrigeratorAlarmAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRFlowMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8606,7 +8413,7 @@ DispatchSuccess(context, objCValue); }; -void MTRRefrigeratorAlarmAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8621,7 +8428,7 @@ } } -void MTRAirQualityGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8644,7 +8451,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAirQualityGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8659,7 +8466,7 @@ } } -void MTRAirQualityAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8682,7 +8489,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAirQualityAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8697,8 +8504,8 @@ } } -void MTRAirQualityEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8720,7 +8527,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAirQualityEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8735,30 +8542,38 @@ } } -void MTRAirQualityAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROccupancySensingOccupancyAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void MTROccupancySensingOccupancyAttributeCallbackSubscriptionBridge::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 MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRAirQualityAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8773,7 +8588,7 @@ } } -void MTRSmokeCOAlarmGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8796,7 +8611,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSmokeCOAlarmGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8811,7 +8626,7 @@ } } -void MTRSmokeCOAlarmAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8834,7 +8649,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSmokeCOAlarmAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8849,8 +8664,8 @@ } } -void MTRSmokeCOAlarmEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROccupancySensingAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8872,7 +8687,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSmokeCOAlarmEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8887,8 +8702,8 @@ } } -void MTRSmokeCOAlarmAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8910,7 +8725,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSmokeCOAlarmAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8925,39 +8740,30 @@ } } -void MTROperationalStatePhaseListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable> & value) +void MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - NSArray * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - auto iter_1 = value.Value().begin(); - while (iter_1.Next()) { - auto & entry_1 = iter_1.GetValue(); - NSString * newElement_1; - newElement_1 = AsString(entry_1); - if (newElement_1 == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - [array_1 addObject:newElement_1]; - } - CHIP_ERROR err = iter_1.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_1; + 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 MTROperationalStatePhaseListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8972,9 +8778,8 @@ } } -void MTROperationalStateOperationalStateListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> & value) +void MTRWakeOnLANAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8982,19 +8787,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTROperationalStateClusterOperationalStateStruct * newElement_0; - newElement_0 = [MTROperationalStateClusterOperationalStateStruct new]; - newElement_0.operationalStateID = [NSNumber numberWithUnsignedChar:entry_0.operationalStateID]; - if (entry_0.operationalStateLabel.HasValue()) { - newElement_0.operationalStateLabel = AsString(entry_0.operationalStateLabel.Value()); - if (newElement_0.operationalStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } else { - newElement_0.operationalStateLabel = nil; - } + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -9007,7 +8801,7 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalStateOperationalStateListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9022,26 +8816,62 @@ } } -void MTROperationalStateOperationalStateStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType & value) +void MTRChannelChannelListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { - MTROperationalStateClusterOperationalStateStruct * _Nonnull objCValue; - objCValue = [MTROperationalStateClusterOperationalStateStruct new]; - objCValue.operationalStateID = [NSNumber numberWithUnsignedChar:value.operationalStateID]; - if (value.operationalStateLabel.HasValue()) { - objCValue.operationalStateLabel = AsString(value.operationalStateLabel.Value()); - if (objCValue.operationalStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + 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(); + MTRChannelClusterChannelInfoStruct * newElement_0; + newElement_0 = [MTRChannelClusterChannelInfoStruct new]; + newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; + newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; + if (entry_0.name.HasValue()) { + newElement_0.name = AsString(entry_0.name.Value()); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + } else { + newElement_0.name = nil; + } + if (entry_0.callSign.HasValue()) { + newElement_0.callSign = AsString(entry_0.callSign.Value()); + if (newElement_0.callSign == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + } else { + newElement_0.callSign = nil; + } + if (entry_0.affiliateCallSign.HasValue()) { + newElement_0.affiliateCallSign = AsString(entry_0.affiliateCallSign.Value()); + if (newElement_0.affiliateCallSign == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + } else { + newElement_0.affiliateCallSign = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { OnFailureFn(context, err); return; } - } else { - objCValue.operationalStateLabel = nil; + objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTROperationalStateOperationalStateStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9056,36 +8886,46 @@ } } -void MTROperationalStateOperationalErrorStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType & value) +void MTRChannelLineupStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { - MTROperationalStateClusterErrorStateStruct * _Nonnull objCValue; - objCValue = [MTROperationalStateClusterErrorStateStruct new]; - objCValue.errorStateID = [NSNumber numberWithUnsignedChar:value.errorStateID]; - if (value.errorStateLabel.HasValue()) { - objCValue.errorStateLabel = AsString(value.errorStateLabel.Value()); - if (objCValue.errorStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } + MTRChannelClusterLineupInfoStruct * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; } else { - objCValue.errorStateLabel = nil; - } - if (value.errorStateDetails.HasValue()) { - objCValue.errorStateDetails = AsString(value.errorStateDetails.Value()); - if (objCValue.errorStateDetails == nil) { + objCValue = [MTRChannelClusterLineupInfoStruct new]; + objCValue.operatorName = AsString(value.Value().operatorName); + if (objCValue.operatorName == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; OnFailureFn(context, err); return; } - } else { - objCValue.errorStateDetails = nil; + if (value.Value().lineupName.HasValue()) { + objCValue.lineupName = AsString(value.Value().lineupName.Value()); + if (objCValue.lineupName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + } else { + objCValue.lineupName = nil; + } + if (value.Value().postalCode.HasValue()) { + objCValue.postalCode = AsString(value.Value().postalCode.Value()); + if (objCValue.postalCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + } else { + objCValue.postalCode = nil; + } + objCValue.lineupInfoType = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value().lineupInfoType)]; } DispatchSuccess(context, objCValue); }; -void MTROperationalStateOperationalErrorStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9100,30 +8940,51 @@ } } -void MTROperationalStateGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRChannelCurrentChannelStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; + MTRChannelClusterChannelInfoStruct * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [MTRChannelClusterChannelInfoStruct new]; + objCValue.majorNumber = [NSNumber numberWithUnsignedShort:value.Value().majorNumber]; + objCValue.minorNumber = [NSNumber numberWithUnsignedShort:value.Value().minorNumber]; + if (value.Value().name.HasValue()) { + objCValue.name = AsString(value.Value().name.Value()); + if (objCValue.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + } else { + objCValue.name = nil; } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; + if (value.Value().callSign.HasValue()) { + objCValue.callSign = AsString(value.Value().callSign.Value()); + if (objCValue.callSign == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + } else { + objCValue.callSign = nil; + } + if (value.Value().affiliateCallSign.HasValue()) { + objCValue.affiliateCallSign = AsString(value.Value().affiliateCallSign.Value()); + if (objCValue.affiliateCallSign == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + } else { + objCValue.affiliateCallSign = nil; } - objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTROperationalStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9138,7 +8999,7 @@ } } -void MTROperationalStateAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRChannelGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9161,7 +9022,7 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9176,8 +9037,8 @@ } } -void MTROperationalStateEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRChannelAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9199,7 +9060,7 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalStateEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9214,7 +9075,7 @@ } } -void MTROperationalStateAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRChannelAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9237,7 +9098,7 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9252,8 +9113,9 @@ } } -void MTRHEPAFilterMonitoringGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRTargetNavigatorTargetListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9261,8 +9123,15 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRTargetNavigatorClusterTargetInfoStruct * newElement_0; + newElement_0 = [MTRTargetNavigatorClusterTargetInfoStruct new]; + newElement_0.identifier = [NSNumber numberWithUnsignedChar:entry_0.identifier]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -9275,7 +9144,7 @@ DispatchSuccess(context, objCValue); }; -void MTRHEPAFilterMonitoringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9290,7 +9159,7 @@ } } -void MTRHEPAFilterMonitoringAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9313,7 +9182,7 @@ DispatchSuccess(context, objCValue); }; -void MTRHEPAFilterMonitoringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9328,8 +9197,8 @@ } } -void MTRHEPAFilterMonitoringEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9351,7 +9220,7 @@ DispatchSuccess(context, objCValue); }; -void MTRHEPAFilterMonitoringEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9366,7 +9235,7 @@ } } -void MTRHEPAFilterMonitoringAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRTargetNavigatorAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9389,7 +9258,7 @@ DispatchSuccess(context, objCValue); }; -void MTRHEPAFilterMonitoringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9404,30 +9273,26 @@ } } -void MTRActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & + value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [MTRMediaPlaybackClusterPlaybackPositionStruct new]; + objCValue.updatedAt = [NSNumber numberWithUnsignedLongLong:value.Value().updatedAt]; + if (value.Value().position.IsNull()) { + objCValue.position = nil; + } else { + objCValue.position = [NSNumber numberWithUnsignedLongLong:value.Value().position.Value()]; } - objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTRActivatedCarbonFilterMonitoringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9442,7 +9307,7 @@ } } -void MTRActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9465,7 +9330,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActivatedCarbonFilterMonitoringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9480,8 +9345,8 @@ } } -void MTRActivatedCarbonFilterMonitoringEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9503,7 +9368,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActivatedCarbonFilterMonitoringEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9518,7 +9383,7 @@ } } -void MTRActivatedCarbonFilterMonitoringAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRMediaPlaybackAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9541,7 +9406,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActivatedCarbonFilterMonitoringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9556,84 +9421,44 @@ } } -void MTRDoorLockCredentialRulesSupportAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) +void MTRMediaInputInputListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::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 MTRDoorLockSupportedOperatingModesAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::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 MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::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; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRMediaInputClusterInputInfoStruct * newElement_0; + newElement_0 = [MTRMediaInputClusterInputInfoStruct new]; + newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; + newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + newElement_0.descriptionString = AsString(entry_0.description); + if (newElement_0.descriptionString == 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; } -} - -void MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9648,7 +9473,7 @@ } } -void MTRDoorLockGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRMediaInputGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9671,7 +9496,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9686,7 +9511,7 @@ } } -void MTRDoorLockAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRMediaInputAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9709,7 +9534,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9724,8 +9549,8 @@ } } -void MTRDoorLockEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRMediaInputAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9747,7 +9572,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9762,8 +9587,8 @@ } } -void MTRDoorLockAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRLowPowerGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9785,53 +9610,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::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 MTRWindowCoveringConfigStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() -{ - if (!mQueue) { - return; - } - - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; - } -} - -void MTRWindowCoveringOperationalStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9846,38 +9625,30 @@ } } -void MTRWindowCoveringModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLowPowerAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - if (!mQueue) { - return; - } - - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; } -} - -void MTRWindowCoveringSafetyStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9892,8 +9663,8 @@ } } -void MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRLowPowerAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9915,7 +9686,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9930,7 +9701,7 @@ } } -void MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9953,7 +9724,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9968,8 +9739,8 @@ } } -void MTRWindowCoveringEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9991,7 +9762,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10006,7 +9777,7 @@ } } -void MTRWindowCoveringAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRKeypadInputAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10029,7 +9800,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10044,8 +9815,8 @@ } } -void MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRContentLauncherAcceptHeaderListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10053,8 +9824,13 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + 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(); @@ -10067,7 +9843,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10082,7 +9858,7 @@ } } -void MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10105,7 +9881,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10120,8 +9896,8 @@ } } -void MTRBarrierControlEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10143,7 +9919,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBarrierControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10158,7 +9934,7 @@ } } -void MTRBarrierControlAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRContentLauncherAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10181,7 +9957,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10196,15 +9972,38 @@ } } -void MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) +void MTRAudioOutputOutputListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRAudioOutputClusterOutputInfoStruct * newElement_0; + newElement_0 = [MTRAudioOutputClusterOutputInfoStruct new]; + newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; + newElement_0.outputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.outputType)]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == 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 MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10219,7 +10018,7 @@ } } -void MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10242,7 +10041,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10257,7 +10056,7 @@ } } -void MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10280,7 +10079,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10295,8 +10094,8 @@ } } -void MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAudioOutputAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10318,7 +10117,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10333,8 +10132,8 @@ } } -void MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRApplicationLauncherCatalogListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10343,7 +10142,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -10356,7 +10155,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10371,30 +10170,33 @@ } } -void MTRThermostatGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & + value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { + MTRApplicationLauncherClusterApplicationEPStruct * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [MTRApplicationLauncherClusterApplicationEPStruct new]; + objCValue.application = [MTRApplicationLauncherClusterApplicationStruct new]; + objCValue.application.catalogVendorID = [NSNumber numberWithUnsignedShort:value.Value().application.catalogVendorID]; + objCValue.application.applicationID = AsString(value.Value().application.applicationID); + if (objCValue.application.applicationID == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; OnFailureFn(context, err); return; } - objCValue = array_0; + if (value.Value().endpoint.HasValue()) { + objCValue.endpoint = [NSNumber numberWithUnsignedShort:value.Value().endpoint.Value()]; + } else { + objCValue.endpoint = nil; + } } DispatchSuccess(context, objCValue); }; -void MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10409,7 +10211,7 @@ } } -void MTRThermostatAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10432,7 +10234,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10447,8 +10249,8 @@ } } -void MTRThermostatEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10470,7 +10272,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10485,7 +10287,7 @@ } } -void MTRThermostatAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRApplicationLauncherAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10508,53 +10310,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::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 MTRFanControlRockSupportAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRFanControlRockSupportAttributeCallbackSubscriptionBridge::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 MTRFanControlRockSettingAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRFanControlRockSettingAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10569,38 +10325,22 @@ } } -void MTRFanControlWindSupportAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRFanControlWindSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationBasicApplicationStructAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType & value) { - if (!mQueue) { + MTRApplicationBasicClusterApplicationStruct * _Nonnull objCValue; + objCValue = [MTRApplicationBasicClusterApplicationStruct new]; + objCValue.catalogVendorID = [NSNumber numberWithUnsignedShort:value.catalogVendorID]; + objCValue.applicationID = AsString(value.applicationID); + if (objCValue.applicationID == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); 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 MTRFanControlWindSettingAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRFanControlWindSettingAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10615,8 +10355,8 @@ } } -void MTRFanControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10625,7 +10365,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -10638,7 +10378,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10653,7 +10393,7 @@ } } -void MTRFanControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10676,7 +10416,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10691,8 +10431,8 @@ } } -void MTRFanControlEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10714,7 +10454,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFanControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10729,7 +10469,7 @@ } } -void MTRFanControlAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRApplicationBasicAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10752,7 +10492,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10767,7 +10507,7 @@ } } -void MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10790,7 +10530,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10805,7 +10545,7 @@ } } -void MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10828,7 +10568,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10843,8 +10583,8 @@ } } -void MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAccountLoginAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10866,7 +10606,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10881,8 +10621,8 @@ } } -void MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10904,7 +10644,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10919,7 +10659,7 @@ } } -void MTRColorControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10942,7 +10682,7 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10957,8 +10697,8 @@ } } -void MTRColorControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRElectricalMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10980,7 +10720,7 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10995,30 +10735,15 @@ } } -void MTRColorControlEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingBitmap8AttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRColorControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11033,182 +10758,15 @@ } } -void MTRColorControlAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingBitmap16AttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } - DispatchSuccess(context, objCValue); -}; - -void MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::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 MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge::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 MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge::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 MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRBallastConfigurationEventListListAttributeCallbackBridge::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 MTRBallastConfigurationEventListListAttributeCallbackSubscriptionBridge::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 MTRBallastConfigurationAttributeListListAttributeCallbackBridge::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; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11223,30 +10781,15 @@ } } -void MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingBitmap32AttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedInt:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11261,30 +10804,15 @@ } } -void MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingBitmap64AttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedLongLong:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11299,8 +10827,8 @@ } } -void MTRIlluminanceMeasurementEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingListInt8uListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -11309,7 +10837,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -11322,7 +10850,7 @@ DispatchSuccess(context, objCValue); }; -void MTRIlluminanceMeasurementEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11337,8 +10865,8 @@ } } -void MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingListOctetStringListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -11346,8 +10874,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + NSData * newElement_0; + newElement_0 = AsData(entry_0); [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -11360,7 +10888,7 @@ DispatchSuccess(context, objCValue); }; -void MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11375,8 +10903,9 @@ } } -void MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingListStructOctetStringListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -11384,8 +10913,10 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRUnitTestingClusterTestListStructOctet * newElement_0; + newElement_0 = [MTRUnitTestingClusterTestListStructOctet new]; + newElement_0.member1 = [NSNumber numberWithUnsignedLongLong:entry_0.member1]; + newElement_0.member2 = AsData(entry_0.member2); [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -11398,7 +10929,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11413,8 +10944,9 @@ } } -void MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -11422,21 +10954,205 @@ 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; - } + MTRUnitTestingClusterNullablesAndOptionalsStruct * newElement_0; + newElement_0 = [MTRUnitTestingClusterNullablesAndOptionalsStruct new]; + if (entry_0.nullableInt.IsNull()) { + newElement_0.nullableInt = nil; + } else { + newElement_0.nullableInt = [NSNumber numberWithUnsignedShort:entry_0.nullableInt.Value()]; + } + if (entry_0.optionalInt.HasValue()) { + newElement_0.optionalInt = [NSNumber numberWithUnsignedShort:entry_0.optionalInt.Value()]; + } else { + newElement_0.optionalInt = nil; + } + if (entry_0.nullableOptionalInt.HasValue()) { + if (entry_0.nullableOptionalInt.Value().IsNull()) { + newElement_0.nullableOptionalInt = nil; + } else { + newElement_0.nullableOptionalInt = + [NSNumber numberWithUnsignedShort:entry_0.nullableOptionalInt.Value().Value()]; + } + } else { + newElement_0.nullableOptionalInt = nil; + } + if (entry_0.nullableString.IsNull()) { + newElement_0.nullableString = nil; + } else { + newElement_0.nullableString = AsString(entry_0.nullableString.Value()); + if (newElement_0.nullableString == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + } + if (entry_0.optionalString.HasValue()) { + newElement_0.optionalString = AsString(entry_0.optionalString.Value()); + if (newElement_0.optionalString == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + } else { + newElement_0.optionalString = nil; + } + if (entry_0.nullableOptionalString.HasValue()) { + if (entry_0.nullableOptionalString.Value().IsNull()) { + newElement_0.nullableOptionalString = nil; + } else { + newElement_0.nullableOptionalString = AsString(entry_0.nullableOptionalString.Value().Value()); + if (newElement_0.nullableOptionalString == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + } + } else { + newElement_0.nullableOptionalString = nil; + } + if (entry_0.nullableStruct.IsNull()) { + newElement_0.nullableStruct = nil; + } else { + newElement_0.nullableStruct = [MTRUnitTestingClusterSimpleStruct new]; + newElement_0.nullableStruct.a = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().a]; + newElement_0.nullableStruct.b = [NSNumber numberWithBool:entry_0.nullableStruct.Value().b]; + newElement_0.nullableStruct.c = + [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.nullableStruct.Value().c)]; + newElement_0.nullableStruct.d = AsData(entry_0.nullableStruct.Value().d); + newElement_0.nullableStruct.e = AsString(entry_0.nullableStruct.Value().e); + if (newElement_0.nullableStruct.e == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + newElement_0.nullableStruct.f = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().f.Raw()]; + newElement_0.nullableStruct.g = [NSNumber numberWithFloat:entry_0.nullableStruct.Value().g]; + newElement_0.nullableStruct.h = [NSNumber numberWithDouble:entry_0.nullableStruct.Value().h]; + } + if (entry_0.optionalStruct.HasValue()) { + newElement_0.optionalStruct = [MTRUnitTestingClusterSimpleStruct new]; + newElement_0.optionalStruct.a = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().a]; + newElement_0.optionalStruct.b = [NSNumber numberWithBool:entry_0.optionalStruct.Value().b]; + newElement_0.optionalStruct.c = + [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.optionalStruct.Value().c)]; + newElement_0.optionalStruct.d = AsData(entry_0.optionalStruct.Value().d); + newElement_0.optionalStruct.e = AsString(entry_0.optionalStruct.Value().e); + if (newElement_0.optionalStruct.e == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + newElement_0.optionalStruct.f = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().f.Raw()]; + newElement_0.optionalStruct.g = [NSNumber numberWithFloat:entry_0.optionalStruct.Value().g]; + newElement_0.optionalStruct.h = [NSNumber numberWithDouble:entry_0.optionalStruct.Value().h]; + } else { + newElement_0.optionalStruct = nil; + } + if (entry_0.nullableOptionalStruct.HasValue()) { + if (entry_0.nullableOptionalStruct.Value().IsNull()) { + newElement_0.nullableOptionalStruct = nil; + } else { + newElement_0.nullableOptionalStruct = [MTRUnitTestingClusterSimpleStruct new]; + newElement_0.nullableOptionalStruct.a = + [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().a]; + newElement_0.nullableOptionalStruct.b = + [NSNumber numberWithBool:entry_0.nullableOptionalStruct.Value().Value().b]; + newElement_0.nullableOptionalStruct.c = + [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.nullableOptionalStruct.Value().Value().c)]; + newElement_0.nullableOptionalStruct.d = AsData(entry_0.nullableOptionalStruct.Value().Value().d); + newElement_0.nullableOptionalStruct.e = AsString(entry_0.nullableOptionalStruct.Value().Value().e); + if (newElement_0.nullableOptionalStruct.e == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + newElement_0.nullableOptionalStruct.f = + [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().f.Raw()]; + newElement_0.nullableOptionalStruct.g = + [NSNumber numberWithFloat:entry_0.nullableOptionalStruct.Value().Value().g]; + newElement_0.nullableOptionalStruct.h = + [NSNumber numberWithDouble:entry_0.nullableOptionalStruct.Value().Value().h]; + } + } else { + newElement_0.nullableOptionalStruct = nil; + } + if (entry_0.nullableList.IsNull()) { + newElement_0.nullableList = nil; + } else { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.nullableList.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + NSNumber * newElement_3; + newElement_3 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_3)]; + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.nullableList = array_3; + } + } + if (entry_0.optionalList.HasValue()) { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.optionalList.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + NSNumber * newElement_3; + newElement_3 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_3)]; + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.optionalList = array_3; + } + } else { + newElement_0.optionalList = nil; + } + if (entry_0.nullableOptionalList.HasValue()) { + if (entry_0.nullableOptionalList.Value().IsNull()) { + newElement_0.nullableOptionalList = nil; + } else { + { // Scope for our temporary variables + auto * array_4 = [NSMutableArray new]; + auto iter_4 = entry_0.nullableOptionalList.Value().Value().begin(); + while (iter_4.Next()) { + auto & entry_4 = iter_4.GetValue(); + NSNumber * newElement_4; + newElement_4 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_4)]; + [array_4 addObject:newElement_4]; + } + CHIP_ERROR err = iter_4.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.nullableOptionalList = array_4; + } + } + } else { + newElement_0.nullableOptionalList = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11451,30 +11167,28 @@ } } -void MTRTemperatureMeasurementEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingStructAttrStructAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - 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; + MTRUnitTestingClusterSimpleStruct * _Nonnull objCValue; + objCValue = [MTRUnitTestingClusterSimpleStruct new]; + objCValue.a = [NSNumber numberWithUnsignedChar:value.a]; + objCValue.b = [NSNumber numberWithBool:value.b]; + objCValue.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.c)]; + objCValue.d = AsData(value.d); + objCValue.e = AsString(value.e); + if (objCValue.e == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; } + objCValue.f = [NSNumber numberWithUnsignedChar:value.f.Raw()]; + objCValue.g = [NSNumber numberWithFloat:value.g]; + objCValue.h = [NSNumber numberWithDouble:value.h]; DispatchSuccess(context, objCValue); }; -void MTRTemperatureMeasurementEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11489,8 +11203,8 @@ } } -void MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingListLongOctetStringListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -11498,8 +11212,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + NSData * newElement_0; + newElement_0 = AsData(entry_0); [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -11512,7 +11226,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11527,8 +11241,8 @@ } } -void MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingListFabricScopedListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -11536,46 +11250,69 @@ 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 MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge::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]; + MTRUnitTestingClusterTestFabricScoped * newElement_0; + newElement_0 = [MTRUnitTestingClusterTestFabricScoped new]; + newElement_0.fabricSensitiveInt8u = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveInt8u]; + if (entry_0.optionalFabricSensitiveInt8u.HasValue()) { + newElement_0.optionalFabricSensitiveInt8u = + [NSNumber numberWithUnsignedChar:entry_0.optionalFabricSensitiveInt8u.Value()]; + } else { + newElement_0.optionalFabricSensitiveInt8u = nil; + } + if (entry_0.nullableFabricSensitiveInt8u.IsNull()) { + newElement_0.nullableFabricSensitiveInt8u = nil; + } else { + newElement_0.nullableFabricSensitiveInt8u = + [NSNumber numberWithUnsignedChar:entry_0.nullableFabricSensitiveInt8u.Value()]; + } + if (entry_0.nullableOptionalFabricSensitiveInt8u.HasValue()) { + if (entry_0.nullableOptionalFabricSensitiveInt8u.Value().IsNull()) { + newElement_0.nullableOptionalFabricSensitiveInt8u = nil; + } else { + newElement_0.nullableOptionalFabricSensitiveInt8u = + [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalFabricSensitiveInt8u.Value().Value()]; + } + } else { + newElement_0.nullableOptionalFabricSensitiveInt8u = nil; + } + newElement_0.fabricSensitiveCharString = AsString(entry_0.fabricSensitiveCharString); + if (newElement_0.fabricSensitiveCharString == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + newElement_0.fabricSensitiveStruct = [MTRUnitTestingClusterSimpleStruct new]; + newElement_0.fabricSensitiveStruct.a = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.a]; + newElement_0.fabricSensitiveStruct.b = [NSNumber numberWithBool:entry_0.fabricSensitiveStruct.b]; + newElement_0.fabricSensitiveStruct.c = + [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.fabricSensitiveStruct.c)]; + newElement_0.fabricSensitiveStruct.d = AsData(entry_0.fabricSensitiveStruct.d); + newElement_0.fabricSensitiveStruct.e = AsString(entry_0.fabricSensitiveStruct.e); + if (newElement_0.fabricSensitiveStruct.e == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + newElement_0.fabricSensitiveStruct.f = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.f.Raw()]; + newElement_0.fabricSensitiveStruct.g = [NSNumber numberWithFloat:entry_0.fabricSensitiveStruct.g]; + newElement_0.fabricSensitiveStruct.h = [NSNumber numberWithDouble:entry_0.fabricSensitiveStruct.h]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.fabricSensitiveInt8uList.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedChar:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.fabricSensitiveInt8uList = array_2; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -11588,7 +11325,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11603,30 +11340,19 @@ } } -void MTRPressureMeasurementEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingNullableBitmap8AttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable> & value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedChar:value.Value().Raw()]; } DispatchSuccess(context, objCValue); }; -void MTRPressureMeasurementEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11641,30 +11367,19 @@ } } -void MTRPressureMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingNullableBitmap16AttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable> & value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedShort:value.Value().Raw()]; } DispatchSuccess(context, objCValue); }; -void MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11679,30 +11394,19 @@ } } -void MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingNullableBitmap32AttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable> & value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedInt:value.Value().Raw()]; } DispatchSuccess(context, objCValue); }; -void MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11717,30 +11421,19 @@ } } -void MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingNullableBitmap64AttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable> & value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedLongLong:value.Value().Raw()]; } DispatchSuccess(context, objCValue); }; -void MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11755,30 +11448,32 @@ } } -void MTRFlowMeasurementEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingNullableStructStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { + MTRUnitTestingClusterSimpleStruct * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [MTRUnitTestingClusterSimpleStruct new]; + objCValue.a = [NSNumber numberWithUnsignedChar:value.Value().a]; + objCValue.b = [NSNumber numberWithBool:value.Value().b]; + objCValue.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value().c)]; + objCValue.d = AsData(value.Value().d); + objCValue.e = AsString(value.Value().e); + if (objCValue.e == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; OnFailureFn(context, err); return; } - objCValue = array_0; + objCValue.f = [NSNumber numberWithUnsignedChar:value.Value().f.Raw()]; + objCValue.g = [NSNumber numberWithFloat:value.Value().g]; + objCValue.h = [NSNumber numberWithDouble:value.Value().h]; } DispatchSuccess(context, objCValue); }; -void MTRFlowMeasurementEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11793,8 +11488,8 @@ } } -void MTRFlowMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -11816,7 +11511,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11831,7 +11526,7 @@ } } -void MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -11854,7 +11549,7 @@ DispatchSuccess(context, objCValue); }; -void MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11869,8 +11564,8 @@ } } -void MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUnitTestingAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -11892,7 +11587,7 @@ DispatchSuccess(context, objCValue); }; -void MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11907,8201 +11602,663 @@ } } -void MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGroupsClusterAddGroupResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & data) { - 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 MTRRelativeHumidityMeasurementEventListListAttributeCallbackSubscriptionBridge::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 MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge::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 MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() -{ - if (!mQueue) { - return; - } - - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; - } -} - -void MTROccupancySensingOccupancyAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTROccupancySensingOccupancyAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() -{ - if (!mQueue) { - return; - } - - 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 MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackSubscriptionBridge::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 MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge::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 MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge::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 MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTROccupancySensingEventListListAttributeCallbackBridge::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 MTROccupancySensingEventListListAttributeCallbackSubscriptionBridge::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 MTROccupancySensingAttributeListListAttributeCallbackBridge::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 MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::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 MTRCarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::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 MTRCarbonMonoxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - 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 MTRCarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::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 MTRCarbonMonoxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - 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 MTRCarbonMonoxideConcentrationMeasurementEventListListAttributeCallbackBridge::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 MTRCarbonMonoxideConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge::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 MTRCarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallbackBridge::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 MTRCarbonMonoxideConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge::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 MTRCarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::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 MTRCarbonDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - 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 MTRCarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::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 MTRCarbonDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRCarbonDioxideConcentrationMeasurementEventListListAttributeCallbackBridge::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 MTRCarbonDioxideConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge::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 MTRCarbonDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge::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 MTRCarbonDioxideConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge::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 MTRNitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::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 MTRNitrogenDioxideConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - 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 MTRNitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::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 MTRNitrogenDioxideConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - 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 MTRNitrogenDioxideConcentrationMeasurementEventListListAttributeCallbackBridge::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 MTRNitrogenDioxideConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge::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 MTRNitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallbackBridge::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 MTRNitrogenDioxideConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge::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 MTROzoneConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::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 MTROzoneConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTROzoneConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::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 MTROzoneConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTROzoneConcentrationMeasurementEventListListAttributeCallbackBridge::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 MTROzoneConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge::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 MTROzoneConcentrationMeasurementAttributeListListAttributeCallbackBridge::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 MTROzoneConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge::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 MTRPM25ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::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 MTRPM25ConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRPM25ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::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 MTRPM25ConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRPM25ConcentrationMeasurementEventListListAttributeCallbackBridge::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 MTRPM25ConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge::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 MTRPM25ConcentrationMeasurementAttributeListListAttributeCallbackBridge::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 MTRPM25ConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge::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 MTRFormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::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 MTRFormaldehydeConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRFormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::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 MTRFormaldehydeConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRFormaldehydeConcentrationMeasurementEventListListAttributeCallbackBridge::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 MTRFormaldehydeConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge::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 MTRFormaldehydeConcentrationMeasurementAttributeListListAttributeCallbackBridge::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 MTRFormaldehydeConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge::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 MTRPM1ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::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 MTRPM1ConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRPM1ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::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 MTRPM1ConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRPM1ConcentrationMeasurementEventListListAttributeCallbackBridge::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 MTRPM1ConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge::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 MTRPM1ConcentrationMeasurementAttributeListListAttributeCallbackBridge::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 MTRPM1ConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge::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 MTRPM10ConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::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 MTRPM10ConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRPM10ConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::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 MTRPM10ConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRPM10ConcentrationMeasurementEventListListAttributeCallbackBridge::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 MTRPM10ConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge::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 MTRPM10ConcentrationMeasurementAttributeListListAttributeCallbackBridge::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 MTRPM10ConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge::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 MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::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 MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - 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 MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::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 MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - 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 MTRTotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallbackBridge::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 MTRTotalVolatileOrganicCompoundsConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge:: - 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 MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackBridge::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 MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge:: - 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 MTRRadonConcentrationMeasurementGeneratedCommandListListAttributeCallbackBridge::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 MTRRadonConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRRadonConcentrationMeasurementAcceptedCommandListListAttributeCallbackBridge::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 MTRRadonConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRRadonConcentrationMeasurementEventListListAttributeCallbackBridge::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 MTRRadonConcentrationMeasurementEventListListAttributeCallbackSubscriptionBridge::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 MTRRadonConcentrationMeasurementAttributeListListAttributeCallbackBridge::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 MTRRadonConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge::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 MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge::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 MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge::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 MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRWakeOnLANEventListListAttributeCallbackBridge::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 MTRWakeOnLANEventListListAttributeCallbackSubscriptionBridge::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 MTRWakeOnLANAttributeListListAttributeCallbackBridge::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 MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge::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 MTRChannelChannelListListAttributeCallbackBridge::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(); - MTRChannelClusterChannelInfoStruct * newElement_0; - newElement_0 = [MTRChannelClusterChannelInfoStruct new]; - newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; - newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; - if (entry_0.name.HasValue()) { - newElement_0.name = AsString(entry_0.name.Value()); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } else { - newElement_0.name = nil; - } - if (entry_0.callSign.HasValue()) { - newElement_0.callSign = AsString(entry_0.callSign.Value()); - if (newElement_0.callSign == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } else { - newElement_0.callSign = nil; - } - if (entry_0.affiliateCallSign.HasValue()) { - newElement_0.affiliateCallSign = AsString(entry_0.affiliateCallSign.Value()); - if (newElement_0.affiliateCallSign == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } else { - newElement_0.affiliateCallSign = nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } - DispatchSuccess(context, objCValue); -}; - -void MTRChannelChannelListListAttributeCallbackSubscriptionBridge::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 MTRChannelLineupStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - MTRChannelClusterLineupInfoStruct * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [MTRChannelClusterLineupInfoStruct new]; - objCValue.operatorName = AsString(value.Value().operatorName); - if (objCValue.operatorName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - if (value.Value().lineupName.HasValue()) { - objCValue.lineupName = AsString(value.Value().lineupName.Value()); - if (objCValue.lineupName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } else { - objCValue.lineupName = nil; - } - if (value.Value().postalCode.HasValue()) { - objCValue.postalCode = AsString(value.Value().postalCode.Value()); - if (objCValue.postalCode == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } else { - objCValue.postalCode = nil; - } - objCValue.lineupInfoType = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value().lineupInfoType)]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRChannelLineupStructAttributeCallbackSubscriptionBridge::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 MTRChannelCurrentChannelStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - MTRChannelClusterChannelInfoStruct * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [MTRChannelClusterChannelInfoStruct new]; - objCValue.majorNumber = [NSNumber numberWithUnsignedShort:value.Value().majorNumber]; - objCValue.minorNumber = [NSNumber numberWithUnsignedShort:value.Value().minorNumber]; - if (value.Value().name.HasValue()) { - objCValue.name = AsString(value.Value().name.Value()); - if (objCValue.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } else { - objCValue.name = nil; - } - if (value.Value().callSign.HasValue()) { - objCValue.callSign = AsString(value.Value().callSign.Value()); - if (objCValue.callSign == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } else { - objCValue.callSign = nil; - } - if (value.Value().affiliateCallSign.HasValue()) { - objCValue.affiliateCallSign = AsString(value.Value().affiliateCallSign.Value()); - if (objCValue.affiliateCallSign == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } else { - objCValue.affiliateCallSign = nil; - } - } - DispatchSuccess(context, objCValue); -}; - -void MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::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 MTRChannelGeneratedCommandListListAttributeCallbackBridge::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 MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRChannelAcceptedCommandListListAttributeCallbackBridge::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 MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRChannelEventListListAttributeCallbackBridge::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 MTRChannelEventListListAttributeCallbackSubscriptionBridge::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 MTRChannelAttributeListListAttributeCallbackBridge::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 MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::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 MTRTargetNavigatorTargetListListAttributeCallbackBridge::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(); - MTRTargetNavigatorClusterTargetInfoStruct * newElement_0; - newElement_0 = [MTRTargetNavigatorClusterTargetInfoStruct new]; - newElement_0.identifier = [NSNumber numberWithUnsignedChar:entry_0.identifier]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == 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 MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::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 MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge::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 MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge::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 MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRTargetNavigatorEventListListAttributeCallbackBridge::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 MTRTargetNavigatorEventListListAttributeCallbackSubscriptionBridge::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 MTRTargetNavigatorAttributeListListAttributeCallbackBridge::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 MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::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 MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & - value) -{ - MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [MTRMediaPlaybackClusterPlaybackPositionStruct new]; - objCValue.updatedAt = [NSNumber numberWithUnsignedLongLong:value.Value().updatedAt]; - if (value.Value().position.IsNull()) { - objCValue.position = nil; - } else { - objCValue.position = [NSNumber numberWithUnsignedLongLong:value.Value().position.Value()]; - } - } - DispatchSuccess(context, objCValue); -}; - -void MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() -{ - if (!mQueue) { - return; - } - - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; - } -} - -void MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) -{ - NSArray * _Nonnull objCValue; - { // 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 MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge::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 MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRMediaPlaybackEventListListAttributeCallbackBridge::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 MTRMediaPlaybackEventListListAttributeCallbackSubscriptionBridge::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 MTRMediaPlaybackAttributeListListAttributeCallbackBridge::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 MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::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 MTRMediaInputInputListListAttributeCallbackBridge::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(); - MTRMediaInputClusterInputInfoStruct * newElement_0; - newElement_0 = [MTRMediaInputClusterInputInfoStruct new]; - newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; - newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - newElement_0.descriptionString = AsString(entry_0.description); - if (newElement_0.descriptionString == 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 MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::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 MTRMediaInputGeneratedCommandListListAttributeCallbackBridge::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 MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRMediaInputAcceptedCommandListListAttributeCallbackBridge::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 MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRMediaInputEventListListAttributeCallbackBridge::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 MTRMediaInputEventListListAttributeCallbackSubscriptionBridge::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 MTRMediaInputAttributeListListAttributeCallbackBridge::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 MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::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 MTRLowPowerGeneratedCommandListListAttributeCallbackBridge::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 MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRLowPowerAcceptedCommandListListAttributeCallbackBridge::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 MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRLowPowerEventListListAttributeCallbackBridge::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 MTRLowPowerEventListListAttributeCallbackSubscriptionBridge::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 MTRLowPowerAttributeListListAttributeCallbackBridge::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 MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::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 MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge::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 MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge::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 MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRKeypadInputEventListListAttributeCallbackBridge::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 MTRKeypadInputEventListListAttributeCallbackSubscriptionBridge::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 MTRKeypadInputAttributeListListAttributeCallbackBridge::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 MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::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 MTRContentLauncherAcceptHeaderListAttributeCallbackBridge::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 MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::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 MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge::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 MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge::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 MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRContentLauncherEventListListAttributeCallbackBridge::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 MTRContentLauncherEventListListAttributeCallbackSubscriptionBridge::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 MTRContentLauncherAttributeListListAttributeCallbackBridge::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 MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::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 MTRAudioOutputOutputListListAttributeCallbackBridge::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(); - MTRAudioOutputClusterOutputInfoStruct * newElement_0; - newElement_0 = [MTRAudioOutputClusterOutputInfoStruct new]; - newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; - newElement_0.outputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.outputType)]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == 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 MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::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 MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge::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 MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge::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 MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRAudioOutputEventListListAttributeCallbackBridge::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 MTRAudioOutputEventListListAttributeCallbackSubscriptionBridge::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 MTRAudioOutputAttributeListListAttributeCallbackBridge::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 MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::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 MTRApplicationLauncherCatalogListListAttributeCallbackBridge::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 numberWithUnsignedShort: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 MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::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 MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & - value) -{ - MTRApplicationLauncherClusterApplicationEPStruct * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [MTRApplicationLauncherClusterApplicationEPStruct new]; - objCValue.application = [MTRApplicationLauncherClusterApplicationStruct new]; - objCValue.application.catalogVendorID = [NSNumber numberWithUnsignedShort:value.Value().application.catalogVendorID]; - objCValue.application.applicationID = AsString(value.Value().application.applicationID); - if (objCValue.application.applicationID == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - if (value.Value().endpoint.HasValue()) { - objCValue.endpoint = [NSNumber numberWithUnsignedShort:value.Value().endpoint.Value()]; - } else { - objCValue.endpoint = nil; - } - } - DispatchSuccess(context, objCValue); -}; - -void MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::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 MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge::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 MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge::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 MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRApplicationLauncherEventListListAttributeCallbackBridge::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 MTRApplicationLauncherEventListListAttributeCallbackSubscriptionBridge::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 MTRApplicationLauncherAttributeListListAttributeCallbackBridge::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 MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::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 MTRApplicationBasicApplicationStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType & value) -{ - MTRApplicationBasicClusterApplicationStruct * _Nonnull objCValue; - objCValue = [MTRApplicationBasicClusterApplicationStruct new]; - objCValue.catalogVendorID = [NSNumber numberWithUnsignedShort:value.catalogVendorID]; - objCValue.applicationID = AsString(value.applicationID); - if (objCValue.applicationID == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, objCValue); -}; - -void MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() -{ - if (!mQueue) { - return; - } - - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; - } -} - -void MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) -{ - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - 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 numberWithUnsignedShort:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } - DispatchSuccess(context, objCValue); -}; - -void MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::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 MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge::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 MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::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 MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRApplicationBasicEventListListAttributeCallbackBridge::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 MTRApplicationBasicEventListListAttributeCallbackSubscriptionBridge::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 MTRApplicationBasicAttributeListListAttributeCallbackBridge::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 MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::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 MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge::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 MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge::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 MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRAccountLoginEventListListAttributeCallbackBridge::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 MTRAccountLoginEventListListAttributeCallbackSubscriptionBridge::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 MTRAccountLoginAttributeListListAttributeCallbackBridge::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 MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::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 MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge::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 MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge::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 MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRElectricalMeasurementEventListListAttributeCallbackBridge::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 MTRElectricalMeasurementEventListListAttributeCallbackSubscriptionBridge::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 MTRElectricalMeasurementAttributeListListAttributeCallbackBridge::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 MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::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 MTRUnitTestingBitmap8AttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge::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 MTRUnitTestingBitmap16AttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge::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 MTRUnitTestingBitmap32AttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedInt:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge::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 MTRUnitTestingBitmap64AttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedLongLong:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge::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 MTRUnitTestingListInt8uListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) -{ - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge::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 MTRUnitTestingListOctetStringListAttributeCallbackBridge::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(); - NSData * newElement_0; - newElement_0 = AsData(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 MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge::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 MTRUnitTestingListStructOctetStringListAttributeCallbackBridge::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(); - MTRUnitTestingClusterTestListStructOctet * newElement_0; - newElement_0 = [MTRUnitTestingClusterTestListStructOctet new]; - newElement_0.member1 = [NSNumber numberWithUnsignedLongLong:entry_0.member1]; - newElement_0.member2 = AsData(entry_0.member2); - [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 MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge::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 MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> & value) -{ - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRUnitTestingClusterNullablesAndOptionalsStruct * newElement_0; - newElement_0 = [MTRUnitTestingClusterNullablesAndOptionalsStruct new]; - if (entry_0.nullableInt.IsNull()) { - newElement_0.nullableInt = nil; - } else { - newElement_0.nullableInt = [NSNumber numberWithUnsignedShort:entry_0.nullableInt.Value()]; - } - if (entry_0.optionalInt.HasValue()) { - newElement_0.optionalInt = [NSNumber numberWithUnsignedShort:entry_0.optionalInt.Value()]; - } else { - newElement_0.optionalInt = nil; - } - if (entry_0.nullableOptionalInt.HasValue()) { - if (entry_0.nullableOptionalInt.Value().IsNull()) { - newElement_0.nullableOptionalInt = nil; - } else { - newElement_0.nullableOptionalInt = - [NSNumber numberWithUnsignedShort:entry_0.nullableOptionalInt.Value().Value()]; - } - } else { - newElement_0.nullableOptionalInt = nil; - } - if (entry_0.nullableString.IsNull()) { - newElement_0.nullableString = nil; - } else { - newElement_0.nullableString = AsString(entry_0.nullableString.Value()); - if (newElement_0.nullableString == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } - if (entry_0.optionalString.HasValue()) { - newElement_0.optionalString = AsString(entry_0.optionalString.Value()); - if (newElement_0.optionalString == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } else { - newElement_0.optionalString = nil; - } - if (entry_0.nullableOptionalString.HasValue()) { - if (entry_0.nullableOptionalString.Value().IsNull()) { - newElement_0.nullableOptionalString = nil; - } else { - newElement_0.nullableOptionalString = AsString(entry_0.nullableOptionalString.Value().Value()); - if (newElement_0.nullableOptionalString == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - } - } else { - newElement_0.nullableOptionalString = nil; - } - if (entry_0.nullableStruct.IsNull()) { - newElement_0.nullableStruct = nil; - } else { - newElement_0.nullableStruct = [MTRUnitTestingClusterSimpleStruct new]; - newElement_0.nullableStruct.a = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().a]; - newElement_0.nullableStruct.b = [NSNumber numberWithBool:entry_0.nullableStruct.Value().b]; - newElement_0.nullableStruct.c = - [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.nullableStruct.Value().c)]; - newElement_0.nullableStruct.d = AsData(entry_0.nullableStruct.Value().d); - newElement_0.nullableStruct.e = AsString(entry_0.nullableStruct.Value().e); - if (newElement_0.nullableStruct.e == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - newElement_0.nullableStruct.f = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().f.Raw()]; - newElement_0.nullableStruct.g = [NSNumber numberWithFloat:entry_0.nullableStruct.Value().g]; - newElement_0.nullableStruct.h = [NSNumber numberWithDouble:entry_0.nullableStruct.Value().h]; - } - if (entry_0.optionalStruct.HasValue()) { - newElement_0.optionalStruct = [MTRUnitTestingClusterSimpleStruct new]; - newElement_0.optionalStruct.a = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().a]; - newElement_0.optionalStruct.b = [NSNumber numberWithBool:entry_0.optionalStruct.Value().b]; - newElement_0.optionalStruct.c = - [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.optionalStruct.Value().c)]; - newElement_0.optionalStruct.d = AsData(entry_0.optionalStruct.Value().d); - newElement_0.optionalStruct.e = AsString(entry_0.optionalStruct.Value().e); - if (newElement_0.optionalStruct.e == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - newElement_0.optionalStruct.f = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().f.Raw()]; - newElement_0.optionalStruct.g = [NSNumber numberWithFloat:entry_0.optionalStruct.Value().g]; - newElement_0.optionalStruct.h = [NSNumber numberWithDouble:entry_0.optionalStruct.Value().h]; - } else { - newElement_0.optionalStruct = nil; - } - if (entry_0.nullableOptionalStruct.HasValue()) { - if (entry_0.nullableOptionalStruct.Value().IsNull()) { - newElement_0.nullableOptionalStruct = nil; - } else { - newElement_0.nullableOptionalStruct = [MTRUnitTestingClusterSimpleStruct new]; - newElement_0.nullableOptionalStruct.a = - [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().a]; - newElement_0.nullableOptionalStruct.b = - [NSNumber numberWithBool:entry_0.nullableOptionalStruct.Value().Value().b]; - newElement_0.nullableOptionalStruct.c = - [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.nullableOptionalStruct.Value().Value().c)]; - newElement_0.nullableOptionalStruct.d = AsData(entry_0.nullableOptionalStruct.Value().Value().d); - newElement_0.nullableOptionalStruct.e = AsString(entry_0.nullableOptionalStruct.Value().Value().e); - if (newElement_0.nullableOptionalStruct.e == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - newElement_0.nullableOptionalStruct.f = - [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().f.Raw()]; - newElement_0.nullableOptionalStruct.g = - [NSNumber numberWithFloat:entry_0.nullableOptionalStruct.Value().Value().g]; - newElement_0.nullableOptionalStruct.h = - [NSNumber numberWithDouble:entry_0.nullableOptionalStruct.Value().Value().h]; - } - } else { - newElement_0.nullableOptionalStruct = nil; - } - if (entry_0.nullableList.IsNull()) { - newElement_0.nullableList = nil; - } else { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - auto iter_3 = entry_0.nullableList.Value().begin(); - while (iter_3.Next()) { - auto & entry_3 = iter_3.GetValue(); - NSNumber * newElement_3; - newElement_3 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_3)]; - [array_3 addObject:newElement_3]; - } - CHIP_ERROR err = iter_3.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.nullableList = array_3; - } - } - if (entry_0.optionalList.HasValue()) { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - auto iter_3 = entry_0.optionalList.Value().begin(); - while (iter_3.Next()) { - auto & entry_3 = iter_3.GetValue(); - NSNumber * newElement_3; - newElement_3 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_3)]; - [array_3 addObject:newElement_3]; - } - CHIP_ERROR err = iter_3.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.optionalList = array_3; - } - } else { - newElement_0.optionalList = nil; - } - if (entry_0.nullableOptionalList.HasValue()) { - if (entry_0.nullableOptionalList.Value().IsNull()) { - newElement_0.nullableOptionalList = nil; - } else { - { // Scope for our temporary variables - auto * array_4 = [NSMutableArray new]; - auto iter_4 = entry_0.nullableOptionalList.Value().Value().begin(); - while (iter_4.Next()) { - auto & entry_4 = iter_4.GetValue(); - NSNumber * newElement_4; - newElement_4 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_4)]; - [array_4 addObject:newElement_4]; - } - CHIP_ERROR err = iter_4.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.nullableOptionalList = array_4; - } - } - } else { - newElement_0.nullableOptionalList = nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::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 MTRUnitTestingStructAttrStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value) -{ - MTRUnitTestingClusterSimpleStruct * _Nonnull objCValue; - objCValue = [MTRUnitTestingClusterSimpleStruct new]; - objCValue.a = [NSNumber numberWithUnsignedChar:value.a]; - objCValue.b = [NSNumber numberWithBool:value.b]; - objCValue.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.c)]; - objCValue.d = AsData(value.d); - objCValue.e = AsString(value.e); - if (objCValue.e == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - objCValue.f = [NSNumber numberWithUnsignedChar:value.f.Raw()]; - objCValue.g = [NSNumber numberWithFloat:value.g]; - objCValue.h = [NSNumber numberWithDouble:value.h]; - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge::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 MTRUnitTestingListLongOctetStringListAttributeCallbackBridge::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(); - NSData * newElement_0; - newElement_0 = AsData(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 MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge::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 MTRUnitTestingListFabricScopedListAttributeCallbackBridge::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(); - MTRUnitTestingClusterTestFabricScoped * newElement_0; - newElement_0 = [MTRUnitTestingClusterTestFabricScoped new]; - newElement_0.fabricSensitiveInt8u = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveInt8u]; - if (entry_0.optionalFabricSensitiveInt8u.HasValue()) { - newElement_0.optionalFabricSensitiveInt8u = - [NSNumber numberWithUnsignedChar:entry_0.optionalFabricSensitiveInt8u.Value()]; - } else { - newElement_0.optionalFabricSensitiveInt8u = nil; - } - if (entry_0.nullableFabricSensitiveInt8u.IsNull()) { - newElement_0.nullableFabricSensitiveInt8u = nil; - } else { - newElement_0.nullableFabricSensitiveInt8u = - [NSNumber numberWithUnsignedChar:entry_0.nullableFabricSensitiveInt8u.Value()]; - } - if (entry_0.nullableOptionalFabricSensitiveInt8u.HasValue()) { - if (entry_0.nullableOptionalFabricSensitiveInt8u.Value().IsNull()) { - newElement_0.nullableOptionalFabricSensitiveInt8u = nil; - } else { - newElement_0.nullableOptionalFabricSensitiveInt8u = - [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalFabricSensitiveInt8u.Value().Value()]; - } - } else { - newElement_0.nullableOptionalFabricSensitiveInt8u = nil; - } - newElement_0.fabricSensitiveCharString = AsString(entry_0.fabricSensitiveCharString); - if (newElement_0.fabricSensitiveCharString == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - newElement_0.fabricSensitiveStruct = [MTRUnitTestingClusterSimpleStruct new]; - newElement_0.fabricSensitiveStruct.a = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.a]; - newElement_0.fabricSensitiveStruct.b = [NSNumber numberWithBool:entry_0.fabricSensitiveStruct.b]; - newElement_0.fabricSensitiveStruct.c = - [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.fabricSensitiveStruct.c)]; - newElement_0.fabricSensitiveStruct.d = AsData(entry_0.fabricSensitiveStruct.d); - newElement_0.fabricSensitiveStruct.e = AsString(entry_0.fabricSensitiveStruct.e); - if (newElement_0.fabricSensitiveStruct.e == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - newElement_0.fabricSensitiveStruct.f = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.f.Raw()]; - newElement_0.fabricSensitiveStruct.g = [NSNumber numberWithFloat:entry_0.fabricSensitiveStruct.g]; - newElement_0.fabricSensitiveStruct.h = [NSNumber numberWithDouble:entry_0.fabricSensitiveStruct.h]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.fabricSensitiveInt8uList.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedChar:entry_2]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.fabricSensitiveInt8uList = array_2; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge::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 MTRUnitTestingNullableBitmap8AttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable> & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:value.Value().Raw()]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge::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 MTRUnitTestingNullableBitmap16AttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable> & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedShort:value.Value().Raw()]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge::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 MTRUnitTestingNullableBitmap32AttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable> & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedInt:value.Value().Raw()]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge::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 MTRUnitTestingNullableBitmap64AttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable> & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedLongLong:value.Value().Raw()]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge::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 MTRUnitTestingNullableStructStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - MTRUnitTestingClusterSimpleStruct * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [MTRUnitTestingClusterSimpleStruct new]; - objCValue.a = [NSNumber numberWithUnsignedChar:value.Value().a]; - objCValue.b = [NSNumber numberWithBool:value.Value().b]; - objCValue.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value().c)]; - objCValue.d = AsData(value.Value().d); - objCValue.e = AsString(value.Value().e); - if (objCValue.e == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - objCValue.f = [NSNumber numberWithUnsignedChar:value.Value().f.Raw()]; - objCValue.g = [NSNumber numberWithFloat:value.Value().g]; - objCValue.h = [NSNumber numberWithDouble:value.Value().h]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge::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 MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge::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 MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge::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 MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRUnitTestingEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) -{ - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } - DispatchSuccess(context, objCValue); -}; - -void MTRUnitTestingEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() -{ - if (!mQueue) { - return; - } - - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; - } -} - -void MTRUnitTestingAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) -{ - 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 MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() -{ - if (!mQueue) { - return; - } - - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; - } -} - -void MTRFaultInjectionEventListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) -{ - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } - DispatchSuccess(context, objCValue); -}; - -void MTRFaultInjectionEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() -{ - if (!mQueue) { - return; - } - - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; - } -} - -void MTRGroupsClusterAddGroupResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & data) -{ - auto * response = [MTRGroupsClusterAddGroupResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRGroupsClusterViewGroupResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType & data) -{ - auto * response = [MTRGroupsClusterViewGroupResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRGroupsClusterGetGroupMembershipResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType & data) -{ - auto * response = [MTRGroupsClusterGetGroupMembershipResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRGroupsClusterRemoveGroupResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType & data) -{ - auto * response = [MTRGroupsClusterRemoveGroupResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRScenesClusterAddSceneResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType & data) -{ - auto * response = [MTRScenesClusterAddSceneResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRScenesClusterViewSceneResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & data) -{ - auto * response = [MTRScenesClusterViewSceneResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRScenesClusterRemoveSceneResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & data) -{ - auto * response = [MTRScenesClusterRemoveSceneResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRScenesClusterRemoveAllScenesResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType & data) -{ - auto * response = [MTRScenesClusterRemoveAllScenesResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRScenesClusterStoreSceneResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType & data) -{ - auto * response = [MTRScenesClusterStoreSceneResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRScenesClusterGetSceneMembershipResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & data) -{ - auto * response = [MTRScenesClusterGetSceneMembershipResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRScenesClusterEnhancedAddSceneResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType & data) -{ - auto * response = [MTRScenesClusterEnhancedAddSceneResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRScenesClusterEnhancedViewSceneResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType & data) -{ - auto * response = [MTRScenesClusterEnhancedViewSceneResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRScenesClusterCopySceneResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType & data) -{ - auto * response = [MTRScenesClusterCopySceneResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & data) -{ - auto * response = [MTROTASoftwareUpdateProviderClusterQueryImageResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & data) -{ - auto * response = [MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data) -{ - auto * response = [MTRGeneralCommissioningClusterArmFailSafeResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & data) -{ - auto * response = [MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & data) -{ - auto * response = [MTRGeneralCommissioningClusterCommissioningCompleteResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & data) -{ - auto * response = [MTRNetworkCommissioningClusterScanNetworksResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data) -{ - auto * response = [MTRNetworkCommissioningClusterNetworkConfigResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & data) -{ - auto * response = [MTRNetworkCommissioningClusterConnectNetworkResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & data) -{ - auto * response = [MTRDiagnosticLogsClusterRetrieveLogsResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTROperationalCredentialsClusterAttestationResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & data) -{ - auto * response = [MTROperationalCredentialsClusterAttestationResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType & data) -{ - auto * response = [MTROperationalCredentialsClusterCertificateChainResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTROperationalCredentialsClusterCSRResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType & data) -{ - auto * response = [MTROperationalCredentialsClusterCSRResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTROperationalCredentialsClusterNOCResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType & data) -{ - auto * response = [MTROperationalCredentialsClusterNOCResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & data) -{ - auto * response = [MTRGroupKeyManagementClusterKeySetReadResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & data) -{ - auto * response = [MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTROperationalStateClusterOperationalCommandResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType & data) -{ - auto * response = [MTROperationalStateClusterOperationalCommandResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType & data) -{ - auto * response = [MTRDoorLockClusterGetWeekDayScheduleResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType & data) -{ - auto * response = [MTRDoorLockClusterGetYearDayScheduleResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & data) -{ - auto * response = [MTRDoorLockClusterGetHolidayScheduleResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRDoorLockClusterGetUserResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType & data) -{ - auto * response = [MTRDoorLockClusterGetUserResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRDoorLockClusterSetCredentialResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType & data) -{ - auto * response = [MTRDoorLockClusterSetCredentialResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & data) -{ - auto * response = [MTRDoorLockClusterGetCredentialStatusResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & data) -{ - auto * response = [MTRThermostatClusterGetWeeklyScheduleResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRChannelClusterChangeChannelResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & data) -{ - auto * response = [MTRChannelClusterChangeChannelResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & data) -{ - auto * response = [MTRTargetNavigatorClusterNavigateTargetResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRMediaPlaybackClusterPlaybackResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType & data) -{ - auto * response = [MTRMediaPlaybackClusterPlaybackResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRKeypadInputClusterSendKeyResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType & data) -{ - auto * response = [MTRKeypadInputClusterSendKeyResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRContentLauncherClusterLauncherResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType & data) -{ - auto * response = [MTRContentLauncherClusterLauncherResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRApplicationLauncherClusterLauncherResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType & data) -{ - auto * response = [MTRApplicationLauncherClusterLauncherResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRAccountLoginClusterGetSetupPINResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & data) -{ - auto * response = [MTRAccountLoginClusterGetSetupPINResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRUnitTestingClusterTestSpecificResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & data) -{ - auto * response = [MTRUnitTestingClusterTestSpecificResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & data) -{ - auto * response = [MTRUnitTestingClusterTestAddArgumentsResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & data) -{ - auto * response = [MTRUnitTestingClusterTestSimpleArgumentResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & data) -{ - auto * response = [MTRUnitTestingClusterTestStructArrayArgumentResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & data) -{ - auto * response = [MTRUnitTestingClusterTestListInt8UReverseResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRUnitTestingClusterTestEnumsResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType & data) -{ - auto * response = [MTRUnitTestingClusterTestEnumsResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & data) -{ - auto * response = [MTRUnitTestingClusterTestNullableOptionalResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & data) -{ - auto * response = [MTRUnitTestingClusterTestComplexNullableOptionalResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRUnitTestingClusterBooleanResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType & data) -{ - auto * response = [MTRUnitTestingClusterBooleanResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRUnitTestingClusterSimpleStructResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType & data) -{ - auto * response = [MTRUnitTestingClusterSimpleStructResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & data) -{ - auto * response = [MTRUnitTestingClusterTestEmitTestEventResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & data) -{ - auto * response = [MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams new]; - CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - DispatchSuccess(context, response); -}; - -void MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Identify::EffectIdentifierEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge::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 MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge::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 MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Identify::EffectVariantEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge::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 MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge::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 MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Identify::IdentifyTypeEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge::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 MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge::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 MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OnOff::OnOffDelayedAllOffEffectVariant value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge::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 MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge::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 MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OnOff::OnOffDyingLightEffectVariant value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge::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 MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge::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 MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OnOff::OnOffEffectIdentifier value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge::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 MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge::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 MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OnOff::OnOffStartUpOnOff value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::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 MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::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 MTRLevelControlClusterMoveModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::LevelControl::MoveMode value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge::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 MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge::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 MTRLevelControlClusterStepModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::LevelControl::StepMode value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge::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 MTRNullableLevelControlClusterStepModeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge::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 MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::AccessControl::AccessControlEntryAuthModeEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge::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 MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge::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 MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::AccessControl::AccessControlEntryPrivilegeEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge::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 MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge::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 MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::AccessControl::ChangeTypeEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::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 MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::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 MTRActionsClusterActionErrorEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Actions::ActionErrorEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge::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 MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge::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 MTRActionsClusterActionStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Actions::ActionStateEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge::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 MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge::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 MTRActionsClusterActionTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Actions::ActionTypeEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge::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 MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge::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 MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Actions::EndpointListTypeEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge::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 MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge::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 MTRBasicInformationClusterColorEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::BasicInformation::ColorEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge::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 MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge::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 MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::BasicInformation::ProductFinishEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge::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 MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge::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 MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAApplyUpdateAction value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge::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 MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge::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 MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTADownloadProtocol value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge::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 MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge::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 MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAQueryStatus value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge::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 MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge::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 MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAAnnouncementReason value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge::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 MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge:: - 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 MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge::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 MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge::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 MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge::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 MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge::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 MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackSubscriptionBridge::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 MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackSubscriptionBridge::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 MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackSubscriptionBridge::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 MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackSubscriptionBridge::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 MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::UnitLocalization::TempUnitEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge::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 MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge::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 MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge::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 MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge::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 MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::BatChargeFaultEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge::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 MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge::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 MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::BatChargeLevelEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge::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 MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge::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 MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::BatChargeStateEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge::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 MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge::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 MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge::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 MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge::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 MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::BatFaultEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRPowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge::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 MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge::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 MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge::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 MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge::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 MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge::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 MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge::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 MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge::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 MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge::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 MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::WiredFaultEnum value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); + auto * response = [MTRGroupsClusterAddGroupResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + DispatchSuccess(context, response); }; -void MTRPowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupsClusterViewGroupResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRGroupsClusterViewGroupResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRGroupsClusterGetGroupMembershipResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType & data) +{ + auto * response = [MTRGroupsClusterGetGroupMembershipResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRGroupsClusterRemoveGroupResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType & data) { - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + auto * response = [MTRGroupsClusterRemoveGroupResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } - DispatchSuccess(context, objCValue); + DispatchSuccess(context, response); }; -void MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRScenesClusterAddSceneResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRScenesClusterAddSceneResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRScenesClusterViewSceneResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & data) +{ + auto * response = [MTRScenesClusterViewSceneResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::GeneralCommissioning::CommissioningErrorEnum value) +void MTRScenesClusterRemoveSceneResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & data) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); + auto * response = [MTRScenesClusterRemoveSceneResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + DispatchSuccess(context, response); }; -void MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRScenesClusterRemoveAllScenesResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRScenesClusterRemoveAllScenesResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRScenesClusterStoreSceneResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType & data) +{ + auto * response = [MTRScenesClusterStoreSceneResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRScenesClusterGetSceneMembershipResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & data) { - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + auto * response = [MTRScenesClusterGetSceneMembershipResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } - DispatchSuccess(context, objCValue); + DispatchSuccess(context, response); }; -void MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRScenesClusterEnhancedAddSceneResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRScenesClusterEnhancedAddSceneResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRScenesClusterEnhancedViewSceneResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType & data) +{ + auto * response = [MTRScenesClusterEnhancedViewSceneResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum value) +void MTRScenesClusterCopySceneResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType & data) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); + auto * response = [MTRScenesClusterCopySceneResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + DispatchSuccess(context, response); }; -void MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTROTASoftwareUpdateProviderClusterQueryImageResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & data) +{ + auto * response = [MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data) { - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + auto * response = [MTRGeneralCommissioningClusterArmFailSafeResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } - DispatchSuccess(context, objCValue); + DispatchSuccess(context, response); }; -void MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & data) +{ + auto * response = [MTRGeneralCommissioningClusterCommissioningCompleteResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatusEnum value) +void MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & data) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); + auto * response = [MTRNetworkCommissioningClusterScanNetworksResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + DispatchSuccess(context, response); }; -void MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRNetworkCommissioningClusterNetworkConfigResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & data) +{ + auto * response = [MTRNetworkCommissioningClusterConnectNetworkResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & data) { - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + auto * response = [MTRDiagnosticLogsClusterRetrieveLogsResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } - DispatchSuccess(context, objCValue); + DispatchSuccess(context, response); }; -void MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTROperationalCredentialsClusterAttestationResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTROperationalCredentialsClusterAttestationResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType & data) +{ + auto * response = [MTROperationalCredentialsClusterCertificateChainResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::NetworkCommissioning::WiFiBandEnum value) +void MTROperationalCredentialsClusterCSRResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType & data) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); + auto * response = [MTROperationalCredentialsClusterCSRResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + DispatchSuccess(context, response); }; -void MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsClusterNOCResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTROperationalCredentialsClusterNOCResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & data) +{ + auto * response = [MTRGroupKeyManagementClusterKeySetReadResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & data) { - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + auto * response = [MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } - DispatchSuccess(context, objCValue); + DispatchSuccess(context, response); }; -void MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRDoorLockClusterGetWeekDayScheduleResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType & data) +{ + auto * response = [MTRDoorLockClusterGetYearDayScheduleResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DiagnosticLogs::IntentEnum value) +void MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & data) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); + auto * response = [MTRDoorLockClusterGetHolidayScheduleResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + DispatchSuccess(context, response); }; -void MTRDiagnosticLogsClusterIntentEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterGetUserResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRDoorLockClusterGetUserResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRDoorLockClusterSetCredentialResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType & data) +{ + auto * response = [MTRDoorLockClusterSetCredentialResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & data) { - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + auto * response = [MTRDoorLockClusterGetCredentialStatusResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } - DispatchSuccess(context, objCValue); + DispatchSuccess(context, response); }; -void MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRThermostatClusterGetWeeklyScheduleResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRChannelClusterChangeChannelResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & data) +{ + auto * response = [MTRChannelClusterChangeChannelResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DiagnosticLogs::StatusEnum value) +void MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & data) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); + auto * response = [MTRTargetNavigatorClusterNavigateTargetResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + DispatchSuccess(context, response); }; -void MTRDiagnosticLogsClusterStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaPlaybackClusterPlaybackResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRMediaPlaybackClusterPlaybackResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRKeypadInputClusterSendKeyResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType & data) +{ + auto * response = [MTRKeypadInputClusterSendKeyResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRContentLauncherClusterLauncherResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType & data) { - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + auto * response = [MTRContentLauncherClusterLauncherResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } - DispatchSuccess(context, objCValue); + DispatchSuccess(context, response); }; -void MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationLauncherClusterLauncherResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRApplicationLauncherClusterLauncherResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRAccountLoginClusterGetSetupPINResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & data) +{ + auto * response = [MTRAccountLoginClusterGetSetupPINResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DiagnosticLogs::TransferProtocolEnum value) +void MTRUnitTestingClusterTestSpecificResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & data) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); + auto * response = [MTRUnitTestingClusterTestSpecificResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + DispatchSuccess(context, response); }; -void MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRUnitTestingClusterTestAddArgumentsResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & data) +{ + auto * response = [MTRUnitTestingClusterTestSimpleArgumentResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & data) { - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + auto * response = [MTRUnitTestingClusterTestStructArrayArgumentResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } - DispatchSuccess(context, objCValue); + DispatchSuccess(context, response); }; -void MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRUnitTestingClusterTestListInt8UReverseResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRUnitTestingClusterTestEnumsResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType & data) +{ + auto * response = [MTRUnitTestingClusterTestEnumsResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::GeneralDiagnostics::BootReasonEnum value) +void MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & data) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); + auto * response = [MTRUnitTestingClusterTestNullableOptionalResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + DispatchSuccess(context, response); }; -void MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRUnitTestingClusterTestComplexNullableOptionalResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRUnitTestingClusterBooleanResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType & data) +{ + auto * response = [MTRUnitTestingClusterBooleanResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRUnitTestingClusterSimpleStructResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType & data) { - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + auto * response = [MTRUnitTestingClusterSimpleStructResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } - DispatchSuccess(context, objCValue); + DispatchSuccess(context, response); }; -void MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & data) { - if (!mQueue) { + auto * response = [MTRUnitTestingClusterTestEmitTestEventResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); return; } + DispatchSuccess(context, response); +}; - 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 MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & data) +{ + auto * response = [MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams new]; + CHIP_ERROR err = [response _setFieldsFromDecodableStruct:data]; + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } -} + DispatchSuccess(context, response); +}; -void MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::GeneralDiagnostics::HardwareFaultEnum value) +void MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Identify::EffectIdentifierEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20116,8 +12273,8 @@ } } -void MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20128,7 +12285,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20143,15 +12300,15 @@ } } -void MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::GeneralDiagnostics::InterfaceTypeEnum value) +void MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Identify::EffectVariantEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20166,8 +12323,8 @@ } } -void MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20178,7 +12335,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20193,15 +12350,15 @@ } } -void MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::GeneralDiagnostics::NetworkFaultEnum value) +void MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Identify::IdentifyTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20216,8 +12373,8 @@ } } -void MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20228,7 +12385,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20243,15 +12400,15 @@ } } -void MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::GeneralDiagnostics::RadioFaultEnum value) +void MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OnOff::OnOffDelayedAllOffEffectVariant value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20266,8 +12423,8 @@ } } -void MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20278,7 +12435,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20293,15 +12450,15 @@ } } -void MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ThreadNetworkDiagnostics::ConnectionStatusEnum value) +void MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OnOff::OnOffDyingLightEffectVariant value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20316,8 +12473,8 @@ } } -void MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20328,7 +12485,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20343,15 +12500,15 @@ } } -void MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ThreadNetworkDiagnostics::NetworkFaultEnum value) +void MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OnOff::OnOffEffectIdentifier value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20366,8 +12523,8 @@ } } -void MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20378,7 +12535,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20393,15 +12550,15 @@ } } -void MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ThreadNetworkDiagnostics::RoutingRoleEnum value) +void MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OnOff::OnOffStartUpOnOff value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20416,8 +12573,8 @@ } } -void MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20428,7 +12585,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20443,15 +12600,15 @@ } } -void MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum value) +void MTRLevelControlClusterMoveModeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::LevelControl::MoveMode value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20466,8 +12623,8 @@ } } -void MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20478,8 +12635,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20494,15 +12650,15 @@ } } -void MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum value) +void MTRLevelControlClusterStepModeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::LevelControl::StepMode value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20517,8 +12673,8 @@ } } -void MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableLevelControlClusterStepModeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20529,7 +12685,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20544,15 +12700,15 @@ } } -void MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum value) +void MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::AccessControl::AccessControlEntryAuthModeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20567,8 +12723,8 @@ } } -void MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20579,7 +12735,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableAccessControlClusterAccessControlEntryAuthModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20594,15 +12750,15 @@ } } -void MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum value) +void MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::AccessControl::AccessControlEntryPrivilegeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20617,8 +12773,8 @@ } } -void MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20629,7 +12785,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableAccessControlClusterAccessControlEntryPrivilegeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20644,15 +12800,15 @@ } } -void MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum value) +void MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::AccessControl::ChangeTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20667,8 +12823,8 @@ } } -void MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20679,7 +12835,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20694,15 +12850,15 @@ } } -void MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::TimeSynchronization::GranularityEnum value) +void MTRActionsClusterActionErrorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Actions::ActionErrorEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20717,8 +12873,8 @@ } } -void MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20729,7 +12885,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20744,15 +12900,15 @@ } } -void MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value) +void MTRActionsClusterActionStateEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Actions::ActionStateEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20767,8 +12923,8 @@ } } -void MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20779,7 +12935,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20794,15 +12950,15 @@ } } -void MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::BridgedDeviceBasicInformation::ColorEnum value) +void MTRActionsClusterActionTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Actions::ActionTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20817,8 +12973,8 @@ } } -void MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20829,7 +12985,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20844,15 +13000,15 @@ } } -void MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::BridgedDeviceBasicInformation::ProductFinishEnum value) +void MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Actions::EndpointListTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20867,8 +13023,8 @@ } } -void MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20879,8 +13035,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20895,16 +13050,15 @@ } } -void MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value) +void MTRBasicInformationClusterColorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::BasicInformation::ColorEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20919,8 +13073,8 @@ } } -void MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20931,8 +13085,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20947,15 +13100,15 @@ } } -void MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::AdministratorCommissioning::StatusCode value) +void MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::BasicInformation::ProductFinishEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20970,8 +13123,8 @@ } } -void MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -20982,7 +13135,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -20997,15 +13150,15 @@ } } -void MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OperationalCredentials::CertificateChainTypeEnum value) +void MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAApplyUpdateAction value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21020,8 +13173,8 @@ } } -void MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21032,8 +13185,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21048,15 +13200,15 @@ } } -void MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OperationalCredentials::NodeOperationalCertStatusEnum value) +void MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTADownloadProtocol value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21071,8 +13223,8 @@ } } -void MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21083,8 +13235,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableOTASoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21099,15 +13250,15 @@ } } -void MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicyEnum value) +void MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAQueryStatus value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21122,8 +13273,8 @@ } } -void MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21134,7 +13285,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableOTASoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21149,15 +13300,15 @@ } } -void MTRAirQualityClusterAirQualityEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::AirQuality::AirQualityEnum value) +void MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAAnnouncementReason value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRAirQualityClusterAirQualityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21172,8 +13323,8 @@ } } -void MTRNullableAirQualityClusterAirQualityEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21184,7 +13335,8 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableAirQualityClusterAirQualityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableOTASoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21199,15 +13351,15 @@ } } -void MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) +void MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21222,8 +13374,8 @@ } } -void MTRNullableSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21234,7 +13386,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableSmokeCOAlarmClusterAlarmStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableOTASoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21249,15 +13401,15 @@ } } -void MTRSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value) +void MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21272,8 +13424,8 @@ } } -void MTRNullableSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21284,7 +13436,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableSmokeCOAlarmClusterContaminationStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableOTASoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21299,15 +13451,15 @@ } } -void MTRSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value) +void MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21322,8 +13474,8 @@ } } -void MTRNullableSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21334,7 +13486,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableSmokeCOAlarmClusterEndOfServiceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableTimeFormatLocalizationClusterCalendarTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21349,15 +13501,15 @@ } } -void MTRSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value) +void MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21372,8 +13524,8 @@ } } -void MTRNullableSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21384,7 +13536,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableSmokeCOAlarmClusterExpressedStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableTimeFormatLocalizationClusterHourFormatEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21399,15 +13551,15 @@ } } -void MTRSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value) +void MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::UnitLocalization::TempUnitEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRSmokeCOAlarmClusterMuteStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21422,8 +13574,8 @@ } } -void MTRNullableSmokeCOAlarmClusterMuteStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21434,7 +13586,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableSmokeCOAlarmClusterMuteStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21449,15 +13601,15 @@ } } -void MTRSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value) +void MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value) { NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; + objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRSmokeCOAlarmClusterSensitivityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21472,19 +13624,19 @@ } } -void MTRNullableSmokeCOAlarmClusterSensitivityEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { objCValue = nil; } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value.Value())]; } DispatchSuccess(context, objCValue); }; -void MTRNullableSmokeCOAlarmClusterSensitivityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21499,15 +13651,15 @@ } } -void MTROperationalStateClusterErrorStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OperationalState::ErrorStateEnum value) +void MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatChargeFaultEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTROperationalStateClusterErrorStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21522,8 +13674,8 @@ } } -void MTRNullableOperationalStateClusterErrorStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21534,7 +13686,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOperationalStateClusterErrorStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21549,15 +13701,15 @@ } } -void MTROperationalStateClusterOperationalStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OperationalState::OperationalStateEnum value) +void MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatChargeLevelEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTROperationalStateClusterOperationalStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21572,8 +13724,8 @@ } } -void MTRNullableOperationalStateClusterOperationalStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21584,7 +13736,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOperationalStateClusterOperationalStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21599,15 +13751,15 @@ } } -void MTRHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::HepaFilterMonitoring::ChangeIndicationEnum value) +void MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatChargeStateEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21622,8 +13774,8 @@ } } -void MTRNullableHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21634,7 +13786,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableHEPAFilterMonitoringClusterChangeIndicationEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21649,15 +13801,15 @@ } } -void MTRHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::HepaFilterMonitoring::DegradationDirectionEnum value) +void MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value) { NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; + objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21672,19 +13824,19 @@ } } -void MTRNullableHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { objCValue = nil; } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value.Value())]; } DispatchSuccess(context, objCValue); }; -void MTRNullableHEPAFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21699,15 +13851,15 @@ } } -void MTRActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum value) +void MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatFaultEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21722,8 +13874,8 @@ } } -void MTRNullableActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21734,8 +13886,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableActivatedCarbonFilterMonitoringClusterChangeIndicationEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21750,16 +13901,15 @@ } } -void MTRActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum value) +void MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21774,8 +13924,8 @@ } } -void MTRNullableActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21786,8 +13936,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableActivatedCarbonFilterMonitoringClusterDegradationDirectionEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21802,15 +13951,15 @@ } } -void MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::AlarmCodeEnum value) +void MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterAlarmCodeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21825,8 +13974,8 @@ } } -void MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21837,7 +13986,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21852,15 +14001,15 @@ } } -void MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::CredentialRuleEnum value) +void MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterCredentialRuleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21875,8 +14024,8 @@ } } -void MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21887,7 +14036,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21902,15 +14051,15 @@ } } -void MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::CredentialTypeEnum value) +void MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::WiredFaultEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterCredentialTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21925,8 +14074,8 @@ } } -void MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21937,7 +14086,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21952,15 +14101,15 @@ } } -void MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::DataOperationTypeEnum value) +void MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::GeneralCommissioning::CommissioningErrorEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -21975,8 +14124,8 @@ } } -void MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -21987,7 +14136,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableGeneralCommissioningClusterCommissioningErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22002,15 +14151,15 @@ } } -void MTRDoorLockClusterDlLockStateAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::DlLockState value) +void MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22025,8 +14174,8 @@ } } -void MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22037,7 +14186,8 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22052,15 +14202,15 @@ } } -void MTRDoorLockClusterDlLockTypeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::DlLockType value) +void MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatusEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22075,8 +14225,8 @@ } } -void MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22087,7 +14237,8 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22102,14 +14253,15 @@ } } -void MTRDoorLockClusterDlStatusAttributeCallbackBridge::OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlStatus value) +void MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::NetworkCommissioning::WiFiBandEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNetworkCommissioningClusterWiFiBandEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22124,8 +14276,8 @@ } } -void MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22136,7 +14288,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableNetworkCommissioningClusterWiFiBandEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22151,15 +14303,15 @@ } } -void MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::DoorLockOperationEventCode value) +void MTRDiagnosticLogsClusterIntentEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DiagnosticLogs::IntentEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDiagnosticLogsClusterIntentEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22174,8 +14326,8 @@ } } -void MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22186,7 +14338,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableDiagnosticLogsClusterIntentEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22201,15 +14353,15 @@ } } -void MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::DoorLockProgrammingEventCode value) +void MTRDiagnosticLogsClusterStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DiagnosticLogs::StatusEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDiagnosticLogsClusterStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22224,8 +14376,8 @@ } } -void MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22236,7 +14388,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableDiagnosticLogsClusterStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22251,15 +14403,15 @@ } } -void MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::DoorLockSetPinOrIdStatus value) +void MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DiagnosticLogs::TransferProtocolEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22274,8 +14426,8 @@ } } -void MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22286,7 +14438,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableDiagnosticLogsClusterTransferProtocolEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22301,15 +14453,15 @@ } } -void MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::DoorStateEnum value) +void MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::GeneralDiagnostics::BootReasonEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDoorStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22324,8 +14476,8 @@ } } -void MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22336,7 +14488,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableGeneralDiagnosticsClusterBootReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22351,15 +14503,15 @@ } } -void MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::LockDataTypeEnum value) +void MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::GeneralDiagnostics::HardwareFaultEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterLockDataTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22374,8 +14526,8 @@ } } -void MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22386,7 +14538,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableGeneralDiagnosticsClusterHardwareFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22401,15 +14553,15 @@ } } -void MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::LockOperationTypeEnum value) +void MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::GeneralDiagnostics::InterfaceTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22424,8 +14576,8 @@ } } -void MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22436,7 +14588,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableGeneralDiagnosticsClusterInterfaceTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22451,15 +14603,15 @@ } } -void MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::OperatingModeEnum value) +void MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::GeneralDiagnostics::NetworkFaultEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterOperatingModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22474,8 +14626,8 @@ } } -void MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22486,7 +14638,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableGeneralDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22501,15 +14653,15 @@ } } -void MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::OperationErrorEnum value) +void MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::GeneralDiagnostics::RadioFaultEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterOperationErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22524,8 +14676,8 @@ } } -void MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22536,7 +14688,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableGeneralDiagnosticsClusterRadioFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22550,16 +14702,16 @@ mEstablishedHandler = nil; } } - -void MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::OperationSourceEnum value) + +void MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::ThreadNetworkDiagnostics::ConnectionStatusEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterOperationSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22574,8 +14726,8 @@ } } -void MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22586,7 +14738,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableThreadNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22601,15 +14753,15 @@ } } -void MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::UserStatusEnum value) +void MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::ThreadNetworkDiagnostics::NetworkFaultEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterUserStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22624,8 +14776,8 @@ } } -void MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22636,7 +14788,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22651,15 +14803,15 @@ } } -void MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::DoorLock::UserTypeEnum value) +void MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::ThreadNetworkDiagnostics::RoutingRoleEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterUserTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22674,8 +14826,8 @@ } } -void MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22686,7 +14838,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22701,15 +14853,15 @@ } } -void MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::WindowCovering::EndProductType value) +void MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22724,8 +14876,8 @@ } } -void MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22736,7 +14888,8 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22751,15 +14904,15 @@ } } -void MTRWindowCoveringClusterTypeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::WindowCovering::Type value) +void MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22774,8 +14927,8 @@ } } -void MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22786,7 +14939,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22801,15 +14954,15 @@ } } -void MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value) +void MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22824,8 +14977,8 @@ } } -void MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22836,7 +14989,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22851,15 +15004,15 @@ } } -void MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value) +void MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22874,8 +15027,8 @@ } } -void MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22886,7 +15039,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22901,15 +15054,15 @@ } } -void MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Thermostat::SetpointAdjustMode value) +void MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTREthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22924,8 +15077,8 @@ } } -void MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22936,7 +15089,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22951,15 +15104,15 @@ } } -void MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Thermostat::ThermostatControlSequence value) +void MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::TimeSynchronization::GranularityEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22974,8 +15127,8 @@ } } -void MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22986,7 +15139,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23001,15 +15154,15 @@ } } -void MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Thermostat::ThermostatRunningMode value) +void MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23024,8 +15177,8 @@ } } -void MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23036,7 +15189,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23051,15 +15204,15 @@ } } -void MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Thermostat::ThermostatSystemMode value) +void MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::BridgedDeviceBasicInformation::ColorEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23074,8 +15227,8 @@ } } -void MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23086,7 +15239,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23101,15 +15254,15 @@ } } -void MTRFanControlClusterAirflowDirectionEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::FanControl::AirflowDirectionEnum value) +void MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::BridgedDeviceBasicInformation::ProductFinishEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRFanControlClusterAirflowDirectionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23124,8 +15277,8 @@ } } -void MTRNullableFanControlClusterAirflowDirectionEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23136,7 +15289,8 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFanControlClusterAirflowDirectionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23151,15 +15305,16 @@ } } -void MTRFanControlClusterFanModeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::FanControl::FanModeEnum value) +void MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23174,8 +15329,8 @@ } } -void MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23186,7 +15341,8 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23201,15 +15357,15 @@ } } -void MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::FanControl::FanModeSequenceEnum value) +void MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::AdministratorCommissioning::StatusCode value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23224,8 +15380,8 @@ } } -void MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23236,7 +15392,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23251,15 +15407,15 @@ } } -void MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::FanControl::StepDirectionEnum value) +void MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OperationalCredentials::CertificateChainTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRFanControlClusterStepDirectionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23274,8 +15430,8 @@ } } -void MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23286,7 +15442,8 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23301,15 +15458,15 @@ } } -void MTRColorControlClusterColorLoopActionAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ColorControl::ColorLoopAction value) +void MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OperationalCredentials::NodeOperationalCertStatusEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23324,8 +15481,8 @@ } } -void MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23336,7 +15493,8 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23351,15 +15509,15 @@ } } -void MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ColorControl::ColorLoopDirection value) +void MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicyEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23374,8 +15532,8 @@ } } -void MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23386,7 +15544,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23401,15 +15559,15 @@ } } -void MTRColorControlClusterColorModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ColorControl::ColorMode value) +void MTRDoorLockClusterAlarmCodeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::AlarmCodeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterAlarmCodeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23424,8 +15582,8 @@ } } -void MTRNullableColorControlClusterColorModeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23436,7 +15594,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableDoorLockClusterAlarmCodeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23451,15 +15609,15 @@ } } -void MTRColorControlClusterHueDirectionAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ColorControl::HueDirection value) +void MTRDoorLockClusterCredentialRuleEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::CredentialRuleEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterCredentialRuleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23474,8 +15632,8 @@ } } -void MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23486,7 +15644,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableDoorLockClusterCredentialRuleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23501,15 +15659,15 @@ } } -void MTRColorControlClusterHueMoveModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ColorControl::HueMoveMode value) +void MTRDoorLockClusterCredentialTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::CredentialTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterCredentialTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23524,8 +15682,8 @@ } } -void MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23536,7 +15694,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableDoorLockClusterCredentialTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23551,15 +15709,15 @@ } } -void MTRColorControlClusterHueStepModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ColorControl::HueStepMode value) +void MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::DataOperationTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterDataOperationTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23574,8 +15732,8 @@ } } -void MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23586,7 +15744,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableDoorLockClusterDataOperationTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23601,15 +15759,15 @@ } } -void MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ColorControl::SaturationMoveMode value) +void MTRDoorLockClusterDlLockStateAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::DlLockState value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23624,8 +15782,8 @@ } } -void MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23636,7 +15794,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23651,15 +15809,15 @@ } } -void MTRColorControlClusterSaturationStepModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ColorControl::SaturationStepMode value) +void MTRDoorLockClusterDlLockTypeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::DlLockType value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23674,8 +15832,8 @@ } } -void MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23686,7 +15844,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23701,15 +15859,14 @@ } } -void MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::IlluminanceMeasurement::LightSensorTypeEnum value) +void MTRDoorLockClusterDlStatusAttributeCallbackBridge::OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlStatus value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23724,8 +15881,8 @@ } } -void MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23736,7 +15893,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23751,15 +15908,15 @@ } } -void MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value) +void MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::DoorLockOperationEventCode value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23774,8 +15931,8 @@ } } -void MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23786,7 +15943,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23801,15 +15958,15 @@ } } -void MTRCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum value) +void MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::DoorLockProgrammingEventCode value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23824,8 +15981,8 @@ } } -void MTRNullableCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23836,8 +15993,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableCarbonMonoxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23852,16 +16008,15 @@ } } -void MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum value) +void MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::DoorLockSetPinOrIdStatus value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23876,10 +16031,8 @@ } } -void MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & - value) +void MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23890,8 +16043,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23906,16 +16058,15 @@ } } -void MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum value) +void MTRDoorLockClusterDoorStateEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::DoorStateEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRDoorLockClusterDoorStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23930,8 +16081,8 @@ } } -void MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23942,8 +16093,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableCarbonMonoxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableDoorLockClusterDoorStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23958,15 +16108,15 @@ } } -void MTRCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum value) +void MTRDoorLockClusterLockDataTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::LockDataTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterLockDataTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23981,8 +16131,8 @@ } } -void MTRNullableCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23993,8 +16143,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableCarbonDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableDoorLockClusterLockDataTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24009,16 +16158,15 @@ } } -void MTRCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum value) +void MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::LockOperationTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRDoorLockClusterLockOperationTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24033,9 +16181,8 @@ } } -void MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24046,8 +16193,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableDoorLockClusterLockOperationTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24062,16 +16208,15 @@ } } -void MTRCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum value) +void MTRDoorLockClusterOperatingModeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::OperatingModeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRDoorLockClusterOperatingModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24086,8 +16231,8 @@ } } -void MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24098,8 +16243,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableCarbonDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableDoorLockClusterOperatingModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24114,15 +16258,15 @@ } } -void MTRNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum value) +void MTRDoorLockClusterOperationErrorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::OperationErrorEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterOperationErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24137,8 +16281,8 @@ } } -void MTRNullableNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24149,8 +16293,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableNitrogenDioxideConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableDoorLockClusterOperationErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24165,16 +16308,15 @@ } } -void MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum value) +void MTRDoorLockClusterOperationSourceEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::OperationSourceEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRDoorLockClusterOperationSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24189,10 +16331,8 @@ } } -void MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & - value) +void MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24203,8 +16343,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableDoorLockClusterOperationSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24219,16 +16358,15 @@ } } -void MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum value) +void MTRDoorLockClusterUserStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::UserStatusEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRDoorLockClusterUserStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24243,9 +16381,8 @@ } } -void MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24256,8 +16393,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableNitrogenDioxideConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableDoorLockClusterUserStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24272,15 +16408,15 @@ } } -void MTROzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum value) +void MTRDoorLockClusterUserTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::DoorLock::UserTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTROzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockClusterUserTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24295,8 +16431,8 @@ } } -void MTRNullableOzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24307,7 +16443,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOzoneConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableDoorLockClusterUserTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24322,15 +16458,15 @@ } } -void MTROzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum value) +void MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::WindowCovering::EndProductType value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTROzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24345,8 +16481,8 @@ } } -void MTRNullableOzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24357,8 +16493,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOzoneConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24373,15 +16508,15 @@ } } -void MTROzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum value) +void MTRWindowCoveringClusterTypeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::WindowCovering::Type value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTROzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24396,8 +16531,8 @@ } } -void MTRNullableOzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24408,8 +16543,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOzoneConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24424,15 +16558,15 @@ } } -void MTRPM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum value) +void MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPumpConfigurationAndControlClusterControlModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24447,8 +16581,8 @@ } } -void MTRNullablePM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24459,7 +16593,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePM25ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePumpConfigurationAndControlClusterControlModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24474,15 +16608,15 @@ } } -void MTRPM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum value) +void MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24497,8 +16631,8 @@ } } -void MTRNullablePM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24509,8 +16643,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePM25ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullablePumpConfigurationAndControlClusterOperationModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24525,15 +16658,15 @@ } } -void MTRPM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum value) +void MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Thermostat::SetpointAdjustMode value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24548,8 +16681,8 @@ } } -void MTRNullablePM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24560,8 +16693,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePM25ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24576,15 +16708,15 @@ } } -void MTRFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum value) +void MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Thermostat::ThermostatControlSequence value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24599,8 +16731,8 @@ } } -void MTRNullableFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24611,8 +16743,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFormaldehydeConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24627,16 +16758,15 @@ } } -void MTRFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum value) +void MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Thermostat::ThermostatRunningMode value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24651,8 +16781,8 @@ } } -void MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24663,8 +16793,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24679,16 +16808,15 @@ } } -void MTRFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum value) +void MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Thermostat::ThermostatSystemMode value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24703,8 +16831,8 @@ } } -void MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24715,8 +16843,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFormaldehydeConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24731,15 +16858,15 @@ } } -void MTRPM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum value) +void MTRFanControlClusterFanModeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::FanControl::FanModeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24754,8 +16881,8 @@ } } -void MTRNullablePM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24766,7 +16893,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePM1ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24781,15 +16908,15 @@ } } -void MTRPM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum value) +void MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::FanControl::FanModeSequenceEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24804,8 +16931,8 @@ } } -void MTRNullablePM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24816,8 +16943,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePM1ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24832,15 +16958,15 @@ } } -void MTRPM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum value) +void MTRColorControlClusterColorLoopActionAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::ColorControl::ColorLoopAction value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24855,8 +16981,8 @@ } } -void MTRNullablePM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24867,8 +16993,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePM1ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24883,15 +17008,15 @@ } } -void MTRPM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum value) +void MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::ColorControl::ColorLoopDirection value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24906,8 +17031,8 @@ } } -void MTRNullablePM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24918,7 +17043,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePM10ConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24933,15 +17058,15 @@ } } -void MTRPM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum value) +void MTRColorControlClusterColorModeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::ColorControl::ColorMode value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24956,8 +17081,8 @@ } } -void MTRNullablePM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableColorControlClusterColorModeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -24968,8 +17093,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePM10ConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -24984,15 +17108,15 @@ } } -void MTRPM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum value) +void MTRColorControlClusterHueDirectionAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::ColorControl::HueDirection value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -25007,8 +17131,8 @@ } } -void MTRNullablePM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -25019,8 +17143,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePM10ConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -25035,16 +17158,15 @@ } } -void MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum value) +void MTRColorControlClusterHueMoveModeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::ColorControl::HueMoveMode value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -25059,10 +17181,8 @@ } } -void MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable< - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum> & value) +void MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -25073,8 +17193,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -25089,16 +17208,15 @@ } } -void MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum value) +void MTRColorControlClusterHueStepModeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::ColorControl::HueStepMode value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -25113,10 +17231,8 @@ } } -void MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge:: - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable< - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum> & value) +void MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -25127,8 +17243,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -25143,16 +17258,15 @@ } } -void MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum value) +void MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::ColorControl::SaturationMoveMode value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -25167,10 +17281,8 @@ } } -void MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, - const chip::app::DataModel::Nullable< - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum> & value) +void MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -25181,8 +17293,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -25197,15 +17308,15 @@ } } -void MTRRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum value) +void MTRColorControlClusterSaturationStepModeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::ColorControl::SaturationStepMode value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -25220,8 +17331,8 @@ } } -void MTRNullableRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -25232,7 +17343,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableRadonConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -25247,15 +17358,15 @@ } } -void MTRRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum value) +void MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::IlluminanceMeasurement::LightSensorTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -25270,8 +17381,8 @@ } } -void MTRNullableRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -25282,8 +17393,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableRadonConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableIlluminanceMeasurementClusterLightSensorTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -25298,15 +17408,15 @@ } } -void MTRRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum value) +void MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -25321,8 +17431,8 @@ } } -void MTRNullableRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -25333,8 +17443,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableRadonConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished() +void MTRNullableOccupancySensingClusterOccupancySensorTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 613c97c0c2a9df..9578aaef888481 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -276,13 +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, - MTRClusterIDTypeTemperatureControlID MTR_NEWLY_AVAILABLE = 0x00000056, - MTRClusterIDTypeRefrigeratorAlarmID MTR_NEWLY_AVAILABLE = 0x00000057, - MTRClusterIDTypeAirQualityID MTR_NEWLY_AVAILABLE = 0x0000005B, - MTRClusterIDTypeSmokeCOAlarmID MTR_NEWLY_AVAILABLE = 0x0000005C, - MTRClusterIDTypeOperationalStateID MTR_NEWLY_AVAILABLE = 0x00000060, - MTRClusterIDTypeHEPAFilterMonitoringID MTR_NEWLY_AVAILABLE = 0x00000071, - MTRClusterIDTypeActivatedCarbonFilterMonitoringID MTR_NEWLY_AVAILABLE = 0x00000072, MTRClusterIDTypeDoorLockID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000101, MTRClusterIDTypeWindowCoveringID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000102, MTRClusterIDTypeBarrierControlID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000103, @@ -299,16 +292,6 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeFlowMeasurementID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000404, MTRClusterIDTypeRelativeHumidityMeasurementID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000405, MTRClusterIDTypeOccupancySensingID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000406, - MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID MTR_NEWLY_AVAILABLE = 0x0000040C, - MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID MTR_NEWLY_AVAILABLE = 0x0000040D, - MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID MTR_NEWLY_AVAILABLE = 0x00000413, - MTRClusterIDTypeOzoneConcentrationMeasurementID MTR_NEWLY_AVAILABLE = 0x00000415, - MTRClusterIDTypePM25ConcentrationMeasurementID MTR_NEWLY_AVAILABLE = 0x0000042A, - MTRClusterIDTypeFormaldehydeConcentrationMeasurementID MTR_NEWLY_AVAILABLE = 0x0000042B, - MTRClusterIDTypePM1ConcentrationMeasurementID MTR_NEWLY_AVAILABLE = 0x0000042C, - MTRClusterIDTypePM10ConcentrationMeasurementID MTR_NEWLY_AVAILABLE = 0x0000042D, - MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID MTR_NEWLY_AVAILABLE = 0x0000042E, - MTRClusterIDTypeRadonConcentrationMeasurementID MTR_NEWLY_AVAILABLE = 0x0000042F, MTRClusterIDTypeWakeOnLANID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000503, MTRClusterIDTypeChannelID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000504, MTRClusterIDTypeTargetNavigatorID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000505, @@ -353,7 +336,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = 0x0000FFF8, MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000FFF9, - MTRAttributeIDTypeGlobalAttributeEventListID MTR_NEWLY_AVAILABLE = 0x0000FFFA, MTRAttributeIDTypeGlobalAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000FFFB, MTRAttributeIDTypeGlobalAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000FFFC, MTRAttributeIDTypeGlobalAttributeClusterRevisionID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000FFFD, @@ -394,7 +376,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterIdentifyAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterIdentifyAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterIdentifyAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterIdentifyAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -432,7 +413,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterGroupsAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterGroupsAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterGroupsAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterGroupsAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -492,13 +472,10 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = 0x00000004, MTRAttributeIDTypeClusterScenesAttributeLastConfiguredByID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, - MTRAttributeIDTypeClusterScenesAttributeSceneTableSizeID MTR_NEWLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterScenesAttributeRemainingCapacityID MTR_NEWLY_AVAILABLE = 0x00000007, MTRAttributeIDTypeClusterScenesAttributeGeneratedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterScenesAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterScenesAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterScenesAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterScenesAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -554,7 +531,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterOnOffAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOnOffAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOnOffAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterOnOffAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -605,8 +581,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -729,7 +703,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterLevelControlAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLevelControlAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterLevelControlAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterLevelControlAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -821,8 +794,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -861,8 +832,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPulseWidthModulationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPulseWidthModulationAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPulseWidthModulationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -926,7 +895,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterDescriptorAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDescriptorAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDescriptorAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDescriptorAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -963,7 +931,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterBindingAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBindingAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBindingAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterBindingAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1032,7 +999,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterAccessControlAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAccessControlAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterAccessControlAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterAccessControlAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1080,7 +1046,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterActionsAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterActionsAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterActionsAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterActionsAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1229,15 +1194,15 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBasicInformationAttributeCapabilityMinimaID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000013, - MTRAttributeIDTypeClusterBasicInformationAttributeProductAppearanceID MTR_NEWLY_AVAILABLE = 0x00000014, + MTRAttributeIDTypeClusterBasicInformationAttributeProductAppearanceID API_AVAILABLE( + ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) + = 0x00000014, MTRAttributeIDTypeClusterBasicInformationAttributeGeneratedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterBasicInformationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBasicInformationAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBasicInformationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1276,8 +1241,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1345,8 +1308,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1400,8 +1361,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLocalizationConfigurationAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1462,8 +1421,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1510,8 +1467,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterUnitLocalizationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterUnitLocalizationAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterUnitLocalizationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1557,8 +1512,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1797,7 +1750,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPowerSourceAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPowerSourceAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPowerSourceAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterPowerSourceAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1869,8 +1821,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterGeneralCommissioningAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterGeneralCommissioningAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterGeneralCommissioningAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1965,8 +1915,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterNetworkCommissioningAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterNetworkCommissioningAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -2006,7 +1954,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterDiagnosticLogsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDiagnosticLogsAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDiagnosticLogsAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDiagnosticLogsAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -2105,8 +2052,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -2173,8 +2118,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -2655,8 +2598,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -2785,8 +2726,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -2889,8 +2828,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -2972,11 +2909,15 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeSourceID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeTrustedTimeSourceID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterTimeSynchronizationAttributeTrustedTimeSourceID API_AVAILABLE( + ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) + = 0x00000003, MTRAttributeIDTypeClusterTimeSynchronizationAttributeTrustedTimeNodeIdID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeClusterTimeSynchronizationAttributeTrustedTimeSourceID, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeDefaultNTPID MTR_NEWLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterTimeSynchronizationAttributeDefaultNTPID API_AVAILABLE( + ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) + = 0x00000004, MTRAttributeIDTypeClusterTimeSynchronizationAttributeDefaultNtpID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeClusterTimeSynchronizationAttributeDefaultNTPID, @@ -2993,7 +2934,9 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneDatabaseID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000008, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeNTPServerAvailableID MTR_NEWLY_AVAILABLE = 0x00000009, + MTRAttributeIDTypeClusterTimeSynchronizationAttributeNTPServerAvailableID API_AVAILABLE( + ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) + = 0x00000009, MTRAttributeIDTypeClusterTimeSynchronizationAttributeNtpServerPortID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeClusterTimeSynchronizationAttributeNTPServerAvailableID, @@ -3003,8 +2946,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTimeSynchronizationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTimeSynchronizationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -3143,15 +3084,15 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeUniqueIDID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000012, - MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductAppearanceID MTR_NEWLY_AVAILABLE = 0x00000014, + MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductAppearanceID API_AVAILABLE( + ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) + = 0x00000014, MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeGeneratedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -3204,7 +3145,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterSwitchAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterSwitchAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterSwitchAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterSwitchAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3262,8 +3202,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -3344,8 +3282,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOperationalCredentialsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -3412,8 +3348,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterGroupKeyManagementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -3456,7 +3390,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterFixedLabelAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterFixedLabelAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterFixedLabelAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3496,7 +3429,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterUserLabelAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterUserLabelAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterUserLabelAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3533,8 +3465,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterProxyConfigurationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterProxyConfigurationAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterProxyConfigurationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -3573,7 +3503,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterProxyDiscoveryAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterProxyDiscoveryAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterProxyDiscoveryAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterProxyDiscoveryAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3610,7 +3539,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterProxyValidAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterProxyValidAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterProxyValidAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterProxyValidAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3653,7 +3581,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBooleanStateAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBooleanStateAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterBooleanStateAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3724,7 +3651,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterModeSelectAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3732,137 +3658,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster TemperatureControl attributes - MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterTemperatureControlAttributeStepID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID MTR_NEWLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster RefrigeratorAlarm attributes - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster AirQuality attributes - MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterAirQualityAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterAirQualityAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAirQualityAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterAirQualityAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterAirQualityAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster SmokeCOAlarm attributes - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpressedStateID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeStateID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeCOStateID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeBatteryAlertID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeDeviceMutedID MTR_NEWLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeTestInProgressID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeHardwareFaultAlertID MTR_NEWLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEndOfServiceAlertID MTR_NEWLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectSmokeAlarmID MTR_NEWLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectCOAlarmID MTR_NEWLY_AVAILABLE = 0x00000009, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeContaminationStateID MTR_NEWLY_AVAILABLE = 0x0000000A, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSensitivityLevelID MTR_NEWLY_AVAILABLE = 0x0000000B, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpiryDateID MTR_NEWLY_AVAILABLE = 0x0000000C, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster OperationalState attributes - MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID MTR_NEWLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOperationalStateAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster HEPAFilterMonitoring attributes - MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeConditionID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeDegradationDirectionID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeChangeIndicationID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeInPlaceIndicatorID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster ActivatedCarbonFilterMonitoring attributes - MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeConditionID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeDegradationDirectionID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeChangeIndicationID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeInPlaceIndicatorID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster DoorLock deprecated attribute names MTRClusterDoorLockAttributeLockStateID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterDoorLockAttributeLockStateID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -4115,7 +3910,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDoorLockAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDoorLockAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDoorLockAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDoorLockAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -4299,7 +4093,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterWindowCoveringAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWindowCoveringAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterWindowCoveringAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterWindowCoveringAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -4407,7 +4200,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBarrierControlAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -4606,8 +4398,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -4964,7 +4754,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThermostatAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterThermostatAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterThermostatAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterThermostatAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -5058,14 +4847,12 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = 0x00000009, MTRAttributeIDTypeClusterFanControlAttributeWindSettingID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000A, - MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID MTR_NEWLY_AVAILABLE = 0x0000000B, MTRAttributeIDTypeClusterFanControlAttributeGeneratedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterFanControlAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterFanControlAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterFanControlAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterFanControlAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -5123,8 +4910,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -5496,7 +5281,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterColorControlAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterColorControlAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterColorControlAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterColorControlAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -5628,8 +5412,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBallastConfigurationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBallastConfigurationAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -5704,8 +5486,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -5773,8 +5553,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTemperatureMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -5875,8 +5653,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPressureMeasurementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPressureMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -5942,7 +5718,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterFlowMeasurementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterFlowMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterFlowMeasurementAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6008,8 +5783,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -6132,8 +5905,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -6143,280 +5914,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster CarbonMonoxideConcentrationMeasurement attributes - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMinMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMaxMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueWindowID MTR_NEWLY_AVAILABLE - = 0x00000004, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID MTR_NEWLY_AVAILABLE - = 0x00000006, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeUncertaintyID MTR_NEWLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementUnitID MTR_NEWLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementMediumID MTR_NEWLY_AVAILABLE = 0x00000009, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeLevelValueID MTR_NEWLY_AVAILABLE = 0x0000000A, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster CarbonDioxideConcentrationMeasurement attributes - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMinMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMaxMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID MTR_NEWLY_AVAILABLE - = 0x00000004, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID MTR_NEWLY_AVAILABLE - = 0x00000006, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeUncertaintyID MTR_NEWLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementUnitID MTR_NEWLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementMediumID MTR_NEWLY_AVAILABLE = 0x00000009, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeLevelValueID MTR_NEWLY_AVAILABLE = 0x0000000A, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster NitrogenDioxideConcentrationMeasurement attributes - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMinMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMaxMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID MTR_NEWLY_AVAILABLE - = 0x00000004, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueID MTR_NEWLY_AVAILABLE - = 0x00000005, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID MTR_NEWLY_AVAILABLE - = 0x00000006, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeUncertaintyID MTR_NEWLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementUnitID MTR_NEWLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementMediumID MTR_NEWLY_AVAILABLE = 0x00000009, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeLevelValueID MTR_NEWLY_AVAILABLE = 0x0000000A, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster OzoneConcentrationMeasurement attributes - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMinMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMaxMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueWindowID MTR_NEWLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueWindowID MTR_NEWLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeUncertaintyID MTR_NEWLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementUnitID MTR_NEWLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementMediumID MTR_NEWLY_AVAILABLE = 0x00000009, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeLevelValueID MTR_NEWLY_AVAILABLE = 0x0000000A, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster PM25ConcentrationMeasurement attributes - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMinMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMaxMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueWindowID MTR_NEWLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueWindowID MTR_NEWLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeUncertaintyID MTR_NEWLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementUnitID MTR_NEWLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementMediumID MTR_NEWLY_AVAILABLE = 0x00000009, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeLevelValueID MTR_NEWLY_AVAILABLE = 0x0000000A, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster FormaldehydeConcentrationMeasurement attributes - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMinMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMaxMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueWindowID MTR_NEWLY_AVAILABLE - = 0x00000004, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueWindowID MTR_NEWLY_AVAILABLE - = 0x00000006, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeUncertaintyID MTR_NEWLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementUnitID MTR_NEWLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementMediumID MTR_NEWLY_AVAILABLE = 0x00000009, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeLevelValueID MTR_NEWLY_AVAILABLE = 0x0000000A, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster PM1ConcentrationMeasurement attributes - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMinMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMaxMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueWindowID MTR_NEWLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueWindowID MTR_NEWLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeUncertaintyID MTR_NEWLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementUnitID MTR_NEWLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementMediumID MTR_NEWLY_AVAILABLE = 0x00000009, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeLevelValueID MTR_NEWLY_AVAILABLE = 0x0000000A, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster PM10ConcentrationMeasurement attributes - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMinMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMaxMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueWindowID MTR_NEWLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueWindowID MTR_NEWLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeUncertaintyID MTR_NEWLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementUnitID MTR_NEWLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementMediumID MTR_NEWLY_AVAILABLE = 0x00000009, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeLevelValueID MTR_NEWLY_AVAILABLE = 0x0000000A, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster TotalVolatileOrganicCompoundsConcentrationMeasurement attributes - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasuredValueID MTR_NEWLY_AVAILABLE - = 0x00000000, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMinMeasuredValueID MTR_NEWLY_AVAILABLE - = 0x00000001, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMaxMeasuredValueID MTR_NEWLY_AVAILABLE - = 0x00000002, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueID MTR_NEWLY_AVAILABLE - = 0x00000003, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueWindowID - MTR_NEWLY_AVAILABLE - = 0x00000004, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueID - MTR_NEWLY_AVAILABLE - = 0x00000005, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueWindowID - MTR_NEWLY_AVAILABLE - = 0x00000006, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeUncertaintyID MTR_NEWLY_AVAILABLE - = 0x00000007, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementUnitID MTR_NEWLY_AVAILABLE - = 0x00000008, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementMediumID MTR_NEWLY_AVAILABLE - = 0x00000009, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeLevelValueID MTR_NEWLY_AVAILABLE - = 0x0000000A, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeGeneratedCommandListID - MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster RadonConcentrationMeasurement attributes - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMinMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMaxMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueWindowID MTR_NEWLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueWindowID MTR_NEWLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeUncertaintyID MTR_NEWLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementUnitID MTR_NEWLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementMediumID MTR_NEWLY_AVAILABLE = 0x00000009, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeLevelValueID MTR_NEWLY_AVAILABLE = 0x0000000A, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster WakeOnLan deprecated attribute names MTRClusterWakeOnLanAttributeMACAddressID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterWakeOnLANAttributeMACAddressID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -6449,7 +5946,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterWakeOnLANAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterWakeOnLANAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6497,7 +5993,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterChannelAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterChannelAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterChannelAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterChannelAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6546,7 +6041,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTargetNavigatorAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterTargetNavigatorAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6626,7 +6120,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterMediaPlaybackAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6673,7 +6166,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterMediaInputAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6707,7 +6199,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLowPowerAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterLowPowerAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6744,7 +6235,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterKeypadInputAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterKeypadInputAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterKeypadInputAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6794,7 +6284,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterContentLauncherAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterContentLauncherAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterContentLauncherAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6844,7 +6333,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterAudioOutputAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAudioOutputAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterAudioOutputAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6895,8 +6383,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterApplicationLauncherAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -6987,8 +6473,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterApplicationBasicAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -7027,7 +6511,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterAccountLoginAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAccountLoginAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterAccountLoginAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -7959,8 +7442,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeEventListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -8481,7 +7962,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterUnitTestingAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterUnitTestingAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterUnitTestingAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -8518,7 +7998,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterFaultInjectionAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterFaultInjectionAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterFaultInjectionAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterFaultInjectionAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -9265,25 +8744,6 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterModeSelectCommandChangeToModeID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, - // Cluster TemperatureControl commands - MTRCommandIDTypeClusterTemperatureControlCommandSetTemperatureID MTR_NEWLY_AVAILABLE = 0x00000000, - - // Cluster SmokeCOAlarm commands - MTRCommandIDTypeClusterSmokeCOAlarmCommandSelfTestRequestID MTR_NEWLY_AVAILABLE = 0x00000000, - - // Cluster OperationalState commands - MTRCommandIDTypeClusterOperationalStateCommandPauseID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterOperationalStateCommandStopID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRCommandIDTypeClusterOperationalStateCommandStartID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRCommandIDTypeClusterOperationalStateCommandResumeID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRCommandIDTypeClusterOperationalStateCommandOperationalCommandResponseID MTR_NEWLY_AVAILABLE = 0x00000004, - - // Cluster HEPAFilterMonitoring commands - MTRCommandIDTypeClusterHEPAFilterMonitoringCommandResetConditionID MTR_NEWLY_AVAILABLE = 0x00000000, - - // Cluster ActivatedCarbonFilterMonitoring commands - MTRCommandIDTypeClusterActivatedCarbonFilterMonitoringCommandResetConditionID MTR_NEWLY_AVAILABLE = 0x00000000, - // Cluster DoorLock deprecated command id names MTRClusterDoorLockCommandLockDoorID MTR_DEPRECATED("Please use MTRCommandIDTypeClusterDoorLockCommandLockDoorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -9422,7 +8882,6 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { = 0x00000025, MTRCommandIDTypeClusterDoorLockCommandClearCredentialID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000026, - MTRCommandIDTypeClusterDoorLockCommandUnboltDoorID MTR_NEWLY_AVAILABLE = 0x00000027, // Cluster WindowCovering deprecated command id names MTRClusterWindowCoveringCommandUpOrOpenID MTR_DEPRECATED("Please use MTRCommandIDTypeClusterWindowCoveringCommandUpOrOpenID", @@ -9524,7 +8983,6 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { // Cluster FanControl deprecated command id names // Cluster FanControl commands - MTRCommandIDTypeClusterFanControlCommandStepID MTR_NEWLY_AVAILABLE = 0x00000000, // Cluster ColorControl deprecated command id names MTRClusterColorControlCommandMoveToHueID MTR_DEPRECATED("Please use MTRCommandIDTypeClusterColorControlCommandMoveToHueID", @@ -10407,26 +9865,6 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { MTREventIDTypeClusterBooleanStateEventStateChangeID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, - // Cluster RefrigeratorAlarm events - MTREventIDTypeClusterRefrigeratorAlarmEventNotifyID MTR_NEWLY_AVAILABLE = 0x00000000, - - // Cluster SmokeCOAlarm events - MTREventIDTypeClusterSmokeCOAlarmEventSmokeAlarmID MTR_NEWLY_AVAILABLE = 0x00000000, - MTREventIDTypeClusterSmokeCOAlarmEventCOAlarmID MTR_NEWLY_AVAILABLE = 0x00000001, - MTREventIDTypeClusterSmokeCOAlarmEventLowBatteryID MTR_NEWLY_AVAILABLE = 0x00000002, - MTREventIDTypeClusterSmokeCOAlarmEventHardwareFaultID MTR_NEWLY_AVAILABLE = 0x00000003, - MTREventIDTypeClusterSmokeCOAlarmEventEndOfServiceID MTR_NEWLY_AVAILABLE = 0x00000004, - MTREventIDTypeClusterSmokeCOAlarmEventSelfTestCompleteID MTR_NEWLY_AVAILABLE = 0x00000005, - MTREventIDTypeClusterSmokeCOAlarmEventAlarmMutedID MTR_NEWLY_AVAILABLE = 0x00000006, - MTREventIDTypeClusterSmokeCOAlarmEventMuteEndedID MTR_NEWLY_AVAILABLE = 0x00000007, - MTREventIDTypeClusterSmokeCOAlarmEventInterconnectSmokeAlarmID MTR_NEWLY_AVAILABLE = 0x00000008, - MTREventIDTypeClusterSmokeCOAlarmEventInterconnectCOAlarmID MTR_NEWLY_AVAILABLE = 0x00000009, - MTREventIDTypeClusterSmokeCOAlarmEventAllClearID MTR_NEWLY_AVAILABLE = 0x0000000A, - - // Cluster OperationalState events - MTREventIDTypeClusterOperationalStateEventOperationalErrorID MTR_NEWLY_AVAILABLE = 0x00000000, - MTREventIDTypeClusterOperationalStateEventOperationCompletionID MTR_NEWLY_AVAILABLE = 0x00000001, - // Cluster DoorLock deprecated event names MTRClusterDoorLockEventDoorLockAlarmID MTR_DEPRECATED("Please use MTREventIDTypeClusterDoorLockEventDoorLockAlarmID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 4d6e5d72a5d565..aee780c0c89504 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -63,8 +63,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -137,8 +135,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -241,18 +237,12 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeLastConfiguredByWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeRemainingCapacityWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -360,8 +350,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -407,8 +395,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -571,8 +557,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -674,8 +658,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -721,8 +703,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -765,8 +745,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -831,8 +809,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -928,8 +904,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1039,7 +1013,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeCapabilityMinimaWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1047,8 +1022,6 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1099,8 +1072,6 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1158,8 +1129,6 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1208,8 +1177,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1268,8 +1235,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1315,8 +1280,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1352,8 +1315,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1480,8 +1441,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1563,8 +1522,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1665,8 +1622,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1706,8 +1661,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1773,8 +1726,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1829,8 +1780,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2062,8 +2011,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2145,8 +2092,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2216,8 +2161,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2299,7 +2242,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -2307,8 +2251,6 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -2355,8 +2297,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2418,8 +2358,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2518,8 +2456,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2570,7 +2506,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion: (void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + NSError * _Nullable error))completion + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - (NSDictionary *)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2597,8 +2534,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2635,8 +2570,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2679,8 +2612,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2716,8 +2647,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2787,8 +2716,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2803,351 +2730,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end -/** - * Cluster Temperature Control - * Attributes and commands for configuring the temperature control, and reporting temperature. - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterTemperatureControl : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeStepWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeSupportedTemperatureLevelsWithParams:(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 Refrigerator Alarm - * Attributes and commands for configuring the Refrigerator alarm. - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterRefrigeratorAlarm : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeSupportedWithParams:(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 Air Quality - * Attributes for reporting air quality classification - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterAirQuality : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAirQualityWithParams:(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 Smoke CO Alarm - * This cluster provides an interface for observing and managing the state of smoke and CO alarms. - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterSmokeCOAlarm : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * _Nullable)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)selfTestRequestWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeExpressedStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeSmokeStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeCOStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeBatteryAlertWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeDeviceMutedWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeTestInProgressWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeHardwareFaultAlertWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeEndOfServiceAlertWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeInterconnectSmokeAlarmWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeInterconnectCOAlarmWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeContaminationStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (void)writeAttributeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; -- (void)writeAttributeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeExpiryDateWithParams:(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 Operational State - * This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state - * machine is a part of the operation. - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterOperationalState : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)stopWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)startWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeOperationalErrorWithParams:(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 HEPA Filter Monitoring - * Attributes and commands for monitoring HEPA filters in a device - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterHEPAFilterMonitoring : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionParams * _Nullable)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)resetConditionWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeInPlaceIndicatorWithParams:(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 Activated Carbon Filter Monitoring - * Attributes and commands for monitoring activated carbon filters in a device - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterActivatedCarbonFilterMonitoring : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterResetConditionParams * _Nullable)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)resetConditionWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeInPlaceIndicatorWithParams:(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 Door Lock * An interface to a generic way to secure a door @@ -3249,10 +2831,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -3494,8 +3072,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -3643,8 +3219,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -3764,8 +3338,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -3895,8 +3467,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4290,8 +3860,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4318,11 +3886,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)stepWithParams:(MTRFanControlClusterStepParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeFanModeWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValueDictionary @@ -4398,21 +3961,12 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) params:(MTRWriteParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeAirflowDirectionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; -- (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4475,8 +4029,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4838,8 +4390,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4984,8 +4534,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5033,8 +4581,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5079,8 +4625,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5140,8 +4684,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5186,8 +4728,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5232,8 +4772,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5365,8 +4903,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5382,539 +4918,19 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end /** - * Cluster Carbon Monoxide Concentration Measurement - * Attributes for reporting carbon monoxide concentration measurements + * Cluster Wake on LAN + * This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterCarbonMonoxideConcentrationMeasurement : MTRCluster +API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) +@interface MTRClusterWakeOnLAN : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeLevelValueWithParams:(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 Carbon Dioxide Concentration Measurement - * Attributes for reporting carbon dioxide concentration measurements - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterCarbonDioxideConcentrationMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeLevelValueWithParams:(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 Nitrogen Dioxide Concentration Measurement - * Attributes for reporting nitrogen dioxide concentration measurements - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterNitrogenDioxideConcentrationMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeLevelValueWithParams:(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 Ozone Concentration Measurement - * Attributes for reporting ozone concentration measurements - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterOzoneConcentrationMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeLevelValueWithParams:(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 PM2.5 Concentration Measurement - * Attributes for reporting PM2.5 concentration measurements - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterPM25ConcentrationMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeLevelValueWithParams:(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 Formaldehyde Concentration Measurement - * Attributes for reporting formaldehyde concentration measurements - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterFormaldehydeConcentrationMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeLevelValueWithParams:(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 PM1 Concentration Measurement - * Attributes for reporting PM1 concentration measurements - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterPM1ConcentrationMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeLevelValueWithParams:(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 PM10 Concentration Measurement - * Attributes for reporting PM10 concentration measurements - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterPM10ConcentrationMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeLevelValueWithParams:(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 Total Volatile Organic Compounds Concentration Measurement - * Attributes for reporting total volatile organic compounds concentration measurements - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterTotalVolatileOrganicCompoundsConcentrationMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeLevelValueWithParams:(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 Radon Concentration Measurement - * Attributes for reporting radon concentration measurements - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterRadonConcentrationMeasurement : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params - MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeLevelValueWithParams:(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 Wake on LAN - * This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. - */ -API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) -@interface MTRClusterWakeOnLAN : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (NSDictionary *)readAttributeMACAddressWithParams:(MTRReadParams * _Nullable)params - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (NSDictionary *)readAttributeMACAddressWithParams:(MTRReadParams * _Nullable)params + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -5922,8 +4938,6 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -5981,8 +4995,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6028,8 +5040,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6185,8 +5195,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6250,8 +5258,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6292,8 +5298,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6332,8 +5336,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6392,8 +5394,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6441,8 +5441,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6505,8 +5503,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6564,8 +5560,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6618,8 +5612,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -7108,8 +6100,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -8119,8 +7109,6 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -8149,8 +7137,8 @@ MTR_DEPRECATED( @interface MTRClusterOtaSoftwareUpdateRequestor : MTRClusterOTASoftwareUpdateRequestor @end -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -MTR_NEWLY_DEPRECATED("Please use MTRClusterBridgedDeviceBasicInformation") +MTR_DEPRECATED( + "Please use MTRClusterBridgedDeviceBasicInformation", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRClusterBridgedDeviceBasic : MTRClusterBridgedDeviceBasicInformation @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index f6518c22ad5844..66029ffbcbaf17 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -266,14 +266,6 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIdentifyID) - attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -812,14 +804,6 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupsID) - attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -1815,22 +1799,6 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params params:params]; } -- (NSDictionary *)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneTableSizeID) - params:params]; -} - -- (NSDictionary *)readAttributeRemainingCapacityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeRemainingCapacityID) - params:params]; -} - - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -1847,14 +1815,6 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeScenesID) - attributeID:@(MTRAttributeIDTypeClusterScenesAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -2592,14 +2552,6 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffID) - attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -2799,14 +2751,6 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -3802,14 +3746,6 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLevelControlID) - attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -4152,14 +4088,6 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBinaryInputBasicID) - attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -4258,14 +4186,6 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDescriptorID) - attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -4363,14 +4283,6 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBindingID) - attributeID:@(MTRAttributeIDTypeClusterBindingAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -4517,14 +4429,6 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccessControlID) - attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -5499,14 +5403,6 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActionsID) - attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -5993,14 +5889,6 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBasicInformationID) - attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -6342,14 +6230,6 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -6591,14 +6471,6 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) - attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -6731,14 +6603,6 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -6869,14 +6733,6 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -6970,14 +6826,6 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUnitLocalizationID) - attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -7054,14 +6902,6 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -7376,14 +7216,6 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePowerSourceID) - attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -7738,14 +7570,6 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -8411,14 +8235,6 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -8655,14 +8471,6 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDiagnosticLogsID) - attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -8886,14 +8694,6 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -9083,14 +8883,6 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -9774,14 +9566,6 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -10060,14 +9844,6 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -10311,14 +10087,6 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) - attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -10559,14 +10327,6 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) - attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return @@ -10661,14 +10421,6 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSwitchID) - attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -10989,14 +10741,6 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) - attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -11728,14 +11472,6 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalCredentialsID) - attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -12292,14 +12028,6 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeGroupKeyManagementID) - attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -12424,14 +12152,6 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFixedLabelID) - attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -12525,14 +12245,6 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUserLabelID) - attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -12607,14 +12319,6 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBooleanStateID) - attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -12835,14 +12539,6 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeModeSelectID) - attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -12888,7 +12584,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params } @end -@implementation MTRClusterTemperatureControl +@implementation MTRClusterDoorLock - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -12903,14 +12599,166 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi return self; } -- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion +{ + NSString * logPrefix = + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandLockDoorID]; + // Make a copy of params before we go async. + params = [params copy]; + NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMsParam) { + timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); + } + MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID + controller:self.device.deviceController]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.device.queue, + ^(id _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::LockDoor::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + if (params != nil) { + if (params.pinCode != nil) { + auto & definedValue_0 = request.PINCode.Emplace(); + definedValue_0 = [self asByteSpan:params.pinCode]; + } + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; + + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; + } +} + +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion +{ + NSString * logPrefix = + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnlockDoorID]; + // Make a copy of params before we go async. + params = [params copy]; + NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMsParam) { + timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); + } + MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID + controller:self.device.deviceController]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.device.queue, + ^(id _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + DoorLock::Commands::UnlockDoor::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + if (params != nil) { + if (params.pinCode != nil) { + auto & definedValue_0 = request.PINCode.Emplace(); + definedValue_0 = [self asByteSpan:params.pinCode]; + } + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; + + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; + } +} + +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTemperatureControlID, - (unsigned int) MTRCommandIDTypeClusterTemperatureControlCommandSetTemperatureID]; + _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnlockWithTimeoutID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -12937,7 +12785,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - TemperatureControl::Commands::SetTemperature::Type request; + DoorLock::Commands::UnlockWithTimeout::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -12950,15 +12798,13 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - if (params != nil) { - if (params.targetTemperature != nil) { - auto & definedValue_0 = request.targetTemperature.Emplace(); - definedValue_0 = params.targetTemperature.shortValue; - } - if (params.targetTemperatureLevel != nil) { - auto & definedValue_0 = request.targetTemperatureLevel.Emplace(); - definedValue_0 = params.targetTemperatureLevel.unsignedCharValue; - } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.timeout = params.timeout.unsignedShortValue; + if (params.pinCode != nil) { + auto & definedValue_0 = request.PINCode.Emplace(); + definedValue_0 = [self asByteSpan:params.pinCode]; } return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, @@ -12980,300 +12826,14 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara } } -- (NSDictionary *)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID) - params:params]; -} - -- (NSDictionary *)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID) - params:params]; -} - -- (NSDictionary *)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID) - params:params]; -} - -- (NSDictionary *)readAttributeStepWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeStepID) - params:params]; -} - -- (NSDictionary *)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID) - params:params]; -} - -- (NSDictionary *)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID) - params:params]; -} - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID) - params:params]; -} - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID) - params:params]; -} - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID) - params:params]; -} - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID) - params:params]; -} - -@end - -@implementation MTRClusterRefrigeratorAlarm - -- (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 *)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) - attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID) - params:params]; -} - -- (NSDictionary *)readAttributeStateWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) - attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID) - params:params]; -} - -- (NSDictionary *)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) - attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID) - params:params]; -} - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) - attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) - attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) - attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID) - params:params]; -} - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) - attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID) - params:params]; -} - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) - attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID) - params:params]; -} - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) - attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID) - params:params]; -} - -@end - -@implementation MTRClusterAirQuality - -- (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 *)readAttributeAirQualityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAirQualityID) - attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID) - params:params]; -} - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAirQualityID) - attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeGeneratedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAirQualityID) - attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAirQualityID) - attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeEventListID) - params:params]; -} - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAirQualityID) - attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID) - params:params]; -} - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAirQualityID) - attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeFeatureMapID) - params:params]; -} - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAirQualityID) - attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeClusterRevisionID) - params:params]; -} - -@end - -@implementation MTRClusterSmokeCOAlarm - -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _endpoint = [endpointID unsignedShortValue]; - _device = device; - } - return self; -} - -- (void)selfTestRequestWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion -{ - [self selfTestRequestWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completion:completion]; -} -- (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * _Nullable)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeSmokeCOAlarmID, - (unsigned int) MTRCommandIDTypeClusterSmokeCOAlarmCommandSelfTestRequestID]; + _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -13300,7 +12860,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - SmokeCoAlarm::Commands::SelfTestRequest::Type request; + DoorLock::Commands::SetWeekDaySchedule::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -13313,6 +12873,14 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } + request.weekDayIndex = params.weekDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + request.daysMask + = static_cast>(params.daysMask.unsignedCharValue); + request.startHour = params.startHour.unsignedCharValue; + request.startMinute = params.startMinute.unsignedCharValue; + request.endHour = params.endHour.unsignedCharValue; + request.endMinute = params.endMinute.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -13333,210 +12901,15 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * } } -- (NSDictionary *)readAttributeExpressedStateWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpressedStateID) - params:params]; -} - -- (NSDictionary *)readAttributeSmokeStateWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeStateID) - params:params]; -} - -- (NSDictionary *)readAttributeCOStateWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeCOStateID) - params:params]; -} - -- (NSDictionary *)readAttributeBatteryAlertWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeBatteryAlertID) - params:params]; -} - -- (NSDictionary *)readAttributeDeviceMutedWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeDeviceMutedID) - params:params]; -} - -- (NSDictionary *)readAttributeTestInProgressWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeTestInProgressID) - params:params]; -} - -- (NSDictionary *)readAttributeHardwareFaultAlertWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeHardwareFaultAlertID) - params:params]; -} - -- (NSDictionary *)readAttributeEndOfServiceAlertWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEndOfServiceAlertID) - params:params]; -} - -- (NSDictionary *)readAttributeInterconnectSmokeAlarmWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectSmokeAlarmID) - params:params]; -} - -- (NSDictionary *)readAttributeInterconnectCOAlarmWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectCOAlarmID) - params:params]; -} - -- (NSDictionary *)readAttributeContaminationStateWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeContaminationStateID) - params:params]; -} - -- (NSDictionary *)readAttributeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSensitivityLevelID) - params:params]; -} - -- (void)writeAttributeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeSensitivityLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSensitivityLevelID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeExpiryDateWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpiryDateID) - params:params]; -} - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeGeneratedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID) - params:params]; -} - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID) - params:params]; -} - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeFeatureMapID) - params:params]; -} - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) - attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID) - params:params]; -} - -@end - -@implementation MTRClusterOperationalState - -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _endpoint = [endpointID unsignedShortValue]; - _device = device; - } - return self; -} - -- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, - (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandPauseID]; + _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -13548,7 +12921,7 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( + auto * bridge = new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge( self.device.queue, ^(id _Nullable value, NSError * _Nullable error) { MTRClustersLogCompletion(logPrefix, value, error); @@ -13558,13 +12931,13 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, + DoorLockClusterGetWeekDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); + auto * typedBridge = static_cast(bridge); Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - OperationalState::Commands::Pause::Type request; + DoorLock::Commands::GetWeekDaySchedule::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -13577,6 +12950,8 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } + request.weekDayIndex = params.weekDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -13597,22 +12972,14 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param } } -- (void)stopWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, - (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandStopID]; + _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -13624,23 +12991,22 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( + auto * bridge = new MTRCommandSuccessCallbackBridge( self.device.queue, ^(id _Nullable value, NSError * _Nullable error) { MTRClustersLogCompletion(logPrefix, value, error); dispatch_async(self.callbackQueue, ^{ - completion(value, error); + completion(error); }); [workItem endWork]; }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - OperationalState::Commands::Stop::Type request; + DoorLock::Commands::ClearWeekDaySchedule::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -13653,6 +13019,8 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } + request.weekDayIndex = params.weekDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -13673,22 +13041,14 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params } } -- (void)startWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, - (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandStartID]; + _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -13700,23 +13060,22 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( + auto * bridge = new MTRCommandSuccessCallbackBridge( self.device.queue, ^(id _Nullable value, NSError * _Nullable error) { MTRClustersLogCompletion(logPrefix, value, error); dispatch_async(self.callbackQueue, ^{ - completion(value, error); + completion(error); }); [workItem endWork]; }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - OperationalState::Commands::Start::Type request; + DoorLock::Commands::SetYearDaySchedule::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -13729,6 +13088,10 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } + request.yearDayIndex = params.yearDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + request.localStartTime = params.localStartTime.unsignedIntValue; + request.localEndTime = params.localEndTime.unsignedIntValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -13749,22 +13112,15 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param } } -- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, - (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandResumeID]; + _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -13776,7 +13132,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( + auto * bridge = new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge( self.device.queue, ^(id _Nullable value, NSError * _Nullable error) { MTRClustersLogCompletion(logPrefix, value, error); @@ -13786,13 +13142,13 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, + DoorLockClusterGetYearDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); + auto * typedBridge = static_cast(bridge); Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - OperationalState::Commands::Resume::Type request; + DoorLock::Commands::GetYearDaySchedule::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -13805,6 +13161,8 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } + request.yearDayIndex = params.yearDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -13825,136 +13183,14 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par } } -- (NSDictionary *)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalStateID) - attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID) - params:params]; -} - -- (NSDictionary *)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalStateID) - attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID) - params:params]; -} - -- (NSDictionary *)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalStateID) - attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID) - params:params]; -} - -- (NSDictionary *)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalStateID) - attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID) - params:params]; -} - -- (NSDictionary *)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalStateID) - attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID) - params:params]; -} - -- (NSDictionary *)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalStateID) - attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID) - params:params]; -} - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalStateID) - attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalStateID) - attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalStateID) - attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeEventListID) - params:params]; -} - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalStateID) - attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID) - params:params]; -} - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalStateID) - attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID) - params:params]; -} - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOperationalStateID) - attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID) - params:params]; -} - -@end - -@implementation MTRClusterHEPAFilterMonitoring - -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _endpoint = [endpointID unsignedShortValue]; - _device = device; - } - return self; -} - -- (void)resetConditionWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion -{ - [self resetConditionWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completion:completion]; -} -- (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionParams * _Nullable)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeHEPAFilterMonitoringID, - (unsigned int) MTRCommandIDTypeClusterHEPAFilterMonitoringCommandResetConditionID]; + _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -13981,7 +13217,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - HepaFilterMonitoring::Commands::ResetCondition::Type request; + DoorLock::Commands::ClearYearDaySchedule::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -13994,6 +13230,8 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } + request.yearDayIndex = params.yearDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -14014,120 +13252,14 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa } } -- (NSDictionary *)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeConditionID) - params:params]; -} - -- (NSDictionary *)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeDegradationDirectionID) - params:params]; -} - -- (NSDictionary *)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeChangeIndicationID) - params:params]; -} - -- (NSDictionary *)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeInPlaceIndicatorID) - params:params]; -} - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeGeneratedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeEventListID) - params:params]; -} - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAttributeListID) - params:params]; -} - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeFeatureMapID) - params:params]; -} - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeClusterRevisionID) - params:params]; -} - -@end - -@implementation MTRClusterActivatedCarbonFilterMonitoring - -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _endpoint = [endpointID unsignedShortValue]; - _device = device; - } - return self; -} - -- (void)resetConditionWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion -{ - [self resetConditionWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completion:completion]; -} -- (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterResetConditionParams * _Nullable)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActivatedCarbonFilterMonitoringID, - (unsigned int) MTRCommandIDTypeClusterActivatedCarbonFilterMonitoringCommandResetConditionID]; + _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -14154,7 +13286,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type request; + DoorLock::Commands::SetHolidaySchedule::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -14167,6 +13299,11 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } + request.holidayIndex = params.holidayIndex.unsignedCharValue; + request.localStartTime = params.localStartTime.unsignedIntValue; + request.localEndTime = params.localEndTime.unsignedIntValue; + request.operatingMode + = static_cast>(params.operatingMode.unsignedCharValue); return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -14187,118 +13324,15 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset } } -- (NSDictionary *)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeConditionID) - params:params]; -} - -- (NSDictionary *)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeDegradationDirectionID) - params:params]; -} - -- (NSDictionary *)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeChangeIndicationID) - params:params]; -} - -- (NSDictionary *)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeInPlaceIndicatorID) - params:params]; -} - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeGeneratedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeEventListID) - params:params]; -} - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAttributeListID) - params:params]; -} - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeFeatureMapID) - params:params]; -} - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) - attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeClusterRevisionID) - params:params]; -} - -@end - -@implementation MTRClusterDoorLock - -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _endpoint = [endpointID unsignedShortValue]; - _device = device; - } - return self; -} - -- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion { - NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, - (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandLockDoorID]; + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, + _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -14310,22 +13344,23 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( + auto * bridge = new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge( self.device.queue, ^(id _Nullable value, NSError * _Nullable error) { MTRClustersLogCompletion(logPrefix, value, error); dispatch_async(self.callbackQueue, ^{ - completion(error); + completion(value, error); }); [workItem endWork]; }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + DoorLockClusterGetHolidayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - DoorLock::Commands::LockDoor::Type request; + DoorLock::Commands::GetHolidaySchedule::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -14338,15 +13373,7 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } + request.holidayIndex = params.holidayIndex.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -14367,14 +13394,14 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params } } -- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { - NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, - (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnlockDoorID]; + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, + _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -14401,7 +13428,7 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - DoorLock::Commands::UnlockDoor::Type request; + DoorLock::Commands::ClearHolidaySchedule::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -14414,15 +13441,7 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } + request.holidayIndex = params.holidayIndex.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -14443,14 +13462,14 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par } } -- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, - (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnlockWithTimeoutID]; + NSString * logPrefix = + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetUserID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -14477,7 +13496,7 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - DoorLock::Commands::UnlockWithTimeout::Type request; + DoorLock::Commands::SetUser::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -14493,10 +13512,41 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * if (!timedInvokeTimeoutMs.HasValue()) { timedInvokeTimeoutMs.SetValue(10000); } - request.timeout = params.timeout.unsignedShortValue; - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; + request.operationType + = static_cast>(params.operationType.unsignedCharValue); + request.userIndex = params.userIndex.unsignedShortValue; + if (params.userName == nil) { + request.userName.SetNull(); + } else { + auto & nonNullValue_0 = request.userName.SetNonNull(); + nonNullValue_0 = [self asCharSpan:params.userName]; + } + if (params.userUniqueID == nil) { + request.userUniqueID.SetNull(); + } else { + auto & nonNullValue_0 = request.userUniqueID.SetNonNull(); + nonNullValue_0 = params.userUniqueID.unsignedIntValue; + } + if (params.userStatus == nil) { + request.userStatus.SetNull(); + } else { + auto & nonNullValue_0 = request.userStatus.SetNonNull(); + nonNullValue_0 + = static_cast>(params.userStatus.unsignedCharValue); + } + if (params.userType == nil) { + request.userType.SetNull(); + } else { + auto & nonNullValue_0 = request.userType.SetNonNull(); + nonNullValue_0 + = static_cast>(params.userType.unsignedCharValue); + } + if (params.credentialRule == nil) { + request.credentialRule.SetNull(); + } else { + auto & nonNullValue_0 = request.credentialRule.SetNonNull(); + nonNullValue_0 + = static_cast>(params.credentialRule.unsignedCharValue); } return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, @@ -14518,14 +13568,14 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * } } -- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion { - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, - (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetWeekDayScheduleID]; + NSString * logPrefix = + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetUserID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -14537,22 +13587,22 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( + auto * bridge = new MTRDoorLockClusterGetUserResponseCallbackBridge( self.device.queue, ^(id _Nullable value, NSError * _Nullable error) { MTRClustersLogCompletion(logPrefix, value, error); dispatch_async(self.callbackQueue, ^{ - completion(error); + completion(value, error); }); [workItem endWork]; }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + DoorLockClusterGetUserResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - DoorLock::Commands::SetWeekDaySchedule::Type request; + DoorLock::Commands::GetUser::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -14565,14 +13615,7 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - request.daysMask - = static_cast>(params.daysMask.unsignedCharValue); - request.startHour = params.startHour.unsignedCharValue; - request.startMinute = params.startMinute.unsignedCharValue; - request.endHour = params.endHour.unsignedCharValue; - request.endMinute = params.endMinute.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -14593,15 +13636,14 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams } } -- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, - (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetWeekDayScheduleID]; + NSString * logPrefix = + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearUserID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -14613,23 +13655,22 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge( + auto * bridge = new MTRCommandSuccessCallbackBridge( self.device.queue, ^(id _Nullable value, NSError * _Nullable error) { MTRClustersLogCompletion(logPrefix, value, error); dispatch_async(self.callbackQueue, ^{ - completion(value, error); + completion(error); }); [workItem endWork]; }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetWeekDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - DoorLock::Commands::GetWeekDaySchedule::Type request; + DoorLock::Commands::ClearUser::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -14642,7 +13683,9 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } request.userIndex = params.userIndex.unsignedShortValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, @@ -14664,14 +13707,15 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams } } -- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completion { - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, - (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearWeekDayScheduleID]; + NSString * logPrefix = + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetCredentialID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -14683,22 +13727,23 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( + auto * bridge = new MTRDoorLockClusterSetCredentialResponseCallbackBridge( self.device.queue, ^(id _Nullable value, NSError * _Nullable error) { MTRClustersLogCompletion(logPrefix, value, error); dispatch_async(self.callbackQueue, ^{ - completion(error); + completion(value, error); }); [workItem endWork]; }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + DoorLockClusterSetCredentialResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - DoorLock::Commands::ClearWeekDaySchedule::Type request; + DoorLock::Commands::SetCredential::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -14711,8 +13756,36 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.operationType + = static_cast>(params.operationType.unsignedCharValue); + request.credential.credentialType + = static_cast>( + params.credential.credentialType.unsignedCharValue); + request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; + request.credentialData = [self asByteSpan:params.credentialData]; + if (params.userIndex == nil) { + request.userIndex.SetNull(); + } else { + auto & nonNullValue_0 = request.userIndex.SetNonNull(); + nonNullValue_0 = params.userIndex.unsignedShortValue; + } + if (params.userStatus == nil) { + request.userStatus.SetNull(); + } else { + auto & nonNullValue_0 = request.userStatus.SetNonNull(); + nonNullValue_0 + = static_cast>(params.userStatus.unsignedCharValue); + } + if (params.userType == nil) { + request.userType.SetNull(); + } else { + auto & nonNullValue_0 = request.userType.SetNonNull(); + nonNullValue_0 + = static_cast>(params.userType.unsignedCharValue); + } return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -14733,14 +13806,15 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa } } -- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, - (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetYearDayScheduleID]; + (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetCredentialStatusID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -14752,22 +13826,23 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( + auto * bridge = new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge( self.device.queue, ^(id _Nullable value, NSError * _Nullable error) { MTRClustersLogCompletion(logPrefix, value, error); dispatch_async(self.callbackQueue, ^{ - completion(error); + completion(value, error); }); [workItem endWork]; }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + DoorLockClusterGetCredentialStatusResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - DoorLock::Commands::SetYearDaySchedule::Type request; + DoorLock::Commands::GetCredentialStatus::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -14780,10 +13855,10 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; + request.credential.credentialType + = static_cast>( + params.credential.credentialType.unsignedCharValue); + request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -14804,85 +13879,14 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams } } -- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, - (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetYearDayScheduleID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetYearDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetYearDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } -} - -- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion -{ - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, - (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearYearDayScheduleID]; + (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearCredentialID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -14909,7 +13913,7 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - DoorLock::Commands::ClearYearDaySchedule::Type request; + DoorLock::Commands::ClearCredential::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -14922,8 +13926,17 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + if (params.credential == nil) { + request.credential.SetNull(); + } else { + auto & nonNullValue_0 = request.credential.SetNonNull(); + nonNullValue_0.credentialType = static_cast>( + params.credential.credentialType.unsignedCharValue); + nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; + } return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -14944,1058 +13957,277 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa } } -- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (NSDictionary *)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params { - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, - (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetHolidayScheduleID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetHolidaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; - request.operatingMode - = static_cast>(params.operatingMode.unsignedCharValue); + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockStateID) + params:params]; +} - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; +- (NSDictionary *)readAttributeLockTypeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockTypeID) + params:params]; +} - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } +- (NSDictionary *)readAttributeActuatorEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeActuatorEnabledID) + params:params]; } -- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (NSDictionary *)readAttributeDoorStateWithParams:(MTRReadParams * _Nullable)params { - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, - (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetHolidayScheduleID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetHolidayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetHolidaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorStateID) + params:params]; +} - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; +- (NSDictionary *)readAttributeDoorOpenEventsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) + params:params]; +} - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } +- (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeDoorOpenEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (NSDictionary *)readAttributeDoorClosedEventsWithParams:(MTRReadParams * _Nullable)params { - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, - (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearHolidayScheduleID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearHolidaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) + params:params]; +} - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; +- (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeDoorClosedEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (NSDictionary *)readAttributeOpenPeriodWithParams:(MTRReadParams * _Nullable)params { - NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, - (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetUserID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetUser::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.operationType - = static_cast>(params.operationType.unsignedCharValue); - request.userIndex = params.userIndex.unsignedShortValue; - if (params.userName == nil) { - request.userName.SetNull(); - } else { - auto & nonNullValue_0 = request.userName.SetNonNull(); - nonNullValue_0 = [self asCharSpan:params.userName]; - } - if (params.userUniqueID == nil) { - request.userUniqueID.SetNull(); - } else { - auto & nonNullValue_0 = request.userUniqueID.SetNonNull(); - nonNullValue_0 = params.userUniqueID.unsignedIntValue; - } - if (params.userStatus == nil) { - request.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = request.userStatus.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userStatus.unsignedCharValue); - } - if (params.userType == nil) { - request.userType.SetNull(); - } else { - auto & nonNullValue_0 = request.userType.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userType.unsignedCharValue); - } - if (params.credentialRule == nil) { - request.credentialRule.SetNull(); - } else { - auto & nonNullValue_0 = request.credentialRule.SetNonNull(); - nonNullValue_0 - = static_cast>(params.credentialRule.unsignedCharValue); - } + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) + params:params]; +} - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; +- (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeOpenPeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary *)readAttributeNumberOfTotalUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, - (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetUserID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetUserResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetUserResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetUser::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfTotalUsersSupportedID) + params:params]; } -- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (NSDictionary *)readAttributeNumberOfPINUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, - (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearUserID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearUser::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfPINUsersSupportedID) + params:params]; } -- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (NSDictionary *)readAttributeNumberOfRFIDUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, - (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetCredentialID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterSetCredentialResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterSetCredentialResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetCredential::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.operationType - = static_cast>(params.operationType.unsignedCharValue); - request.credential.credentialType - = static_cast>( - params.credential.credentialType.unsignedCharValue); - request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - request.credentialData = [self asByteSpan:params.credentialData]; - if (params.userIndex == nil) { - request.userIndex.SetNull(); - } else { - auto & nonNullValue_0 = request.userIndex.SetNonNull(); - nonNullValue_0 = params.userIndex.unsignedShortValue; - } - if (params.userStatus == nil) { - request.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = request.userStatus.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userStatus.unsignedCharValue); - } - if (params.userType == nil) { - request.userType.SetNull(); - } else { - auto & nonNullValue_0 = request.userType.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userType.unsignedCharValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfRFIDUsersSupportedID) + params:params]; } -- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (NSDictionary *)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, - (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetCredentialStatusID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetCredentialStatusResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetCredentialStatus::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.credential.credentialType - = static_cast>( - params.credential.credentialType.unsignedCharValue); - request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } + return [self.device + readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfWeekDaySchedulesSupportedPerUserID) + params:params]; } -- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (NSDictionary *)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, - (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearCredentialID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearCredential::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params.credential == nil) { - request.credential.SetNull(); - } else { - auto & nonNullValue_0 = request.credential.SetNonNull(); - nonNullValue_0.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); - nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } + return [self.device + readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfYearDaySchedulesSupportedPerUserID) + params:params]; } -- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion +- (NSDictionary *)readAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRReadParams * _Nullable)params { - NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, - (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnboltDoorID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::UnboltDoor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfHolidaySchedulesSupportedID) + params:params]; +} - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } +- (NSDictionary *)readAttributeMaxPINCodeLengthWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxPINCodeLengthID) + params:params]; } -- (NSDictionary *)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeMinPINCodeLengthWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockStateID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinPINCodeLengthID) params:params]; } -- (NSDictionary *)readAttributeLockTypeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeMaxRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockTypeID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxRFIDCodeLengthID) params:params]; } -- (NSDictionary *)readAttributeActuatorEnabledWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeMinRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeActuatorEnabledID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinRFIDCodeLengthID) params:params]; } -- (NSDictionary *)readAttributeDoorStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeCredentialRulesSupportWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorStateID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeCredentialRulesSupportID) params:params]; } -- (NSDictionary *)readAttributeDoorOpenEventsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRReadParams * _Nullable)params +{ + return + [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfCredentialsSupportedPerUserID) + params:params]; +} + +- (NSDictionary *)readAttributeLanguageWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) params:params]; } -- (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributeDoorOpenEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self writeAttributeLanguageWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params +- (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeDoorClosedEventsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeLEDSettingsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) params:params]; } -- (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributeDoorClosedEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self writeAttributeLEDSettingsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params +- (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeOpenPeriodWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeAutoRelockTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) - params:params]; -} - -- (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOpenPeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeNumberOfTotalUsersSupportedWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfTotalUsersSupportedID) - params:params]; -} - -- (NSDictionary *)readAttributeNumberOfPINUsersSupportedWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfPINUsersSupportedID) - params:params]; -} - -- (NSDictionary *)readAttributeNumberOfRFIDUsersSupportedWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfRFIDUsersSupportedID) - params:params]; -} - -- (NSDictionary *)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfWeekDaySchedulesSupportedPerUserID) - params:params]; -} - -- (NSDictionary *)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfYearDaySchedulesSupportedPerUserID) - params:params]; -} - -- (NSDictionary *)readAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfHolidaySchedulesSupportedID) - params:params]; -} - -- (NSDictionary *)readAttributeMaxPINCodeLengthWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxPINCodeLengthID) - params:params]; -} - -- (NSDictionary *)readAttributeMinPINCodeLengthWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinPINCodeLengthID) - params:params]; -} - -- (NSDictionary *)readAttributeMaxRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxRFIDCodeLengthID) - params:params]; -} - -- (NSDictionary *)readAttributeMinRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinRFIDCodeLengthID) - params:params]; -} - -- (NSDictionary *)readAttributeCredentialRulesSupportWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeCredentialRulesSupportID) - params:params]; -} - -- (NSDictionary *)readAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfCredentialsSupportedPerUserID) - params:params]; -} - -- (NSDictionary *)readAttributeLanguageWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) - params:params]; -} - -- (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeLanguageWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeLEDSettingsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) - params:params]; -} - -- (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeLEDSettingsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeAutoRelockTimeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) params:params]; } @@ -16388,14 +14620,6 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeDoorLockID) - attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -16637,16 +14861,6 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; } -- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self unboltDoorWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} @end @implementation MTRClusterWindowCovering @@ -17378,14 +15592,6 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWindowCoveringID) - attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -17891,14 +16097,6 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBarrierControlID) - attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -18267,14 +16465,6 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) - attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -19592,14 +17782,6 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatID) - attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -19704,83 +17886,6 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi return self; } -- (void)stepWithParams:(MTRFanControlClusterStepParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion -{ - NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, - (unsigned int) MTRClusterIDTypeFanControlID, (unsigned int) MTRCommandIDTypeClusterFanControlCommandStepID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - FanControl::Commands::Step::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.direction - = static_cast>(params.direction.unsignedCharValue); - if (params.wrap != nil) { - auto & definedValue_0 = request.wrap.Emplace(); - definedValue_0 = params.wrap.boolValue; - } - if (params.lowestOff != nil) { - auto & definedValue_0 = request.lowestOff.Emplace(); - definedValue_0 = params.lowestOff.boolValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } -} - - (NSDictionary *)readAttributeFanModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -19983,33 +18088,6 @@ - (void)writeAttributeWindSettingWithValue:(NSDictionary *)dataV timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeAirflowDirectionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID) - params:params]; -} - -- (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeAirflowDirectionWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -20026,14 +18104,6 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFanControlID) - attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -20067,16 +18137,6 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)stepWithParams:(MTRFanControlClusterStepParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} @end @implementation MTRClusterThermostatUserInterfaceConfiguration @@ -20207,15 +18267,6 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device @@ -21311,3019 +19362,1248 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { auto * typedBridge = static_cast(bridge); Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.enhancedHue = params.enhancedHue.unsignedShortValue; - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } -} - -- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion -{ - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, - (unsigned int) MTRCommandIDTypeClusterColorControlCommandColorLoopSetID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::ColorLoopSet::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.updateFlags - = static_cast>(params.updateFlags.unsignedCharValue); - request.action = static_cast>(params.action.unsignedCharValue); - request.direction - = static_cast>(params.direction.unsignedCharValue); - request.time = params.time.unsignedShortValue; - request.startHue = params.startHue.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } -} - -- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion -{ - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, - (unsigned int) MTRCommandIDTypeClusterColorControlCommandStopMoveStepID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StopMoveStep::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } -} - -- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion -{ - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, - (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveColorTemperatureID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveColorTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedShortValue; - request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; - request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } -} - -- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion -{ - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, - (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepColorTemperatureID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepColorTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; - request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } -} - -- (NSDictionary *)readAttributeCurrentHueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentHueID) - params:params]; -} - -- (NSDictionary *)readAttributeCurrentSaturationWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentSaturationID) - params:params]; -} - -- (NSDictionary *)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeRemainingTimeID) - params:params]; -} - -- (NSDictionary *)readAttributeCurrentXWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentXID) - params:params]; -} - -- (NSDictionary *)readAttributeCurrentYWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentYID) - params:params]; -} - -- (NSDictionary *)readAttributeDriftCompensationWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeDriftCompensationID) - params:params]; -} - -- (NSDictionary *)readAttributeCompensationTextWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCompensationTextID) - params:params]; -} - -- (NSDictionary *)readAttributeColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTemperatureMiredsID) - params:params]; -} - -- (NSDictionary *)readAttributeColorModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorModeID) - params:params]; -} - -- (NSDictionary *)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) - params:params]; -} - -- (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOptionsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeNumberOfPrimariesWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeNumberOfPrimariesID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary1XWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1XID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary1YWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1YID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary1IntensityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1IntensityID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary2XWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2XID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary2YWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2YID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary2IntensityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2IntensityID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary3XWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3XID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary3YWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3YID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary3IntensityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3IntensityID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary4XWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4XID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary4YWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4YID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary4IntensityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4IntensityID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary5XWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5XID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary5YWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5YID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary5IntensityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5IntensityID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary6XWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6XID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary6YWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6YID) - params:params]; -} - -- (NSDictionary *)readAttributePrimary6IntensityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6IntensityID) - params:params]; -} - -- (NSDictionary *)readAttributeWhitePointXWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) - params:params]; -} - -- (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeWhitePointXWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeWhitePointYWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) - params:params]; -} - -- (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeWhitePointYWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeColorPointRXWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) - params:params]; -} - -- (void)writeAttributeColorPointRXWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeColorPointRXWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeColorPointRXWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeColorPointRYWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) - params:params]; -} - -- (void)writeAttributeColorPointRYWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeColorPointRYWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeColorPointRYWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeColorPointRIntensityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRIntensityID) - params:params]; -} - -- (void)writeAttributeColorPointRIntensityWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeColorPointRIntensityWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeColorPointRIntensityWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRIntensityID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeColorPointGXWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) - params:params]; -} - -- (void)writeAttributeColorPointGXWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeColorPointGXWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeColorPointGXWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeColorPointGYWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) - params:params]; -} - -- (void)writeAttributeColorPointGYWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeColorPointGYWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeColorPointGYWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeColorPointGIntensityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGIntensityID) - params:params]; -} - -- (void)writeAttributeColorPointGIntensityWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeColorPointGIntensityWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeColorPointGIntensityWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGIntensityID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeColorPointBXWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) - params:params]; -} - -- (void)writeAttributeColorPointBXWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeColorPointBXWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeColorPointBXWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeColorPointBYWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) - params:params]; -} - -- (void)writeAttributeColorPointBYWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeColorPointBYWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeColorPointBYWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeColorPointBIntensityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBIntensityID) - params:params]; -} - -- (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeColorPointBIntensityWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBIntensityID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeEnhancedCurrentHueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedCurrentHueID) - params:params]; -} - -- (NSDictionary *)readAttributeEnhancedColorModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedColorModeID) - params:params]; -} - -- (NSDictionary *)readAttributeColorLoopActiveWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopActiveID) - params:params]; -} - -- (NSDictionary *)readAttributeColorLoopDirectionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopDirectionID) - params:params]; -} - -- (NSDictionary *)readAttributeColorLoopTimeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopTimeID) - params:params]; -} - -- (NSDictionary *)readAttributeColorLoopStartEnhancedHueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStartEnhancedHueID) - params:params]; -} - -- (NSDictionary *)readAttributeColorLoopStoredEnhancedHueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStoredEnhancedHueID) - params:params]; -} - -- (NSDictionary *)readAttributeColorCapabilitiesWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorCapabilitiesID) - params:params]; -} - -- (NSDictionary *)readAttributeColorTempPhysicalMinMiredsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMinMiredsID) - params:params]; -} - -- (NSDictionary *)readAttributeColorTempPhysicalMaxMiredsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMaxMiredsID) - params:params]; -} - -- (NSDictionary *)readAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCoupleColorTempToLevelMinMiredsID) - params:params]; -} - -- (NSDictionary *)readAttributeStartUpColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeStartUpColorTemperatureMiredsID) - params:params]; -} - -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpColorTemperatureMiredsWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:nil]; -} -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeStartUpColorTemperatureMiredsID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeGeneratedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEventListID) - params:params]; -} - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAttributeListID) - params:params]; -} - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeFeatureMapID) - params:params]; -} - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeColorControlID) - attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeClusterRevisionID) - params:params]; -} - -@end - -@implementation MTRClusterColorControl (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToHueWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveHueWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepHueWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToSaturationWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveSaturationWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepSaturationWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToHueAndSaturationWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToColorWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveColorWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepColorWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToColorTemperatureWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self enhancedMoveToHueWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self enhancedMoveHueWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self enhancedStepHueWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self enhancedMoveToHueAndSaturationWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self colorLoopSetWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stopMoveStepWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveColorTemperatureWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepColorTemperatureWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -@end - -@implementation MTRClusterBallastConfiguration - -- (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 *)readAttributePhysicalMinLevelWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMinLevelID) - params:params]; -} - -- (NSDictionary *)readAttributePhysicalMaxLevelWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMaxLevelID) - params:params]; -} - -- (NSDictionary *)readAttributeBallastStatusWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastStatusID) - params:params]; -} - -- (NSDictionary *)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) - params:params]; -} - -- (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeMinLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) - params:params]; -} - -- (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeMaxLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeIntrinsicBallastFactorWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeIntrinsicBallastFactorID) - params:params]; -} - -- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeIntrinsicBallastFactorWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:nil]; -} -- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeIntrinsicBallastFactorID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeBallastFactorAdjustmentWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastFactorAdjustmentID) - params:params]; -} - -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeBallastFactorAdjustmentWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:nil]; -} -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastFactorAdjustmentID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeLampQuantityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampQuantityID) - params:params]; -} - -- (NSDictionary *)readAttributeLampTypeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) - params:params]; -} - -- (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeLampTypeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeLampManufacturerWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) - params:params]; -} - -- (void)writeAttributeLampManufacturerWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeLampManufacturerWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeLampManufacturerWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeLampRatedHoursWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) - params:params]; -} - -- (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeLampRatedHoursWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeLampBurnHoursWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) - params:params]; -} - -- (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeLampBurnHoursWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeLampAlarmModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) - params:params]; -} - -- (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeLampAlarmModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeLampBurnHoursTripPointWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursTripPointID) - params:params]; -} - -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeLampBurnHoursTripPointWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:nil]; -} -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursTripPointID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeGeneratedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeEventListID) - params:params]; -} - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID) - params:params]; -} - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeFeatureMapID) - params:params]; -} - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeBallastConfigurationID) - attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeClusterRevisionID) - params:params]; -} - -@end - -@implementation MTRClusterBallastConfiguration (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -- (NSDictionary *)readAttributeIntrinsicBalanceFactorWithParams:(MTRReadParams * _Nullable)params -{ - return [self readAttributeIntrinsicBallastFactorWithParams:params]; -} -- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeIntrinsicBallastFactorWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs]; -} -- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - [self writeAttributeIntrinsicBallastFactorWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:params]; -} -@end - -@implementation MTRClusterIlluminanceMeasurement - -- (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 *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMeasuredValueID) - params:params]; -} - -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMinMeasuredValueID) - params:params]; -} - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMaxMeasuredValueID) - params:params]; -} - -- (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeToleranceID) - params:params]; -} - -- (NSDictionary *)readAttributeLightSensorTypeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeLightSensorTypeID) - params:params]; -} - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeGeneratedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeEventListID) - params:params]; -} - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID) - params:params]; -} - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeFeatureMapID) - params:params]; -} - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeClusterRevisionID) - params:params]; -} - -@end - -@implementation MTRClusterIlluminanceMeasurement (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRClusterTemperatureMeasurement - -- (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 *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMeasuredValueID) - params:params]; -} - -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMinMeasuredValueID) - params:params]; -} - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMaxMeasuredValueID) - params:params]; -} - -- (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeToleranceID) - params:params]; -} - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeGeneratedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeEventListID) - params:params]; -} - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID) - params:params]; -} + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.enhancedHue = params.enhancedHue.unsignedShortValue; + request.saturation = params.saturation.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeFeatureMapID) - params:params]; -} + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeClusterRevisionID) - params:params]; + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; + } } -@end - -@implementation MTRClusterTemperatureMeasurement (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRClusterPressureMeasurement + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, + _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + (unsigned int) MTRCommandIDTypeClusterColorControlCommandColorLoopSetID]; + // Make a copy of params before we go async. + params = [params copy]; + NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMsParam) { + timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); + } + MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID + controller:self.device.deviceController]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.device.queue, + ^(id _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::ColorLoopSet::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.updateFlags + = static_cast>(params.updateFlags.unsignedCharValue); + request.action = static_cast>(params.action.unsignedCharValue); + request.direction + = static_cast>(params.direction.unsignedCharValue); + request.time = params.time.unsignedShortValue; + request.startHue = params.startHue.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - _endpoint = [endpointID unsignedShortValue]; - _device = device; + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; } - return self; } -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMeasuredValueID) - params:params]; -} + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, + _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + (unsigned int) MTRCommandIDTypeClusterColorControlCommandStopMoveStepID]; + // Make a copy of params before we go async. + params = [params copy]; + NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMsParam) { + timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); + } + MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID + controller:self.device.deviceController]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.device.queue, + ^(id _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::StopMoveStep::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinMeasuredValueID) - params:params]; -} + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxMeasuredValueID) - params:params]; + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; + } } -- (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeToleranceID) - params:params]; -} + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, + _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveColorTemperatureID]; + // Make a copy of params before we go async. + params = [params copy]; + NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMsParam) { + timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); + } + MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID + controller:self.device.deviceController]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.device.queue, + ^(id _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::MoveColorTemperature::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.moveMode + = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedShortValue; + request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; + request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (NSDictionary *)readAttributeScaledValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledValueID) - params:params]; -} + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; -- (NSDictionary *)readAttributeMinScaledValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinScaledValueID) - params:params]; + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; + } } -- (NSDictionary *)readAttributeMaxScaledValueWithParams:(MTRReadParams * _Nullable)params +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxScaledValueID) - params:params]; -} + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, + _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepColorTemperatureID]; + // Make a copy of params before we go async. + params = [params copy]; + NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMsParam) { + timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); + } + MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID + controller:self.device.deviceController]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.device.queue, + ^(id _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ColorControl::Commands::StepColorTemperature::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.stepMode + = static_cast>(params.stepMode.unsignedCharValue); + request.stepSize = params.stepSize.unsignedShortValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; + request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (NSDictionary *)readAttributeScaledToleranceWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledToleranceID) - params:params]; -} + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; -- (NSDictionary *)readAttributeScaleWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaleID) - params:params]; + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; + } } -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeCurrentHueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeGeneratedCommandListID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentHueID) params:params]; } -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeCurrentSaturationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAcceptedCommandListID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentSaturationID) params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeEventListID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeRemainingTimeID) params:params]; } -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeCurrentXWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentXID) params:params]; } -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeCurrentYWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeFeatureMapID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentYID) params:params]; } -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeDriftCompensationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePressureMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeClusterRevisionID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeDriftCompensationID) params:params]; } -@end - -@implementation MTRClusterPressureMeasurement (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRClusterFlowMeasurement - -- (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 *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeCompensationTextWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMeasuredValueID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCompensationTextID) params:params]; } -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMinMeasuredValueID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTemperatureMiredsID) params:params]; } -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMaxMeasuredValueID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorModeID) params:params]; } -- (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeToleranceID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) params:params]; } -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeGeneratedCommandListID) - params:params]; + [self writeAttributeOptionsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAcceptedCommandListID) - params:params]; -} + NSNumber * timedWriteTimeout = params.timedWriteTimeout; -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeEventListID) - params:params]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeNumberOfPrimariesWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeNumberOfPrimariesID) params:params]; } -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary1XWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeFeatureMapID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1XID) params:params]; } -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary1YWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFlowMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeClusterRevisionID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1YID) params:params]; } -@end - -@implementation MTRClusterFlowMeasurement (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRClusterRelativeHumidityMeasurement - -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (NSDictionary *)readAttributePrimary1IntensityWithParams:(MTRReadParams * _Nullable)params { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _endpoint = [endpointID unsignedShortValue]; - _device = device; - } - return self; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1IntensityID) + params:params]; } -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary2XWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMeasuredValueID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2XID) params:params]; } -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary2YWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMinMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2YID) + params:params]; } -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary2IntensityWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMaxMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2IntensityID) + params:params]; } -- (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary3XWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeToleranceID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3XID) params:params]; } -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary3YWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3YID) + params:params]; } -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary3IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3IntensityID) + params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary4XWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4XID) params:params]; } -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary4YWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4YID) params:params]; } -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary4IntensityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeFeatureMapID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4IntensityID) params:params]; } -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary5XWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeClusterRevisionID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5XID) + params:params]; } -@end - -@implementation MTRClusterRelativeHumidityMeasurement (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (NSDictionary *)readAttributePrimary5YWithParams:(MTRReadParams * _Nullable)params { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5YID) + params:params]; } -@end - -@implementation MTRClusterOccupancySensing - -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (NSDictionary *)readAttributePrimary5IntensityWithParams:(MTRReadParams * _Nullable)params { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _endpoint = [endpointID unsignedShortValue]; - _device = device; - } - return self; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5IntensityID) + params:params]; } -- (NSDictionary *)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary6XWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancyID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6XID) params:params]; } -- (NSDictionary *)readAttributeOccupancySensorTypeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary6YWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6YID) params:params]; } -- (NSDictionary *)readAttributeOccupancySensorTypeBitmapWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePrimary6IntensityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeBitmapID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6IntensityID) params:params]; } -- (NSDictionary *)readAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeWhitePointXWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) + params:params]; } -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:nil]; + [self writeAttributeWhitePointXWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params +- (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeWhitePointYWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) + params:params]; } -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:nil]; + [self writeAttributeWhitePointYWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params +- (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) - params:params]; -} - -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:nil]; -} -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) - params:params]; -} - -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:nil]; -} -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) - params:params]; -} - -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:nil]; -} -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorPointRXWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) + params:params]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributeColorPointRXWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:nil]; + [self writeAttributeColorPointRXWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params +- (void)writeAttributeColorPointRXWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorPointRYWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) + params:params]; } -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributeColorPointRYWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:nil]; + [self writeAttributeColorPointRYWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params +- (void)writeAttributeColorPointRYWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorPointRIntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRIntensityID) + params:params]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributeColorPointRIntensityWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:nil]; + [self writeAttributeColorPointRIntensityWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params +- (void)writeAttributeColorPointRIntensityWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRIntensityID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams: - (MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorPointGXWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID: - @(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) + params:params]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributeColorPointGXWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:nil]; + [self writeAttributeColorPointGXWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params +- (void)writeAttributeColorPointGXWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device - writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID: - @(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorPointGYWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeGeneratedCommandListID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) params:params]; } -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeColorPointGYWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID) - params:params]; + [self writeAttributeColorPointGYWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeColorPointGYWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorPointGIntensityWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGIntensityID) params:params]; } -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeColorPointGIntensityWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeFeatureMapID) - params:params]; + [self writeAttributeColorPointGIntensityWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeColorPointGIntensityWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGIntensityID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorPointBXWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOccupancySensingID) - attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeClusterRevisionID) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) params:params]; } -@end - -@implementation MTRClusterOccupancySensing (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)writeAttributeColorPointBXWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self writeAttributeColorPointBXWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary *)readAttributePirOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeColorPointBXWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self readAttributePIROccupiedToUnoccupiedDelayWithParams:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs + +- (NSDictionary *)readAttributeColorPointBYWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) + params:params]; } -- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params + +- (void)writeAttributeColorPointBYWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:params]; + [self writeAttributeColorPointBYWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (NSDictionary *)readAttributePirUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeColorPointBYWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self readAttributePIRUnoccupiedToOccupiedDelayWithParams:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs + +- (NSDictionary *)readAttributeColorPointBIntensityWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBIntensityID) + params:params]; } -- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params + +- (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:params]; + [self writeAttributeColorPointBIntensityWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (NSDictionary *)readAttributePirUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self readAttributePIRUnoccupiedToOccupiedThresholdWithParams:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBIntensityID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs + +- (NSDictionary *)readAttributeEnhancedCurrentHueWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedCurrentHueID) + params:params]; } -- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params + +- (NSDictionary *)readAttributeEnhancedColorModeWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedColorModeID) + params:params]; } -@end - -@implementation MTRClusterCarbonMonoxideConcentrationMeasurement -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (NSDictionary *)readAttributeColorLoopActiveWithParams:(MTRReadParams * _Nullable)params { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _endpoint = [endpointID unsignedShortValue]; - _device = device; - } - return self; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopActiveID) + params:params]; } -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorLoopDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopDirectionID) + params:params]; } -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorLoopTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMinMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopTimeID) + params:params]; } -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorLoopStartEnhancedHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMaxMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStartEnhancedHueID) + params:params]; } -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorLoopStoredEnhancedHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStoredEnhancedHueID) + params:params]; } -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorCapabilitiesWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorCapabilitiesID) + params:params]; } -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorTempPhysicalMinMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMinMiredsID) + params:params]; } -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeColorTempPhysicalMaxMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMaxMiredsID) + params:params]; } -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeUncertaintyID) - params:params]; + return + [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCoupleColorTempToLevelMinMiredsID) + params:params]; } -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeStartUpColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementUnitID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeStartUpColorTemperatureMiredsID) + params:params]; } -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementMediumID) - params:params]; + [self writeAttributeStartUpColorTemperatureMiredsWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:nil]; } - -- (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeLevelValueID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeStartUpColorTemperatureMiredsID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeEventListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAcceptedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAttributeListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAttributeListID) + params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeFeatureMapID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeFeatureMapID) + params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeClusterRevisionID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeClusterRevisionID) + params:params]; } @end -@implementation MTRClusterCarbonDioxideConcentrationMeasurement +@implementation MTRClusterColorControl (Deprecated) -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _endpoint = [endpointID unsignedShortValue]; - _device = device; - } - return self; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasuredValueID) - params:params]; + [self moveToHueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMinMeasuredValueID) - params:params]; + [self moveHueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) - params:params]; + [self stepHueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueID) - params:params]; + [self moveToSaturationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) - params:params]; + [self moveSaturationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) - params:params]; + [self stepSaturationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) - params:params]; + [self moveToHueAndSaturationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeUncertaintyID) - params:params]; + [self moveToColorWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementUnitID) - params:params]; + [self moveColorWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementMediumID) - params:params]; + [self stepColorWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params +- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeLevelValueID) - params:params]; + [self moveToColorTemperatureWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeGeneratedCommandListID) - params:params]; + [self enhancedMoveToHueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAcceptedCommandListID) - params:params]; + [self enhancedMoveHueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeEventListID) - params:params]; + [self enhancedStepHueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enhancedMoveToHueAndSaturationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self colorLoopSetWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAttributeListID) - params:params]; + [self stopMoveStepWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeFeatureMapID) - params:params]; + [self moveColorTemperatureWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeClusterRevisionID) - params:params]; + [self stepColorTemperatureWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - @end -@implementation MTRClusterNitrogenDioxideConcentrationMeasurement +@implementation MTRClusterBallastConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -24338,333 +20618,386 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi return self; } -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePhysicalMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMinLevelID) + params:params]; } -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePhysicalMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMinMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMaxLevelID) + params:params]; } -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeBallastStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastStatusID) + params:params]; } -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) + params:params]; } -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) - params:params]; + [self writeAttributeMinLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) + params:params]; } -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeUncertaintyID) - params:params]; + [self writeAttributeMaxLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementUnitID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeIntrinsicBallastFactorWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementMediumID) - params:params]; + return + [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeIntrinsicBallastFactorID) + params:params]; } -- (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeLevelValueID) - params:params]; + [self writeAttributeIntrinsicBallastFactorWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:nil]; } - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeGeneratedCommandListID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeIntrinsicBallastFactorID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeBallastFactorAdjustmentWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAcceptedCommandListID) - params:params]; + return + [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastFactorAdjustmentID) + params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeEventListID) - params:params]; + [self writeAttributeBallastFactorAdjustmentWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:nil]; } - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAttributeListID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastFactorAdjustmentID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeLampQuantityWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeFeatureMapID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampQuantityID) + params:params]; } -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeLampTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeClusterRevisionID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) + params:params]; } -@end - -@implementation MTRClusterOzoneConcentrationMeasurement - -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } + [self writeAttributeLampTypeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; - _endpoint = [endpointID unsignedShortValue]; - _device = device; - } - return self; + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeLampManufacturerWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) + params:params]; } -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeLampManufacturerWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMinMeasuredValueID) - params:params]; + [self writeAttributeLampManufacturerWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeLampManufacturerWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMaxMeasuredValueID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeLampRatedHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) + params:params]; } -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueWindowID) - params:params]; + [self writeAttributeLampRatedHoursWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeLampBurnHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) + params:params]; } -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueWindowID) - params:params]; + [self writeAttributeLampBurnHoursWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeLampAlarmModeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeUncertaintyID) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) params:params]; } -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeLampAlarmModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary *)readAttributeLampBurnHoursTripPointWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementUnitID) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursTripPointID) params:params]; } -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementMediumID) - params:params]; + [self writeAttributeLampBurnHoursTripPointWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:nil]; } - -- (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeLevelValueID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursTripPointID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeEventListID) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAttributeListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID) + params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeFeatureMapID) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeClusterRevisionID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeClusterRevisionID) + params:params]; +} + +@end + +@implementation MTRClusterBallastConfiguration (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (NSDictionary *)readAttributeIntrinsicBalanceFactorWithParams:(MTRReadParams * _Nullable)params +{ + return [self readAttributeIntrinsicBallastFactorWithParams:params]; +} +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeIntrinsicBallastFactorWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs]; +} +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + [self writeAttributeIntrinsicBallastFactorWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:params]; +} @end -@implementation MTRClusterPM25ConcentrationMeasurement +@implementation MTRClusterIlluminanceMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -24682,153 +21015,195 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasuredValueID) + clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMinMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMinMeasuredValueID) + params:params]; } - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMaxMeasuredValueID) + params:params]; +} + +- (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeToleranceID) + params:params]; +} + +- (NSDictionary *)readAttributeLightSensorTypeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeLightSensorTypeID) + params:params]; +} + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMaxMeasuredValueID) + clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeGeneratedCommandListID) params:params]; } -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAcceptedCommandListID) + params:params]; } -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueWindowID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID) + params:params]; } -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeFeatureMapID) + params:params]; +} + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeClusterRevisionID) + params:params]; +} + +@end + +@implementation MTRClusterIlluminanceMeasurement (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +@end + +@implementation MTRClusterTemperatureMeasurement + +- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) - params:params]; + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _endpoint = [endpointID unsignedShortValue]; + _device = device; + } + return self; } -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeUncertaintyID) + clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMeasuredValueID) params:params]; } -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementUnitID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMinMeasuredValueID) + params:params]; } -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementMediumID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMaxMeasuredValueID) + params:params]; } -- (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeLevelValueID) + clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeToleranceID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeGeneratedCommandListID) - params:params]; + return + [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeEventListID) + clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAttributeListID) + clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeFeatureMapID) + clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeClusterRevisionID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeClusterRevisionID) + params:params]; +} + +@end + +@implementation MTRClusterTemperatureMeasurement (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } @end -@implementation MTRClusterFormaldehydeConcentrationMeasurement +@implementation MTRClusterPressureMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -24845,162 +21220,128 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMeasuredValueID) + params:params]; } - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMinMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinMeasuredValueID) + params:params]; } - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMaxMeasuredValueID) - params:params]; -} - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueID) - params:params]; -} - -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueWindowID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxMeasuredValueID) + params:params]; } -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeToleranceID) + params:params]; } -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueWindowID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledValueID) + params:params]; } -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeMinScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeUncertaintyID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinScaledValueID) + params:params]; } -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeMaxScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementUnitID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxScaledValueID) + params:params]; } -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeScaledToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementMediumID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledToleranceID) + params:params]; } -- (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeScaleWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeLevelValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaleID) + params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeEventListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAcceptedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAttributeListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID) + params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeFeatureMapID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeFeatureMapID) + params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeClusterRevisionID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeClusterRevisionID) + params:params]; +} + +@end + +@implementation MTRClusterPressureMeasurement (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } @end -@implementation MTRClusterPM1ConcentrationMeasurement +@implementation MTRClusterFlowMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -25018,153 +21359,87 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasuredValueID) + clusterID:@(MTRClusterIDTypeFlowMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMinMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeFlowMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMinMeasuredValueID) + params:params]; } - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMaxMeasuredValueID) - params:params]; -} - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueID) - params:params]; -} - -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueWindowID) - params:params]; -} - -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueID) - params:params]; -} - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) - params:params]; -} - -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeUncertaintyID) + clusterID:@(MTRClusterIDTypeFlowMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMaxMeasuredValueID) params:params]; } -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementUnitID) - params:params]; -} - -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params -{ - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementMediumID) - params:params]; -} - -- (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeLevelValueID) + clusterID:@(MTRClusterIDTypeFlowMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeToleranceID) params:params]; } - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeFlowMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeGeneratedCommandListID) + params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeEventListID) + clusterID:@(MTRClusterIDTypeFlowMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAttributeListID) + clusterID:@(MTRClusterIDTypeFlowMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeFeatureMapID) + clusterID:@(MTRClusterIDTypeFlowMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeClusterRevisionID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeFlowMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeClusterRevisionID) + params:params]; } @end -@implementation MTRClusterPM10ConcentrationMeasurement +@implementation MTRClusterFlowMeasurement (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRClusterRelativeHumidityMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -25182,8 +21457,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasuredValueID) + clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMeasuredValueID) params:params]; } @@ -25191,8 +21466,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMinMeasuredValueID) + clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMinMeasuredValueID) params:params]; } @@ -25200,485 +21475,493 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMaxMeasuredValueID) + clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMaxMeasuredValueID) params:params]; } -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeToleranceID) + params:params]; } -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueWindowID) + clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID) params:params]; } -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueID) + clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID) + params:params]; } -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeUncertaintyID) + clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeFeatureMapID) params:params]; } -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementUnitID) + clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeClusterRevisionID) params:params]; } -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementMediumID) - params:params]; -} +@end -- (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeLevelValueID) - params:params]; -} +@implementation MTRClusterRelativeHumidityMeasurement (Deprecated) -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeGeneratedCommandListID) - params:params]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +@end + +@implementation MTRClusterOccupancySensing + +- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAcceptedCommandListID) - params:params]; + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _endpoint = [endpointID unsignedShortValue]; + _device = device; + } + return self; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeEventListID) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancyID) params:params]; } -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeOccupancySensorTypeWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAttributeListID) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeID) params:params]; } -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeOccupancySensorTypeBitmapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeFeatureMapID) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeBitmapID) params:params]; } -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeClusterRevisionID) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) params:params]; } -@end - -@implementation MTRClusterTotalVolatileOrganicCompoundsConcentrationMeasurement - -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _endpoint = [endpointID unsignedShortValue]; - _device = device; - } - return self; + [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:nil]; } - -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasuredValueID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMinMeasuredValueID) - params:params]; + return + [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) + params:params]; } -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMaxMeasuredValueID) - params:params]; + [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:nil]; } - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueWindowID) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) params:params]; } -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueID) - params:params]; + [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:nil]; } - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueWindowID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device + writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeUncertaintyID) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) params:params]; } -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementUnitID) - params:params]; + [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:nil]; } - -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementMediumID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device + writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeLevelValueID) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) params:params]; } -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeGeneratedCommandListID) - params:params]; + [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:nil]; } - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAcceptedCommandListID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device + writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeEventListID) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) params:params]; } -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAttributeListID) - params:params]; + [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:nil]; } - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeFeatureMapID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device + writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) - attributeID: - @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeClusterRevisionID) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) params:params]; } -@end - -@implementation MTRClusterRadonConcentrationMeasurement - -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _endpoint = [endpointID unsignedShortValue]; - _device = device; - } - return self; + [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:nil]; } - -- (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasuredValueID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device + writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMinMeasuredValueID) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) params:params]; } -- (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMaxMeasuredValueID) - params:params]; + [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:nil]; } - -- (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device + writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams: + (MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueWindowID) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID: + @(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) params:params]; } -- (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueID) - params:params]; + [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:nil]; } - -- (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueWindowID) - params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device + writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID: + @(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeUncertaintyID) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeGeneratedCommandListID) params:params]; } -- (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementUnitID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID) + params:params]; } -- (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementMediumID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID) + params:params]; } -- (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeLevelValueID) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeFeatureMapID) params:params]; } -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeGeneratedCommandListID) - params:params]; + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeClusterRevisionID) + params:params]; } -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +@end + +@implementation MTRClusterOccupancySensing (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAcceptedCommandListID) - params:params]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePirOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeEventListID) - params:params]; + return [self readAttributePIROccupiedToUnoccupiedDelayWithParams:params]; } - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAttributeListID) - params:params]; + [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs]; } - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeFeatureMapID) - params:params]; + [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:params]; } - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePirUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return - [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeClusterRevisionID) - params:params]; + return [self readAttributePIRUnoccupiedToOccupiedDelayWithParams:params]; +} +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs]; +} +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:params]; +} +- (NSDictionary *)readAttributePirUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params +{ + return [self readAttributePIRUnoccupiedToOccupiedThresholdWithParams:params]; +} +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs]; +} +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + params:params]; } - @end @implementation MTRClusterWakeOnLAN @@ -25720,14 +22003,6 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWakeOnLANID) - attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -26027,14 +22302,6 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeChannelID) - attributeID:@(MTRAttributeIDTypeClusterChannelAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -26225,14 +22492,6 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTargetNavigatorID) - attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -27194,14 +23453,6 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaPlaybackID) - attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -27740,230 +23991,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - MediaInput::Commands::RenameInput::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.index = params.index.unsignedCharValue; - request.name = [self asCharSpan:params.name]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } -} - -- (NSDictionary *)readAttributeInputListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeInputListID) - params:params]; -} - -- (NSDictionary *)readAttributeCurrentInputWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeCurrentInputID) - params:params]; -} - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeGeneratedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeEventListID) - params:params]; -} - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID) - params:params]; -} - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID) - params:params]; -} - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeMediaInputID) - attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeClusterRevisionID) - params:params]; -} - -@end - -@implementation MTRClusterMediaInput (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self selectInputWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self showInputStatusWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)showInputStatusWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self showInputStatusWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; -} -- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self hideInputStatusWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -- (void)hideInputStatusWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self hideInputStatusWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; -} -- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self renameInputWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:completionHandler]; -} -@end - -@implementation MTRClusterLowPower - -- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _endpoint = [endpointID unsignedShortValue]; - _device = device; - } - return self; -} - -- (void)sleepWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion -{ - [self sleepWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion -{ - NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, - (unsigned int) MTRClusterIDTypeLowPowerID, (unsigned int) MTRCommandIDTypeClusterLowPowerCommandSleepID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LowPower::Commands::Sleep::Type request; + MediaInput::Commands::RenameInput::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -27976,6 +24004,8 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } + request.index = params.index.unsignedCharValue; + request.name = [self asCharSpan:params.name]; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -27996,27 +24026,232 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params } } +- (NSDictionary *)readAttributeInputListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeMediaInputID) + attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeInputListID) + params:params]; +} + +- (NSDictionary *)readAttributeCurrentInputWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeMediaInputID) + attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeCurrentInputID) + params:params]; +} + - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeLowPowerID) - attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeGeneratedCommandListID) + clusterID:@(MTRClusterIDTypeMediaInputID) + attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeGeneratedCommandListID) params:params]; } - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeMediaInputID) + attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeMediaInputID) + attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID) + params:params]; +} + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeMediaInputID) + attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID) + params:params]; +} + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeMediaInputID) + attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeClusterRevisionID) + params:params]; +} + +@end + +@implementation MTRClusterMediaInput (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self selectInputWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self showInputStatusWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)showInputStatusWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self showInputStatusWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; +} +- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self hideInputStatusWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)hideInputStatusWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self hideInputStatusWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completionHandler:completionHandler]; +} +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self renameInputWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +@end + +@implementation MTRClusterLowPower + +- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _endpoint = [endpointID unsignedShortValue]; + _device = device; + } + return self; +} + +- (void)sleepWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion +{ + [self sleepWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion +{ + NSString * logPrefix = + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + (unsigned int) MTRClusterIDTypeLowPowerID, (unsigned int) MTRCommandIDTypeClusterLowPowerCommandSleepID]; + // Make a copy of params before we go async. + params = [params copy]; + NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMsParam) { + timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); + } + MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID + controller:self.device.deviceController]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.device.queue, + ^(id _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + LowPower::Commands::Sleep::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; + + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; + } +} + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) - attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID) + attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeGeneratedCommandListID) params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) - attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeEventListID) + attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID) params:params]; } @@ -28175,14 +24410,6 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeKeypadInputID) - attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -28597,14 +24824,6 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeContentLauncherID) - attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -28852,14 +25071,6 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAudioOutputID) - attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -29213,14 +25424,6 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationLauncherID) - attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -29393,14 +25596,6 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeApplicationBasicID) - attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -29688,14 +25883,6 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeAccountLoginID) - attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -31189,14 +27376,6 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeElectricalMeasurementID) - attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -35841,14 +32020,6 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da params:params]; } -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeUnitTestingID) - attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEventListID) - params:params]; -} - - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h index 8c738156db2ce6..b4af617603629f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h @@ -201,41 +201,6 @@ @property (nonatomic, readonly) MTRDevice * device; @end -@interface MTRClusterTemperatureControl () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterRefrigeratorAlarm () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterAirQuality () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterSmokeCOAlarm () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterOperationalState () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterHEPAFilterMonitoring () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterActivatedCarbonFilterMonitoring () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - @interface MTRClusterDoorLock () @property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @@ -311,56 +276,6 @@ @property (nonatomic, readonly) MTRDevice * device; @end -@interface MTRClusterCarbonMonoxideConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterCarbonDioxideConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterNitrogenDioxideConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterOzoneConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterPM25ConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterFormaldehydeConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterPM1ConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterPM10ConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterTotalVolatileOrganicCompoundsConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - -@interface MTRClusterRadonConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - @interface MTRClusterWakeOnLAN () @property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index c8e9c13f87d418..19136215429986 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -155,7 +155,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRGroupsClusterAddGroupResponseParams (Deprecated) @@ -237,7 +238,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRGroupsClusterViewGroupResponseParams (Deprecated) @@ -311,7 +313,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -385,7 +388,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRGroupsClusterRemoveGroupResponseParams (Deprecated) @@ -544,7 +548,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRScenesClusterAddSceneResponseParams (Deprecated) @@ -640,7 +645,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRScenesClusterViewSceneResponseParams (Deprecated) @@ -730,7 +736,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRScenesClusterRemoveSceneResponseParams (Deprecated) @@ -813,7 +820,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRScenesClusterRemoveAllScenesResponseParams (Deprecated) @@ -900,7 +908,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRScenesClusterStoreSceneResponseParams (Deprecated) @@ -1030,7 +1039,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRScenesClusterGetSceneMembershipResponseParams (Deprecated) @@ -1123,7 +1133,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRScenesClusterEnhancedAddSceneResponseParams (Deprecated) @@ -1219,7 +1230,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRScenesClusterEnhancedViewSceneResponseParams (Deprecated) @@ -1321,7 +1333,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRScenesClusterCopySceneResponseParams (Deprecated) @@ -2360,7 +2373,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterQueryImageResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), @@ -2441,7 +2455,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), @@ -2608,7 +2623,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2681,7 +2697,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2747,7 +2764,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2821,7 +2839,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -2959,7 +2978,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3031,7 +3051,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3142,7 +3163,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRDiagnosticLogsClusterRetrieveLogsResponseParams (Deprecated) @@ -3501,7 +3523,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTROperationalCredentialsClusterAttestationResponseParams (Deprecated) @@ -3573,7 +3596,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3643,7 +3667,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3753,7 +3778,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -3947,7 +3973,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4041,7 +4068,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4075,253 +4103,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE -@interface MTRTemperatureControlClusterSetTemperatureParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nullable targetTemperature MTR_NEWLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nullable targetTemperatureLevel MTR_NEWLY_AVAILABLE; -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_NEWLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterSelfTestRequestParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_NEWLY_AVAILABLE -@interface MTROperationalStateClusterPauseParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_NEWLY_AVAILABLE -@interface MTROperationalStateClusterStopParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_NEWLY_AVAILABLE -@interface MTROperationalStateClusterStartParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_NEWLY_AVAILABLE -@interface MTROperationalStateClusterResumeParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_NEWLY_AVAILABLE -@interface MTROperationalStateClusterOperationalCommandResponseParams : NSObject - -@property (nonatomic, copy) MTROperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_NEWLY_AVAILABLE; - -/** - * Initialize an MTROperationalStateClusterOperationalCommandResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; -@end - -MTR_NEWLY_AVAILABLE -@interface MTRHEPAFilterMonitoringClusterResetConditionParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_NEWLY_AVAILABLE -@interface MTRActivatedCarbonFilterMonitoringClusterResetConditionParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRDoorLockClusterLockDoorParams : NSObject @@ -4535,7 +4316,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4679,7 +4461,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4821,7 +4604,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4984,7 +4768,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end @interface MTRDoorLockClusterGetUserResponseParams (Deprecated) @@ -5102,7 +4887,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5179,7 +4965,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5213,36 +5000,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE -@interface MTRDoorLockClusterUnboltDoorParams : NSObject - -@property (nonatomic, copy) NSData * _Nullable pinCode MTR_NEWLY_AVAILABLE; -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRWindowCoveringClusterUpOrOpenParams : NSObject /** @@ -5580,7 +5337,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -5681,40 +5439,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE -@interface MTRFanControlClusterStepParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull direction MTR_NEWLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nullable wrap MTR_NEWLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nullable lowestOff MTR_NEWLY_AVAILABLE; -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRColorControlClusterMoveToHueParams : NSObject @@ -6505,7 +6229,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6638,7 +6363,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -6967,7 +6693,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -7209,7 +6936,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -7317,7 +7045,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTRContentLauncherClusterLauncherResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), @@ -7517,7 +7246,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -7584,7 +7314,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -7689,7 +7420,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -7765,7 +7497,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -7868,7 +7601,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTRUnitTestingClusterTestSpecificResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), @@ -7942,7 +7676,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTRUnitTestingClusterTestAddArgumentsResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), @@ -8016,7 +7751,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTRUnitTestingClusterTestSimpleArgumentResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), @@ -8100,7 +7836,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTRUnitTestingClusterTestStructArrayArgumentResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), @@ -8178,7 +7915,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTRUnitTestingClusterTestListInt8UReverseResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), @@ -8256,7 +7994,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTRUnitTestingClusterTestEnumsResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), @@ -8348,7 +8087,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTRUnitTestingClusterTestNullableOptionalResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), @@ -8501,7 +8241,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTRUnitTestingClusterTestComplexNullableOptionalResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), @@ -8579,7 +8320,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTRUnitTestingClusterBooleanResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), @@ -8656,7 +8398,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTRUnitTestingClusterSimpleStructResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), @@ -8732,7 +8475,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTRUnitTestingClusterTestEmitTestEventResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), @@ -8810,7 +8554,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_DEPRECATED("Please use MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 20d5e7fc2142a1..19c853bad68f5d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -6437,328 +6437,6 @@ - (NSString *)description return descriptionString; } -@end -@implementation MTRTemperatureControlClusterSetTemperatureParams -- (instancetype)init -{ - if (self = [super init]) { - - _targetTemperature = nil; - - _targetTemperatureLevel = nil; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; - - other.targetTemperature = self.targetTemperature; - other.targetTemperatureLevel = self.targetTemperatureLevel; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: targetTemperature:%@; targetTemperatureLevel:%@; >", - NSStringFromClass([self class]), _targetTemperature, _targetTemperatureLevel]; - return descriptionString; -} - -@end -@implementation MTRSmokeCOAlarmClusterSelfTestRequestParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRSmokeCOAlarmClusterSelfTestRequestParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end -@implementation MTROperationalStateClusterPauseParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTROperationalStateClusterPauseParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end -@implementation MTROperationalStateClusterStopParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTROperationalStateClusterStopParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end -@implementation MTROperationalStateClusterStartParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTROperationalStateClusterStartParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end -@implementation MTROperationalStateClusterResumeParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTROperationalStateClusterResumeParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end -@implementation MTROperationalStateClusterOperationalCommandResponseParams -- (instancetype)init -{ - if (self = [super init]) { - - _commandResponseState = [MTROperationalStateClusterErrorStateStruct new]; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTROperationalStateClusterOperationalCommandResponseParams alloc] init]; - - other.commandResponseState = self.commandResponseState; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = - [NSString stringWithFormat:@"<%@: commandResponseState:%@; >", NSStringFromClass([self class]), _commandResponseState]; - return descriptionString; -} - -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - -@end - -@implementation MTROperationalStateClusterOperationalCommandResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct: - (const chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct -{ - { - self.commandResponseState = [MTROperationalStateClusterErrorStateStruct new]; - self.commandResponseState.errorStateID = - [NSNumber numberWithUnsignedChar:decodableStruct.commandResponseState.errorStateID]; - if (decodableStruct.commandResponseState.errorStateLabel.HasValue()) { - self.commandResponseState.errorStateLabel = AsString(decodableStruct.commandResponseState.errorStateLabel.Value()); - if (self.commandResponseState.errorStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.commandResponseState.errorStateLabel = nil; - } - if (decodableStruct.commandResponseState.errorStateDetails.HasValue()) { - self.commandResponseState.errorStateDetails = AsString(decodableStruct.commandResponseState.errorStateDetails.Value()); - if (self.commandResponseState.errorStateDetails == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.commandResponseState.errorStateDetails = nil; - } - } - return CHIP_NO_ERROR; -} -@end -@implementation MTRHEPAFilterMonitoringClusterResetConditionParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRHEPAFilterMonitoringClusterResetConditionParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end -@implementation MTRActivatedCarbonFilterMonitoringClusterResetConditionParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRActivatedCarbonFilterMonitoringClusterResetConditionParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - @end @implementation MTRDoorLockClusterLockDoorParams - (instancetype)init @@ -8230,37 +7908,6 @@ - (NSString *)description return descriptionString; } -@end -@implementation MTRDoorLockClusterUnboltDoorParams -- (instancetype)init -{ - if (self = [super init]) { - - _pinCode = nil; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - - other.pinCode = self.pinCode; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString - stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; - return descriptionString; -} - @end @implementation MTRWindowCoveringClusterUpOrOpenParams - (instancetype)init @@ -8783,43 +8430,6 @@ - (NSString *)description return descriptionString; } -@end -@implementation MTRFanControlClusterStepParams -- (instancetype)init -{ - if (self = [super init]) { - - _direction = @(0); - - _wrap = nil; - - _lowestOff = nil; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRFanControlClusterStepParams alloc] init]; - - other.direction = self.direction; - other.wrap = self.wrap; - other.lowestOff = self.lowestOff; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: direction:%@; wrap:%@; lowestOff:%@; >", - NSStringFromClass([self class]), _direction, _wrap, _lowestOff]; - return descriptionString; -} - @end @implementation MTRColorControlClusterMoveToHueParams - (instancetype)init diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 28f95b18ae822e..1de843868eb61f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -217,13 +217,6 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTROperationalStateClusterOperationalCommandResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct: - (const chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct; - -@end - @interface MTRDoorLockClusterGetWeekDayScheduleResponseParams (InternalMethods) - (CHIP_ERROR)_setFieldsFromDecodableStruct: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 7705e88b2bda4e..f008ae4ce6a5cc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -1554,326 +1554,6 @@ static id _Nullable DecodeEventPayloadForModeSelectCluster(EventId aEventId, TLV *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; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForRefrigeratorAlarmCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::RefrigeratorAlarm; - switch (aEventId) { - case Events::Notify::Id: { - Events::Notify::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTRRefrigeratorAlarmClusterNotifyEvent new]; - - do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedInt:cppValue.active.Raw()]; - value.active = memberValue; - } while (0); - do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedInt:cppValue.inactive.Raw()]; - value.inactive = memberValue; - } while (0); - do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedInt:cppValue.state.Raw()]; - value.state = memberValue; - } while (0); - do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedInt:cppValue.mask.Raw()]; - value.mask = memberValue; - } while (0); - - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForAirQualityCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::AirQuality; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForSmokeCOAlarmCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::SmokeCoAlarm; - switch (aEventId) { - case Events::SmokeAlarm::Id: { - Events::SmokeAlarm::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTRSmokeCOAlarmClusterSmokeAlarmEvent new]; - - return value; - } - case Events::COAlarm::Id: { - Events::COAlarm::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTRSmokeCOAlarmClusterCOAlarmEvent new]; - - return value; - } - case Events::LowBattery::Id: { - Events::LowBattery::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTRSmokeCOAlarmClusterLowBatteryEvent new]; - - return value; - } - case Events::HardwareFault::Id: { - Events::HardwareFault::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTRSmokeCOAlarmClusterHardwareFaultEvent new]; - - return value; - } - case Events::EndOfService::Id: { - Events::EndOfService::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTRSmokeCOAlarmClusterEndOfServiceEvent new]; - - return value; - } - case Events::SelfTestComplete::Id: { - Events::SelfTestComplete::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTRSmokeCOAlarmClusterSelfTestCompleteEvent new]; - - return value; - } - case Events::AlarmMuted::Id: { - Events::AlarmMuted::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTRSmokeCOAlarmClusterAlarmMutedEvent new]; - - return value; - } - case Events::MuteEnded::Id: { - Events::MuteEnded::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTRSmokeCOAlarmClusterMuteEndedEvent new]; - - return value; - } - case Events::InterconnectSmokeAlarm::Id: { - Events::InterconnectSmokeAlarm::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTRSmokeCOAlarmClusterInterconnectSmokeAlarmEvent new]; - - return value; - } - case Events::InterconnectCOAlarm::Id: { - Events::InterconnectCOAlarm::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTRSmokeCOAlarmClusterInterconnectCOAlarmEvent new]; - - return value; - } - case Events::AllClear::Id: { - Events::AllClear::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTRSmokeCOAlarmClusterAllClearEvent new]; - - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForOperationalStateCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::OperationalState; - switch (aEventId) { - case Events::OperationalError::Id: { - Events::OperationalError::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTROperationalStateClusterOperationalErrorEvent new]; - - do { - MTROperationalStateClusterErrorStateStruct * _Nonnull memberValue; - memberValue = [MTROperationalStateClusterErrorStateStruct new]; - memberValue.errorStateID = [NSNumber numberWithUnsignedChar:cppValue.errorState.errorStateID]; - if (cppValue.errorState.errorStateLabel.HasValue()) { - memberValue.errorStateLabel = AsString(cppValue.errorState.errorStateLabel.Value()); - if (memberValue.errorStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - memberValue.errorStateLabel = nil; - } - if (cppValue.errorState.errorStateDetails.HasValue()) { - memberValue.errorStateDetails = AsString(cppValue.errorState.errorStateDetails.Value()); - if (memberValue.errorStateDetails == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - memberValue.errorStateDetails = nil; - } - value.errorState = memberValue; - } while (0); - - return value; - } - case Events::OperationCompletion::Id: { - Events::OperationCompletion::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTROperationalStateClusterOperationCompletionEvent new]; - - do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedChar:cppValue.completionErrorCode]; - value.completionErrorCode = memberValue; - } while (0); - do { - NSNumber * _Nullable memberValue; - if (cppValue.totalOperationalTime.HasValue()) { - if (cppValue.totalOperationalTime.Value().IsNull()) { - memberValue = nil; - } else { - memberValue = [NSNumber numberWithUnsignedInt:cppValue.totalOperationalTime.Value().Value()]; - } - } else { - memberValue = nil; - } - value.totalOperationalTime = memberValue; - } while (0); - do { - NSNumber * _Nullable memberValue; - if (cppValue.pausedTime.HasValue()) { - if (cppValue.pausedTime.Value().IsNull()) { - memberValue = nil; - } else { - memberValue = [NSNumber numberWithUnsignedInt:cppValue.pausedTime.Value().Value()]; - } - } else { - memberValue = nil; - } - value.pausedTime = memberValue; - } while (0); - - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForHEPAFilterMonitoringCluster( - EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::HepaFilterMonitoring; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForActivatedCarbonFilterMonitoringCluster( - EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::ActivatedCarbonFilterMonitoring; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} static id _Nullable DecodeEventPayloadForDoorLockCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::DoorLock; @@ -2509,136 +2189,6 @@ static id _Nullable DecodeEventPayloadForOccupancySensingCluster(EventId aEventI *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } -static id _Nullable DecodeEventPayloadForCarbonMonoxideConcentrationMeasurementCluster( - EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::CarbonMonoxideConcentrationMeasurement; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForCarbonDioxideConcentrationMeasurementCluster( - EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::CarbonDioxideConcentrationMeasurement; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForNitrogenDioxideConcentrationMeasurementCluster( - EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::NitrogenDioxideConcentrationMeasurement; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForOzoneConcentrationMeasurementCluster( - EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::OzoneConcentrationMeasurement; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForPM25ConcentrationMeasurementCluster( - EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Pm25ConcentrationMeasurement; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForFormaldehydeConcentrationMeasurementCluster( - EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::FormaldehydeConcentrationMeasurement; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForPM1ConcentrationMeasurementCluster( - EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Pm1ConcentrationMeasurement; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForPM10ConcentrationMeasurementCluster( - EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Pm10ConcentrationMeasurement; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForTotalVolatileOrganicCompoundsConcentrationMeasurementCluster( - EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForRadonConcentrationMeasurementCluster( - EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::RadonConcentrationMeasurement; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} static id _Nullable DecodeEventPayloadForWakeOnLANCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::WakeOnLan; @@ -3035,27 +2585,6 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::ModeSelect::Id: { return DecodeEventPayloadForModeSelectCluster(aPath.mEventId, aReader, aError); } - case Clusters::TemperatureControl::Id: { - return DecodeEventPayloadForTemperatureControlCluster(aPath.mEventId, aReader, aError); - } - case Clusters::RefrigeratorAlarm::Id: { - return DecodeEventPayloadForRefrigeratorAlarmCluster(aPath.mEventId, aReader, aError); - } - case Clusters::AirQuality::Id: { - return DecodeEventPayloadForAirQualityCluster(aPath.mEventId, aReader, aError); - } - case Clusters::SmokeCoAlarm::Id: { - return DecodeEventPayloadForSmokeCOAlarmCluster(aPath.mEventId, aReader, aError); - } - case Clusters::OperationalState::Id: { - return DecodeEventPayloadForOperationalStateCluster(aPath.mEventId, aReader, aError); - } - case Clusters::HepaFilterMonitoring::Id: { - return DecodeEventPayloadForHEPAFilterMonitoringCluster(aPath.mEventId, aReader, aError); - } - case Clusters::ActivatedCarbonFilterMonitoring::Id: { - return DecodeEventPayloadForActivatedCarbonFilterMonitoringCluster(aPath.mEventId, aReader, aError); - } case Clusters::DoorLock::Id: { return DecodeEventPayloadForDoorLockCluster(aPath.mEventId, aReader, aError); } @@ -3101,36 +2630,6 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::OccupancySensing::Id: { return DecodeEventPayloadForOccupancySensingCluster(aPath.mEventId, aReader, aError); } - case Clusters::CarbonMonoxideConcentrationMeasurement::Id: { - return DecodeEventPayloadForCarbonMonoxideConcentrationMeasurementCluster(aPath.mEventId, aReader, aError); - } - case Clusters::CarbonDioxideConcentrationMeasurement::Id: { - return DecodeEventPayloadForCarbonDioxideConcentrationMeasurementCluster(aPath.mEventId, aReader, aError); - } - case Clusters::NitrogenDioxideConcentrationMeasurement::Id: { - return DecodeEventPayloadForNitrogenDioxideConcentrationMeasurementCluster(aPath.mEventId, aReader, aError); - } - case Clusters::OzoneConcentrationMeasurement::Id: { - return DecodeEventPayloadForOzoneConcentrationMeasurementCluster(aPath.mEventId, aReader, aError); - } - case Clusters::Pm25ConcentrationMeasurement::Id: { - return DecodeEventPayloadForPM25ConcentrationMeasurementCluster(aPath.mEventId, aReader, aError); - } - case Clusters::FormaldehydeConcentrationMeasurement::Id: { - return DecodeEventPayloadForFormaldehydeConcentrationMeasurementCluster(aPath.mEventId, aReader, aError); - } - case Clusters::Pm1ConcentrationMeasurement::Id: { - return DecodeEventPayloadForPM1ConcentrationMeasurementCluster(aPath.mEventId, aReader, aError); - } - case Clusters::Pm10ConcentrationMeasurement::Id: { - return DecodeEventPayloadForPM10ConcentrationMeasurementCluster(aPath.mEventId, aReader, aError); - } - case Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id: { - return DecodeEventPayloadForTotalVolatileOrganicCompoundsConcentrationMeasurementCluster(aPath.mEventId, aReader, aError); - } - case Clusters::RadonConcentrationMeasurement::Id: { - return DecodeEventPayloadForRadonConcentrationMeasurementCluster(aPath.mEventId, aReader, aError); - } case Clusters::WakeOnLan::Id: { return DecodeEventPayloadForWakeOnLANCluster(aPath.mEventId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index c169c3c37aba91..14eb2b6fb8a838 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -57,15 +57,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end -MTR_NEWLY_AVAILABLE +API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRAccessControlClusterAccessControlTargetStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable cluster MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable endpoint MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable deviceType MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable cluster API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nullable endpoint API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nullable deviceType API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -MTR_NEWLY_DEPRECATED("Please use MTRAccessControlClusterAccessControlTargetStruct") +MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlTargetStruct", ios(16.1, 17.0), macos(13.0, 14.0), + watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRAccessControlClusterTarget : MTRAccessControlClusterAccessControlTargetStruct @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -159,10 +159,10 @@ MTR_DEPRECATED("Please use MTRBasicInformationClusterCapabilityMinimaStruct", io tvos(16.1, 16.4)) @interface MTRBasicClusterCapabilityMinimaStruct : MTRBasicInformationClusterCapabilityMinimaStruct @end -MTR_NEWLY_AVAILABLE +API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRBasicInformationClusterProductAppearanceStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull finish MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable primaryColor MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull finish API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nullable primaryColor API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -305,44 +305,44 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) NSNumber * _Nonnull maxCumulativeFailsafeSeconds API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end -MTR_NEWLY_AVAILABLE +API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRNetworkCommissioningClusterNetworkInfoStruct : NSObject -@property (nonatomic, copy) NSData * _Nonnull networkID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull connected MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nonnull networkID API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull connected API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -MTR_NEWLY_DEPRECATED("Please use MTRNetworkCommissioningClusterNetworkInfoStruct") +MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterNetworkInfoStruct", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), + tvos(16.1, 17.0)) @interface MTRNetworkCommissioningClusterNetworkInfo : MTRNetworkCommissioningClusterNetworkInfoStruct @end -MTR_NEWLY_AVAILABLE +API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull panId MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull extendedPanId MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nonnull networkName MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull channel MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull version MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nonnull extendedAddress MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull rssi MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull lqi MTR_NEWLY_AVAILABLE; -@end - -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -MTR_NEWLY_DEPRECATED("Please use MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct") +@property (nonatomic, copy) NSNumber * _Nonnull panId API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull extendedPanId API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSString * _Nonnull networkName API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull channel API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull version API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSData * _Nonnull extendedAddress API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull rssi API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull lqi API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@end + +MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct", ios(16.1, 17.0), macos(13.0, 14.0), + watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRNetworkCommissioningClusterThreadInterfaceScanResult : MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct @end -MTR_NEWLY_AVAILABLE +API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull security MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nonnull ssid MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nonnull bssid MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull channel MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull wiFiBand MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull rssi MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull security API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSData * _Nonnull ssid API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSData * _Nonnull bssid API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull channel API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull wiFiBand API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull rssi API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -MTR_NEWLY_DEPRECATED("Please use MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct") +MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct", ios(16.1, 17.0), macos(13.0, 14.0), + watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRNetworkCommissioningClusterWiFiInterfaceScanResult : MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct @end @@ -409,26 +409,26 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSData * _Nullable faultRecording API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end -MTR_NEWLY_AVAILABLE +API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRThreadNetworkDiagnosticsClusterNeighborTableStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull extAddress MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull age MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull rloc16 MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull linkFrameCounter MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mleFrameCounter MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull lqi MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable averageRssi MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable lastRssi MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull frameErrorRate MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull messageErrorRate MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull rxOnWhenIdle MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull fullThreadDevice MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull fullNetworkData MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull isChild MTR_NEWLY_AVAILABLE; -@end - -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -MTR_NEWLY_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct") +@property (nonatomic, copy) NSNumber * _Nonnull extAddress API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull age API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull rloc16 API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull linkFrameCounter API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull mleFrameCounter API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull lqi API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nullable averageRssi API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nullable lastRssi API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull frameErrorRate API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull messageErrorRate API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull rxOnWhenIdle API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull fullThreadDevice API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull fullNetworkData API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull isChild API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@end + +MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", ios(16.1, 17.0), macos(13.0, 14.0), + watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRThreadNetworkDiagnosticsClusterNeighborTable : MTRThreadNetworkDiagnosticsClusterNeighborTableStruct @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -452,22 +452,22 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nonnull channelMaskPresent API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end -MTR_NEWLY_AVAILABLE +API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRThreadNetworkDiagnosticsClusterRouteTableStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull extAddress MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull rloc16 MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull routerId MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull nextHop MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull pathCost MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull lqiIn MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull lqiOut MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull age MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull allocated MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull linkEstablished MTR_NEWLY_AVAILABLE; -@end - -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -MTR_NEWLY_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterRouteTableStruct") +@property (nonatomic, copy) NSNumber * _Nonnull extAddress API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull rloc16 API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull routerId API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull nextHop API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull pathCost API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull lqiIn API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull lqiOut API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull age API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull allocated API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull linkEstablished API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@end + +MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterRouteTableStruct", ios(16.1, 17.0), macos(13.0, 14.0), + watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRThreadNetworkDiagnosticsClusterRouteTable : MTRThreadNetworkDiagnosticsClusterRouteTableStruct @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -526,10 +526,10 @@ MTR_DEPRECATED("Please use MTRTimeSynchronizationClusterTimeZoneStruct", ios(16. @interface MTRTimeSynchronizationClusterTimeZoneType : MTRTimeSynchronizationClusterTimeZoneStruct @end -MTR_NEWLY_AVAILABLE +API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull finish MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable primaryColor MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull finish API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSNumber * _Nullable primaryColor API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -537,8 +537,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @property (nonatomic, copy) NSNumber * _Nonnull softwareVersion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @end -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -MTR_NEWLY_DEPRECATED("Please use MTRBridgedDeviceBasicInformationClusterStartUpEvent") +MTR_DEPRECATED("Please use MTRBridgedDeviceBasicInformationClusterStartUpEvent", ios(16.1, 17.0), macos(13.0, 14.0), + watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRBridgedDeviceBasicClusterStartUpEvent : MTRBridgedDeviceBasicInformationClusterStartUpEvent @end @@ -546,8 +546,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRBridgedDeviceBasicInformationClusterShutDownEvent : NSObject @end -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -MTR_NEWLY_DEPRECATED("Please use MTRBridgedDeviceBasicInformationClusterShutDownEvent") +MTR_DEPRECATED("Please use MTRBridgedDeviceBasicInformationClusterShutDownEvent", ios(16.1, 17.0), macos(13.0, 14.0), + watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRBridgedDeviceBasicClusterShutDownEvent : MTRBridgedDeviceBasicInformationClusterShutDownEvent @end @@ -555,8 +555,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRBridgedDeviceBasicInformationClusterLeaveEvent : NSObject @end -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -MTR_NEWLY_DEPRECATED("Please use MTRBridgedDeviceBasicInformationClusterLeaveEvent") +MTR_DEPRECATED("Please use MTRBridgedDeviceBasicInformationClusterLeaveEvent", ios(16.1, 17.0), macos(13.0, 14.0), + watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRBridgedDeviceBasicClusterLeaveEvent : MTRBridgedDeviceBasicInformationClusterLeaveEvent @end @@ -565,8 +565,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @property (nonatomic, copy) NSNumber * _Nonnull reachableNewValue API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @end -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -MTR_NEWLY_DEPRECATED("Please use MTRBridgedDeviceBasicInformationClusterReachableChangedEvent") +MTR_DEPRECATED("Please use MTRBridgedDeviceBasicInformationClusterReachableChangedEvent", ios(16.1, 17.0), macos(13.0, 14.0), + watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRBridgedDeviceBasicClusterReachableChangedEvent : MTRBridgedDeviceBasicInformationClusterReachableChangedEvent @end @@ -704,83 +704,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSArray * _Nonnull semanticTags API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end -MTR_NEWLY_AVAILABLE -@interface MTRRefrigeratorAlarmClusterNotifyEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull active MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull inactive MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull state MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_NEWLY_AVAILABLE; -@end - -MTR_NEWLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterSmokeAlarmEvent : NSObject -@end - -MTR_NEWLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterCOAlarmEvent : NSObject -@end - -MTR_NEWLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterLowBatteryEvent : NSObject -@end - -MTR_NEWLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterHardwareFaultEvent : NSObject -@end - -MTR_NEWLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterEndOfServiceEvent : NSObject -@end - -MTR_NEWLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterSelfTestCompleteEvent : NSObject -@end - -MTR_NEWLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterAlarmMutedEvent : NSObject -@end - -MTR_NEWLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterMuteEndedEvent : NSObject -@end - -MTR_NEWLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterInterconnectSmokeAlarmEvent : NSObject -@end - -MTR_NEWLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterInterconnectCOAlarmEvent : NSObject -@end - -MTR_NEWLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterAllClearEvent : NSObject -@end - -MTR_NEWLY_AVAILABLE -@interface MTROperationalStateClusterErrorStateStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull errorStateID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable errorStateLabel MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable errorStateDetails MTR_NEWLY_AVAILABLE; -@end - -MTR_NEWLY_AVAILABLE -@interface MTROperationalStateClusterOperationalStateStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull operationalStateID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable operationalStateLabel MTR_NEWLY_AVAILABLE; -@end - -MTR_NEWLY_AVAILABLE -@interface MTROperationalStateClusterOperationalErrorEvent : NSObject -@property (nonatomic, copy) MTROperationalStateClusterErrorStateStruct * _Nonnull errorState MTR_NEWLY_AVAILABLE; -@end - -MTR_NEWLY_AVAILABLE -@interface MTROperationalStateClusterOperationCompletionEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull completionErrorCode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable totalOperationalTime MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable pausedTime MTR_NEWLY_AVAILABLE; -@end - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRDoorLockClusterCredentialStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull credentialType API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 9aed49bb01c3e6..64a915d6c9cccd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -2686,424 +2686,6 @@ - (NSString *)description @end -@implementation MTRRefrigeratorAlarmClusterNotifyEvent -- (instancetype)init -{ - if (self = [super init]) { - - _active = @(0); - - _inactive = @(0); - - _state = @(0); - - _mask = @(0); - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRRefrigeratorAlarmClusterNotifyEvent alloc] init]; - - other.active = self.active; - other.inactive = self.inactive; - other.state = self.state; - other.mask = self.mask; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: active:%@; inactive:%@; state:%@; mask:%@; >", - NSStringFromClass([self class]), _active, _inactive, _state, _mask]; - return descriptionString; -} - -@end - -@implementation MTRSmokeCOAlarmClusterSmokeAlarmEvent -- (instancetype)init -{ - if (self = [super init]) { - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRSmokeCOAlarmClusterSmokeAlarmEvent alloc] init]; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRSmokeCOAlarmClusterCOAlarmEvent -- (instancetype)init -{ - if (self = [super init]) { - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRSmokeCOAlarmClusterCOAlarmEvent alloc] init]; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRSmokeCOAlarmClusterLowBatteryEvent -- (instancetype)init -{ - if (self = [super init]) { - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRSmokeCOAlarmClusterLowBatteryEvent alloc] init]; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRSmokeCOAlarmClusterHardwareFaultEvent -- (instancetype)init -{ - if (self = [super init]) { - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRSmokeCOAlarmClusterHardwareFaultEvent alloc] init]; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRSmokeCOAlarmClusterEndOfServiceEvent -- (instancetype)init -{ - if (self = [super init]) { - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRSmokeCOAlarmClusterEndOfServiceEvent alloc] init]; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRSmokeCOAlarmClusterSelfTestCompleteEvent -- (instancetype)init -{ - if (self = [super init]) { - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRSmokeCOAlarmClusterSelfTestCompleteEvent alloc] init]; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRSmokeCOAlarmClusterAlarmMutedEvent -- (instancetype)init -{ - if (self = [super init]) { - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRSmokeCOAlarmClusterAlarmMutedEvent alloc] init]; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRSmokeCOAlarmClusterMuteEndedEvent -- (instancetype)init -{ - if (self = [super init]) { - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRSmokeCOAlarmClusterMuteEndedEvent alloc] init]; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRSmokeCOAlarmClusterInterconnectSmokeAlarmEvent -- (instancetype)init -{ - if (self = [super init]) { - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRSmokeCOAlarmClusterInterconnectSmokeAlarmEvent alloc] init]; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRSmokeCOAlarmClusterInterconnectCOAlarmEvent -- (instancetype)init -{ - if (self = [super init]) { - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRSmokeCOAlarmClusterInterconnectCOAlarmEvent alloc] init]; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRSmokeCOAlarmClusterAllClearEvent -- (instancetype)init -{ - if (self = [super init]) { - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRSmokeCOAlarmClusterAllClearEvent alloc] init]; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTROperationalStateClusterErrorStateStruct -- (instancetype)init -{ - if (self = [super init]) { - - _errorStateID = @(0); - - _errorStateLabel = nil; - - _errorStateDetails = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTROperationalStateClusterErrorStateStruct alloc] init]; - - other.errorStateID = self.errorStateID; - other.errorStateLabel = self.errorStateLabel; - other.errorStateDetails = self.errorStateDetails; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: errorStateID:%@; errorStateLabel:%@; errorStateDetails:%@; >", - NSStringFromClass([self class]), _errorStateID, _errorStateLabel, _errorStateDetails]; - return descriptionString; -} - -@end - -@implementation MTROperationalStateClusterOperationalStateStruct -- (instancetype)init -{ - if (self = [super init]) { - - _operationalStateID = @(0); - - _operationalStateLabel = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTROperationalStateClusterOperationalStateStruct alloc] init]; - - other.operationalStateID = self.operationalStateID; - other.operationalStateLabel = self.operationalStateLabel; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: operationalStateID:%@; operationalStateLabel:%@; >", - NSStringFromClass([self class]), _operationalStateID, _operationalStateLabel]; - return descriptionString; -} - -@end - -@implementation MTROperationalStateClusterOperationalErrorEvent -- (instancetype)init -{ - if (self = [super init]) { - - _errorState = [MTROperationalStateClusterErrorStateStruct new]; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTROperationalStateClusterOperationalErrorEvent alloc] init]; - - other.errorState = self.errorState; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = - [NSString stringWithFormat:@"<%@: errorState:%@; >", NSStringFromClass([self class]), _errorState]; - return descriptionString; -} - -@end - -@implementation MTROperationalStateClusterOperationCompletionEvent -- (instancetype)init -{ - if (self = [super init]) { - - _completionErrorCode = @(0); - - _totalOperationalTime = nil; - - _pausedTime = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTROperationalStateClusterOperationCompletionEvent alloc] init]; - - other.completionErrorCode = self.completionErrorCode; - other.totalOperationalTime = self.totalOperationalTime; - other.pausedTime = self.pausedTime; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = - [NSString stringWithFormat:@"<%@: completionErrorCode:%@; totalOperationalTime:%@; pausedTime:%@; >", - NSStringFromClass([self class]), _completionErrorCode, _totalOperationalTime, _pausedTime]; - return descriptionString; -} - -@end - @implementation MTRDoorLockClusterCredentialStruct - (instancetype)init { 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 8ca008040d84f9..71dcb80bf18e38 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -582,72 +582,6 @@ class SubscribeAttributeIdentifyAcceptedCommandList : public SubscribeAttribute } }; -/* - * Attribute EventList - */ -class ReadIdentifyEventList : public ReadAttribute { -public: - ReadIdentifyEventList() - : ReadAttribute("event-list") - { - } - - ~ReadIdentifyEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Identify.EventList response %@", [value description]); - if (error != nil) { - LogNSError("Identify EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeIdentifyEventList : public SubscribeAttribute { -public: - SubscribeAttributeIdentifyEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeIdentifyEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Identify.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -1352,72 +1286,6 @@ class SubscribeAttributeGroupsAcceptedCommandList : public SubscribeAttribute { } }; -/* - * Attribute EventList - */ -class ReadGroupsEventList : public ReadAttribute { -public: - ReadGroupsEventList() - : ReadAttribute("event-list") - { - } - - ~ReadGroupsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Groups.EventList response %@", [value description]); - if (error != nil) { - LogNSError("Groups EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeGroupsEventList : public SubscribeAttribute { -public: - SubscribeAttributeGroupsEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeGroupsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Groups.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -2595,138 +2463,6 @@ class SubscribeAttributeScenesLastConfiguredBy : public SubscribeAttribute { } }; -/* - * Attribute SceneTableSize - */ -class ReadScenesSceneTableSize : public ReadAttribute { -public: - ReadScenesSceneTableSize() - : ReadAttribute("scene-table-size") - { - } - - ~ReadScenesSceneTableSize() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000006) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSceneTableSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.SceneTableSize response %@", [value description]); - if (error != nil) { - LogNSError("Scenes SceneTableSize read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeScenesSceneTableSize : public SubscribeAttribute { -public: - SubscribeAttributeScenesSceneTableSize() - : SubscribeAttribute("scene-table-size") - { - } - - ~SubscribeAttributeScenesSceneTableSize() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000006) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSceneTableSizeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.SceneTableSize response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute RemainingCapacity - */ -class ReadScenesRemainingCapacity : public ReadAttribute { -public: - ReadScenesRemainingCapacity() - : ReadAttribute("remaining-capacity") - { - } - - ~ReadScenesRemainingCapacity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000007) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemainingCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.RemainingCapacity response %@", [value description]); - if (error != nil) { - LogNSError("Scenes RemainingCapacity read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeScenesRemainingCapacity : public SubscribeAttribute { -public: - SubscribeAttributeScenesRemainingCapacity() - : SubscribeAttribute("remaining-capacity") - { - } - - ~SubscribeAttributeScenesRemainingCapacity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000007) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeRemainingCapacityWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.RemainingCapacity response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute GeneratedCommandList */ @@ -2859,72 +2595,6 @@ class SubscribeAttributeScenesAcceptedCommandList : public SubscribeAttribute { } }; -/* - * Attribute EventList - */ -class ReadScenesEventList : public ReadAttribute { -public: - ReadScenesEventList() - : ReadAttribute("event-list") - { - } - - ~ReadScenesEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.EventList response %@", [value description]); - if (error != nil) { - LogNSError("Scenes EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeScenesEventList : public SubscribeAttribute { -public: - SubscribeAttributeScenesEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeScenesEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -3984,72 +3654,6 @@ class SubscribeAttributeOnOffAcceptedCommandList : public SubscribeAttribute { } }; -/* - * Attribute EventList - */ -class ReadOnOffEventList : public ReadAttribute { -public: - ReadOnOffEventList() - : ReadAttribute("event-list") - { - } - - ~ReadOnOffEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.EventList response %@", [value description]); - if (error != nil) { - LogNSError("OnOff EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffEventList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeOnOffEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -4586,76 +4190,6 @@ class SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList : public Sub } }; -/* - * Attribute EventList - */ -class ReadOnOffSwitchConfigurationEventList : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationEventList() - : ReadAttribute("event-list") - { - } - - ~ReadOnOffSwitchConfigurationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.EventList response %@", [value description]); - if (error != nil) { - LogNSError("OnOffSwitchConfiguration EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationEventList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -6787,76 +6321,6 @@ class SubscribeAttributeLevelControlAcceptedCommandList : public SubscribeAttrib } }; -/* - * Attribute EventList - */ -class ReadLevelControlEventList : public ReadAttribute { -public: - ReadLevelControlEventList() - : ReadAttribute("event-list") - { - } - - ~ReadLevelControlEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LevelControl.EventList response %@", [value description]); - if (error != nil) { - LogNSError("LevelControl EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeLevelControlEventList : public SubscribeAttribute { -public: - SubscribeAttributeLevelControlEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeLevelControlEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LevelControl.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -8108,76 +7572,6 @@ class SubscribeAttributeBinaryInputBasicAcceptedCommandList : public SubscribeAt } }; -/* - * Attribute EventList - */ -class ReadBinaryInputBasicEventList : public ReadAttribute { -public: - ReadBinaryInputBasicEventList() - : ReadAttribute("event-list") - { - } - - ~ReadBinaryInputBasicEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.EventList response %@", [value description]); - if (error != nil) { - LogNSError("BinaryInputBasic EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBinaryInputBasicEventList : public SubscribeAttribute { -public: - SubscribeAttributeBinaryInputBasicEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeBinaryInputBasicEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -8828,76 +8222,6 @@ class SubscribeAttributeDescriptorAcceptedCommandList : public SubscribeAttribut } }; -/* - * Attribute EventList - */ -class ReadDescriptorEventList : public ReadAttribute { -public: - ReadDescriptorEventList() - : ReadAttribute("event-list") - { - } - - ~ReadDescriptorEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.EventList response %@", [value description]); - if (error != nil) { - LogNSError("Descriptor EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDescriptorEventList : public SubscribeAttribute { -public: - SubscribeAttributeDescriptorEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeDescriptorEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -9398,72 +8722,6 @@ class SubscribeAttributeBindingAcceptedCommandList : public SubscribeAttribute { } }; -/* - * Attribute EventList - */ -class ReadBindingEventList : public ReadAttribute { -public: - ReadBindingEventList() - : ReadAttribute("event-list") - { - } - - ~ReadBindingEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.EventList response %@", [value description]); - if (error != nil) { - LogNSError("Binding EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBindingEventList : public SubscribeAttribute { -public: - SubscribeAttributeBindingEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeBindingEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -10337,76 +9595,6 @@ class SubscribeAttributeAccessControlAcceptedCommandList : public SubscribeAttri } }; -/* - * Attribute EventList - */ -class ReadAccessControlEventList : public ReadAttribute { -public: - ReadAccessControlEventList() - : ReadAttribute("event-list") - { - } - - ~ReadAccessControlEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.EventList response %@", [value description]); - if (error != nil) { - LogNSError("AccessControl EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeAccessControlEventList : public SubscribeAttribute { -public: - SubscribeAttributeAccessControlEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeAccessControlEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -11590,72 +10778,6 @@ class SubscribeAttributeActionsAcceptedCommandList : public SubscribeAttribute { } }; -/* - * Attribute EventList - */ -class ReadActionsEventList : public ReadAttribute { -public: - ReadActionsEventList() - : ReadAttribute("event-list") - { - } - - ~ReadActionsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.EventList response %@", [value description]); - if (error != nil) { - LogNSError("Actions EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeActionsEventList : public SubscribeAttribute { -public: - SubscribeAttributeActionsEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeActionsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -13632,76 +12754,6 @@ class SubscribeAttributeBasicInformationAcceptedCommandList : public SubscribeAt } }; -/* - * Attribute EventList - */ -class ReadBasicInformationEventList : public ReadAttribute { -public: - ReadBasicInformationEventList() - : ReadAttribute("event-list") - { - } - - ~ReadBasicInformationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.EventList response %@", [value description]); - if (error != nil) { - LogNSError("BasicInformation EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBasicInformationEventList : public SubscribeAttribute { -public: - SubscribeAttributeBasicInformationEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeBasicInformationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -14261,76 +13313,6 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public Su } }; -/* - * Attribute EventList - */ -class ReadOtaSoftwareUpdateProviderEventList : public ReadAttribute { -public: - ReadOtaSoftwareUpdateProviderEventList() - : ReadAttribute("event-list") - { - } - - ~ReadOtaSoftwareUpdateProviderEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); - if (error != nil) { - LogNSError("OTASoftwareUpdateProvider EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOtaSoftwareUpdateProviderEventList : public SubscribeAttribute { -public: - SubscribeAttributeOtaSoftwareUpdateProviderEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeOtaSoftwareUpdateProviderEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -15108,76 +14090,6 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public S } }; -/* - * Attribute EventList - */ -class ReadOtaSoftwareUpdateRequestorEventList : public ReadAttribute { -public: - ReadOtaSoftwareUpdateRequestorEventList() - : ReadAttribute("event-list") - { - } - - ~ReadOtaSoftwareUpdateRequestorEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); - if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOtaSoftwareUpdateRequestorEventList : public SubscribeAttribute { -public: - SubscribeAttributeOtaSoftwareUpdateRequestorEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeOtaSoftwareUpdateRequestorEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -15728,76 +14640,6 @@ class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public Su } }; -/* - * Attribute EventList - */ -class ReadLocalizationConfigurationEventList : public ReadAttribute { -public: - ReadLocalizationConfigurationEventList() - : ReadAttribute("event-list") - { - } - - ~ReadLocalizationConfigurationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); - if (error != nil) { - LogNSError("LocalizationConfiguration EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeLocalizationConfigurationEventList : public SubscribeAttribute { -public: - SubscribeAttributeLocalizationConfigurationEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeLocalizationConfigurationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -16457,76 +15299,6 @@ class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public Subsc } }; -/* - * Attribute EventList - */ -class ReadTimeFormatLocalizationEventList : public ReadAttribute { -public: - ReadTimeFormatLocalizationEventList() - : ReadAttribute("event-list") - { - } - - ~ReadTimeFormatLocalizationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); - if (error != nil) { - LogNSError("TimeFormatLocalization EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTimeFormatLocalizationEventList : public SubscribeAttribute { -public: - SubscribeAttributeTimeFormatLocalizationEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeTimeFormatLocalizationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -17004,76 +15776,6 @@ class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAt } }; -/* - * Attribute EventList - */ -class ReadUnitLocalizationEventList : public ReadAttribute { -public: - ReadUnitLocalizationEventList() - : ReadAttribute("event-list") - { - } - - ~ReadUnitLocalizationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.EventList response %@", [value description]); - if (error != nil) { - LogNSError("UnitLocalization EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeUnitLocalizationEventList : public SubscribeAttribute { -public: - SubscribeAttributeUnitLocalizationEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeUnitLocalizationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -17511,76 +16213,6 @@ class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public Sub } }; -/* - * Attribute EventList - */ -class ReadPowerSourceConfigurationEventList : public ReadAttribute { -public: - ReadPowerSourceConfigurationEventList() - : ReadAttribute("event-list") - { - } - - ~ReadPowerSourceConfigurationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); - if (error != nil) { - LogNSError("PowerSourceConfiguration EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePowerSourceConfigurationEventList : public SubscribeAttribute { -public: - SubscribeAttributePowerSourceConfigurationEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributePowerSourceConfigurationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -20151,76 +18783,6 @@ class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribu } }; -/* - * Attribute EventList - */ -class ReadPowerSourceEventList : public ReadAttribute { -public: - ReadPowerSourceEventList() - : ReadAttribute("event-list") - { - } - - ~ReadPowerSourceEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.EventList response %@", [value description]); - if (error != nil) { - LogNSError("PowerSource EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePowerSourceEventList : public SubscribeAttribute { -public: - SubscribeAttributePowerSourceEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributePowerSourceEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -21137,76 +19699,6 @@ class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public Subscri } }; -/* - * Attribute EventList - */ -class ReadGeneralCommissioningEventList : public ReadAttribute { -public: - ReadGeneralCommissioningEventList() - : ReadAttribute("event-list") - { - } - - ~ReadGeneralCommissioningEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.EventList response %@", [value description]); - if (error != nil) { - LogNSError("GeneralCommissioning EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeGeneralCommissioningEventList : public SubscribeAttribute { -public: - SubscribeAttributeGeneralCommissioningEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeGeneralCommissioningEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -22527,76 +21019,6 @@ class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public Subscri } }; -/* - * Attribute EventList - */ -class ReadNetworkCommissioningEventList : public ReadAttribute { -public: - ReadNetworkCommissioningEventList() - : ReadAttribute("event-list") - { - } - - ~ReadNetworkCommissioningEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.EventList response %@", [value description]); - if (error != nil) { - LogNSError("NetworkCommissioning EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeNetworkCommissioningEventList : public SubscribeAttribute { -public: - SubscribeAttributeNetworkCommissioningEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeNetworkCommissioningEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -23022,76 +21444,6 @@ class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttr } }; -/* - * Attribute EventList - */ -class ReadDiagnosticLogsEventList : public ReadAttribute { -public: - ReadDiagnosticLogsEventList() - : ReadAttribute("event-list") - { - } - - ~ReadDiagnosticLogsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.EventList response %@", [value description]); - if (error != nil) { - LogNSError("DiagnosticLogs EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDiagnosticLogsEventList : public SubscribeAttribute { -public: - SubscribeAttributeDiagnosticLogsEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeDiagnosticLogsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -24150,76 +22502,6 @@ class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public Subscribe } }; -/* - * Attribute EventList - */ -class ReadGeneralDiagnosticsEventList : public ReadAttribute { -public: - ReadGeneralDiagnosticsEventList() - : ReadAttribute("event-list") - { - } - - ~ReadGeneralDiagnosticsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); - if (error != nil) { - LogNSError("GeneralDiagnostics EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeGeneralDiagnosticsEventList : public SubscribeAttribute { -public: - SubscribeAttributeGeneralDiagnosticsEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeGeneralDiagnosticsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -24915,76 +23197,6 @@ class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public Subscrib } }; -/* - * Attribute EventList - */ -class ReadSoftwareDiagnosticsEventList : public ReadAttribute { -public: - ReadSoftwareDiagnosticsEventList() - : ReadAttribute("event-list") - { - } - - ~ReadSoftwareDiagnosticsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); - if (error != nil) { - LogNSError("SoftwareDiagnostics EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeSoftwareDiagnosticsEventList : public SubscribeAttribute { -public: - SubscribeAttributeSoftwareDiagnosticsEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeSoftwareDiagnosticsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -29874,76 +28086,6 @@ class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public Sub } }; -/* - * Attribute EventList - */ -class ReadThreadNetworkDiagnosticsEventList : public ReadAttribute { -public: - ReadThreadNetworkDiagnosticsEventList() - : ReadAttribute("event-list") - { - } - - ~ReadThreadNetworkDiagnosticsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); - if (error != nil) { - LogNSError("ThreadNetworkDiagnostics EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThreadNetworkDiagnosticsEventList : public SubscribeAttribute { -public: - SubscribeAttributeThreadNetworkDiagnosticsEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeThreadNetworkDiagnosticsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -31280,76 +29422,6 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public Subsc } }; -/* - * Attribute EventList - */ -class ReadWiFiNetworkDiagnosticsEventList : public ReadAttribute { -public: - ReadWiFiNetworkDiagnosticsEventList() - : ReadAttribute("event-list") - { - } - - ~ReadWiFiNetworkDiagnosticsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); - if (error != nil) { - LogNSError("WiFiNetworkDiagnostics EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWiFiNetworkDiagnosticsEventList : public SubscribeAttribute { -public: - SubscribeAttributeWiFiNetworkDiagnosticsEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeWiFiNetworkDiagnosticsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -32399,76 +30471,6 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public S } }; -/* - * Attribute EventList - */ -class ReadEthernetNetworkDiagnosticsEventList : public ReadAttribute { -public: - ReadEthernetNetworkDiagnosticsEventList() - : ReadAttribute("event-list") - { - } - - ~ReadEthernetNetworkDiagnosticsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); - if (error != nil) { - LogNSError("EthernetNetworkDiagnostics EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeEthernetNetworkDiagnosticsEventList : public SubscribeAttribute { -public: - SubscribeAttributeEthernetNetworkDiagnosticsEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeEthernetNetworkDiagnosticsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -34019,76 +32021,6 @@ class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : publi } }; -/* - * Attribute EventList - */ -class ReadBridgedDeviceBasicInformationEventList : public ReadAttribute { -public: - ReadBridgedDeviceBasicInformationEventList() - : ReadAttribute("event-list") - { - } - - ~ReadBridgedDeviceBasicInformationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); - if (error != nil) { - LogNSError("BridgedDeviceBasicInformation EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBridgedDeviceBasicInformationEventList : public SubscribeAttribute { -public: - SubscribeAttributeBridgedDeviceBasicInformationEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeBridgedDeviceBasicInformationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -34655,72 +32587,6 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { } }; -/* - * Attribute EventList - */ -class ReadSwitchEventList : public ReadAttribute { -public: - ReadSwitchEventList() - : ReadAttribute("event-list") - { - } - - ~ReadSwitchEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.EventList response %@", [value description]); - if (error != nil) { - LogNSError("Switch EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeSwitchEventList : public SubscribeAttribute { -public: - SubscribeAttributeSwitchEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeSwitchEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -35435,76 +33301,6 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S } }; -/* - * Attribute EventList - */ -class ReadAdministratorCommissioningEventList : public ReadAttribute { -public: - ReadAdministratorCommissioningEventList() - : ReadAttribute("event-list") - { - } - - ~ReadAdministratorCommissioningEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); - if (error != nil) { - LogNSError("AdministratorCommissioning EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAttribute { -public: - SubscribeAttributeAdministratorCommissioningEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeAdministratorCommissioningEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning 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(@"AdministratorCommissioning.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -36725,76 +34521,6 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc } }; -/* - * Attribute EventList - */ -class ReadOperationalCredentialsEventList : public ReadAttribute { -public: - ReadOperationalCredentialsEventList() - : ReadAttribute("event-list") - { - } - - ~ReadOperationalCredentialsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.EventList response %@", [value description]); - if (error != nil) { - LogNSError("OperationalCredentials EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttribute { -public: - SubscribeAttributeOperationalCredentialsEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeOperationalCredentialsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials 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(@"OperationalCredentials.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -37739,76 +35465,6 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public Subscribe } }; -/* - * Attribute EventList - */ -class ReadGroupKeyManagementEventList : public ReadAttribute { -public: - ReadGroupKeyManagementEventList() - : ReadAttribute("event-list") - { - } - - ~ReadGroupKeyManagementEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.EventList response %@", [value description]); - if (error != nil) { - LogNSError("GroupKeyManagement EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute { -public: - SubscribeAttributeGroupKeyManagementEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeGroupKeyManagementEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -38246,76 +35902,6 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut } }; -/* - * Attribute EventList - */ -class ReadFixedLabelEventList : public ReadAttribute { -public: - ReadFixedLabelEventList() - : ReadAttribute("event-list") - { - } - - ~ReadFixedLabelEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.EventList response %@", [value description]); - if (error != nil) { - LogNSError("FixedLabel EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { -public: - SubscribeAttributeFixedLabelEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeFixedLabelEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel 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(@"FixedLabel.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -38810,76 +36396,6 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute } }; -/* - * Attribute EventList - */ -class ReadUserLabelEventList : public ReadAttribute { -public: - ReadUserLabelEventList() - : ReadAttribute("event-list") - { - } - - ~ReadUserLabelEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.EventList response %@", [value description]); - if (error != nil) { - LogNSError("UserLabel EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { -public: - SubscribeAttributeUserLabelEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeUserLabelEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -39318,76 +36834,6 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttrib } }; -/* - * Attribute EventList - */ -class ReadBooleanStateEventList : public ReadAttribute { -public: - ReadBooleanStateEventList() - : ReadAttribute("event-list") - { - } - - ~ReadBooleanStateEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.EventList response %@", [value description]); - if (error != nil) { - LogNSError("BooleanState EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { -public: - SubscribeAttributeBooleanStateEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeBooleanStateEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState 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(@"BooleanState.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -40307,76 +37753,6 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut } }; -/* - * Attribute EventList - */ -class ReadModeSelectEventList : public ReadAttribute { -public: - ReadModeSelectEventList() - : ReadAttribute("event-list") - { - } - - ~ReadModeSelectEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.EventList response %@", [value description]); - if (error != nil) { - LogNSError("ModeSelect EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { -public: - SubscribeAttributeModeSelectEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeModeSelectEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect 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(@"ModeSelect.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -40588,18 +37964,66 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster TemperatureControl | 0x0056 | +| Cluster DoorLock | 0x0101 | |------------------------------------------------------------------------------| | Commands: | | -| * SetTemperature | 0x00 | +| * LockDoor | 0x00 | +| * UnlockDoor | 0x01 | +| * UnlockWithTimeout | 0x03 | +| * SetWeekDaySchedule | 0x0B | +| * GetWeekDaySchedule | 0x0C | +| * ClearWeekDaySchedule | 0x0D | +| * SetYearDaySchedule | 0x0E | +| * GetYearDaySchedule | 0x0F | +| * ClearYearDaySchedule | 0x10 | +| * SetHolidaySchedule | 0x11 | +| * GetHolidaySchedule | 0x12 | +| * ClearHolidaySchedule | 0x13 | +| * SetUser | 0x1A | +| * GetUser | 0x1B | +| * ClearUser | 0x1D | +| * SetCredential | 0x22 | +| * GetCredentialStatus | 0x24 | +| * ClearCredential | 0x26 | +| * UnboltDoor | 0x27 | |------------------------------------------------------------------------------| | Attributes: | | -| * TemperatureSetpoint | 0x0000 | -| * MinTemperature | 0x0001 | -| * MaxTemperature | 0x0002 | -| * Step | 0x0003 | -| * SelectedTemperatureLevel | 0x0004 | -| * SupportedTemperatureLevels | 0x0005 | +| * LockState | 0x0000 | +| * LockType | 0x0001 | +| * ActuatorEnabled | 0x0002 | +| * DoorState | 0x0003 | +| * DoorOpenEvents | 0x0004 | +| * DoorClosedEvents | 0x0005 | +| * OpenPeriod | 0x0006 | +| * NumberOfTotalUsersSupported | 0x0011 | +| * NumberOfPINUsersSupported | 0x0012 | +| * NumberOfRFIDUsersSupported | 0x0013 | +| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | +| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | +| * NumberOfHolidaySchedulesSupported | 0x0016 | +| * MaxPINCodeLength | 0x0017 | +| * MinPINCodeLength | 0x0018 | +| * MaxRFIDCodeLength | 0x0019 | +| * MinRFIDCodeLength | 0x001A | +| * CredentialRulesSupport | 0x001B | +| * NumberOfCredentialsSupportedPerUser | 0x001C | +| * Language | 0x0021 | +| * LEDSettings | 0x0022 | +| * AutoRelockTime | 0x0023 | +| * SoundVolume | 0x0024 | +| * OperatingMode | 0x0025 | +| * SupportedOperatingModes | 0x0026 | +| * DefaultConfigurationRegister | 0x0027 | +| * EnableLocalProgramming | 0x0028 | +| * EnableOneTouchLocking | 0x0029 | +| * EnableInsideStatusLED | 0x002A | +| * EnablePrivacyModeButton | 0x002B | +| * LocalProgrammingFeatures | 0x002C | +| * WrongCodeEntryLimit | 0x0030 | +| * UserCodeTemporaryDisableTime | 0x0031 | +| * SendPINOverTheAir | 0x0032 | +| * RequirePINforRemoteOperation | 0x0033 | +| * ExpiringUserTimeout | 0x0035 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -40608,718 +38032,960 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * DoorLockAlarm | 0x0000 | +| * DoorStateChange | 0x0001 | +| * LockOperation | 0x0002 | +| * LockOperationError | 0x0003 | +| * LockUserChange | 0x0004 | \*----------------------------------------------------------------------------*/ /* - * Command SetTemperature + * Command LockDoor */ -class TemperatureControlSetTemperature : public ClusterCommand { +class DoorLockLockDoor : public ClusterCommand { public: - TemperatureControlSetTemperature() - : ClusterCommand("set-temperature") + DoorLockLockDoor() + : ClusterCommand("lock-door") { - AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); - AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); + AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) command (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.targetTemperature.HasValue()) { - params.targetTemperature = [NSNumber numberWithShort:mRequest.targetTemperature.Value()]; - } else { - params.targetTemperature = nil; - } - if (mRequest.targetTemperatureLevel.HasValue()) { - params.targetTemperatureLevel = [NSNumber numberWithUnsignedChar:mRequest.targetTemperatureLevel.Value()]; + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; } else { - params.targetTemperatureLevel = nil; + params.pinCode = nil; } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setTemperatureWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster lockDoorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; + chip::app::Clusters::DoorLock::Commands::LockDoor::Type mRequest; }; /* - * Attribute TemperatureSetpoint + * Command UnlockDoor */ -class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { +class DoorLockUnlockDoor : public ClusterCommand { public: - ReadTemperatureControlTemperatureSetpoint() - : ReadAttribute("temperature-setpoint") + DoorLockUnlockDoor() + : ClusterCommand("unlock-door") { + AddArgument("PINCode", &mRequest.PINCode); + ClusterCommand::AddArguments(); } - ~ReadTemperatureControlTemperatureSetpoint() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); - if (error != nil) { - LogNSError("TemperatureControl TemperatureSetpoint read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; + } else { + params.pinCode = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unlockDoorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type mRequest; }; -class SubscribeAttributeTemperatureControlTemperatureSetpoint : public SubscribeAttribute { +/* + * Command UnlockWithTimeout + */ +class DoorLockUnlockWithTimeout : public ClusterCommand { public: - SubscribeAttributeTemperatureControlTemperatureSetpoint() - : SubscribeAttribute("temperature-setpoint") + DoorLockUnlockWithTimeout() + : ClusterCommand("unlock-with-timeout") { + AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); + AddArgument("PINCode", &mRequest.PINCode); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeTemperatureControlTemperatureSetpoint() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.timeout = [NSNumber numberWithUnsignedShort:mRequest.timeout]; + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; + } else { + params.pinCode = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unlockWithTimeoutWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeTemperatureSetpointWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type mRequest; }; /* - * Attribute MinTemperature + * Command SetWeekDaySchedule */ -class ReadTemperatureControlMinTemperature : public ReadAttribute { +class DoorLockSetWeekDaySchedule : public ClusterCommand { public: - ReadTemperatureControlMinTemperature() - : ReadAttribute("min-temperature") + DoorLockSetWeekDaySchedule() + : ClusterCommand("set-week-day-schedule") { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); + AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); + AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); + AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); + AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); + ClusterCommand::AddArguments(); } - ~ReadTemperatureControlMinTemperature() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); - if (error != nil) { - LogNSError("TemperatureControl MinTemperature read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + params.daysMask = [NSNumber numberWithUnsignedChar:mRequest.daysMask.Raw()]; + params.startHour = [NSNumber numberWithUnsignedChar:mRequest.startHour]; + params.startMinute = [NSNumber numberWithUnsignedChar:mRequest.startMinute]; + params.endHour = [NSNumber numberWithUnsignedChar:mRequest.endHour]; + params.endMinute = [NSNumber numberWithUnsignedChar:mRequest.endMinute]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; }; -class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttribute { +/* + * Command GetWeekDaySchedule + */ +class DoorLockGetWeekDaySchedule : public ClusterCommand { public: - SubscribeAttributeTemperatureControlMinTemperature() - : SubscribeAttribute("min-temperature") + DoorLockGetWeekDaySchedule() + : ClusterCommand("get-week-day-schedule") { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeTemperatureControlMinTemperature() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getWeekDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeMinTemperatureWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; }; /* - * Attribute MaxTemperature + * Command ClearWeekDaySchedule */ -class ReadTemperatureControlMaxTemperature : public ReadAttribute { +class DoorLockClearWeekDaySchedule : public ClusterCommand { public: - ReadTemperatureControlMaxTemperature() - : ReadAttribute("max-temperature") + DoorLockClearWeekDaySchedule() + : ClusterCommand("clear-week-day-schedule") { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } - ~ReadTemperatureControlMaxTemperature() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); - if (error != nil) { - LogNSError("TemperatureControl MaxTemperature read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; }; -class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttribute { +/* + * Command SetYearDaySchedule + */ +class DoorLockSetYearDaySchedule : public ClusterCommand { public: - SubscribeAttributeTemperatureControlMaxTemperature() - : SubscribeAttribute("max-temperature") + DoorLockSetYearDaySchedule() + : ClusterCommand("set-year-day-schedule") { + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeTemperatureControlMaxTemperature() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; + params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeMaxTemperatureWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type mRequest; }; /* - * Attribute Step + * Command GetYearDaySchedule */ -class ReadTemperatureControlStep : public ReadAttribute { +class DoorLockGetYearDaySchedule : public ClusterCommand { public: - ReadTemperatureControlStep() - : ReadAttribute("step") + DoorLockGetYearDaySchedule() + : ClusterCommand("get-year-day-schedule") { + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } - ~ReadTemperatureControlStep() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.Step response %@", [value description]); - if (error != nil) { - LogNSError("TemperatureControl Step read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getYearDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; }; -class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { +/* + * Command ClearYearDaySchedule + */ +class DoorLockClearYearDaySchedule : public ClusterCommand { public: - SubscribeAttributeTemperatureControlStep() - : SubscribeAttribute("step") + DoorLockClearYearDaySchedule() + : ClusterCommand("clear-year-day-schedule") { + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeTemperatureControlStep() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeStepWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.Step response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; }; /* - * Attribute SelectedTemperatureLevel + * Command SetHolidaySchedule */ -class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { +class DoorLockSetHolidaySchedule : public ClusterCommand { public: - ReadTemperatureControlSelectedTemperatureLevel() - : ReadAttribute("selected-temperature-level") + DoorLockSetHolidaySchedule() + : ClusterCommand("set-holiday-schedule") { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); + AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); + ClusterCommand::AddArguments(); } - ~ReadTemperatureControlSelectedTemperatureLevel() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSelectedTemperatureLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); - if (error != nil) { - LogNSError("TemperatureControl SelectedTemperatureLevel read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; + params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; + params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; + params.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operatingMode)]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setHolidayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type mRequest; }; -class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public SubscribeAttribute { +/* + * Command GetHolidaySchedule + */ +class DoorLockGetHolidaySchedule : public ClusterCommand { public: - SubscribeAttributeTemperatureControlSelectedTemperatureLevel() - : SubscribeAttribute("selected-temperature-level") + DoorLockGetHolidaySchedule() + : ClusterCommand("get-holiday-schedule") { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeTemperatureControlSelectedTemperatureLevel() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getHolidayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeSelectedTemperatureLevelWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; }; /* - * Attribute SupportedTemperatureLevels + * Command ClearHolidaySchedule */ -class ReadTemperatureControlSupportedTemperatureLevels : public ReadAttribute { +class DoorLockClearHolidaySchedule : public ClusterCommand { public: - ReadTemperatureControlSupportedTemperatureLevels() - : ReadAttribute("supported-temperature-levels") + DoorLockClearHolidaySchedule() + : ClusterCommand("clear-holiday-schedule") { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + ClusterCommand::AddArguments(); } - ~ReadTemperatureControlSupportedTemperatureLevels() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSupportedTemperatureLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); - if (error != nil) { - LogNSError("TemperatureControl SupportedTemperatureLevels read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearHolidayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; }; -class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public SubscribeAttribute { +/* + * Command SetUser + */ +class DoorLockSetUser : public ClusterCommand { public: - SubscribeAttributeTemperatureControlSupportedTemperatureLevels() - : SubscribeAttribute("supported-temperature-levels") + DoorLockSetUser() + : ClusterCommand("set-user") { + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserName", &mRequest.userName); + AddArgument("UserUniqueID", 0, UINT32_MAX, &mRequest.userUniqueID); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); + AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeTemperatureControlSupportedTemperatureLevels() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + if (mRequest.userName.IsNull()) { + params.userName = nil; + } else { + params.userName = [[NSString alloc] initWithBytes:mRequest.userName.Value().data() + length:mRequest.userName.Value().size() + encoding:NSUTF8StringEncoding]; } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + if (mRequest.userUniqueID.IsNull()) { + params.userUniqueID = nil; + } else { + params.userUniqueID = [NSNumber numberWithUnsignedInt:mRequest.userUniqueID.Value()]; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + if (mRequest.userStatus.IsNull()) { + params.userStatus = nil; + } else { + params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; + } + if (mRequest.userType.IsNull()) { + params.userType = nil; + } else { + params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; + } + if (mRequest.credentialRule.IsNull()) { + params.credentialRule = nil; + } else { + params.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credentialRule.Value())]; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setUserWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeSupportedTemperatureLevelsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::SetUser::Type mRequest; }; /* - * Attribute GeneratedCommandList + * Command GetUser */ -class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { +class DoorLockGetUser : public ClusterCommand { public: - ReadTemperatureControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + DoorLockGetUser() + : ClusterCommand("get-user") { + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } - ~ReadTemperatureControlGeneratedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("TemperatureControl GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureControlGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeTemperatureControlGeneratedCommandList() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; }; /* - * Attribute AcceptedCommandList + * Command ClearUser */ -class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { +class DoorLockClearUser : public ClusterCommand { public: - ReadTemperatureControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + DoorLockClearUser() + : ClusterCommand("clear-user") { + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } - ~ReadTemperatureControlAcceptedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("TemperatureControl AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearUserWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::ClearUser::Type mRequest; }; -class SubscribeAttributeTemperatureControlAcceptedCommandList : public SubscribeAttribute { +/* + * Command SetCredential + */ +class DoorLockSetCredential : public ClusterCommand { public: - SubscribeAttributeTemperatureControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + DoorLockSetCredential() + : ClusterCommand("set-credential") + , mComplex_Credential(&mRequest.credential) { + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("Credential", &mComplex_Credential); + AddArgument("CredentialData", &mRequest.credentialData); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeTemperatureControlAcceptedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; + params.credential = [MTRDoorLockClusterCredentialStruct new]; + params.credential.credentialType = + [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; + params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; + params.credentialData = [NSData dataWithBytes:mRequest.credentialData.data() length:mRequest.credentialData.size()]; + if (mRequest.userIndex.IsNull()) { + params.userIndex = nil; + } else { + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex.Value()]; } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + if (mRequest.userStatus.IsNull()) { + params.userStatus = nil; + } else { + params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + if (mRequest.userType.IsNull()) { + params.userType = nil; + } else { + params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setCredentialWithParams:params + completion:^( + MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; + TypedComplexArgument mComplex_Credential; }; /* - * Attribute EventList + * Command GetCredentialStatus */ -class ReadTemperatureControlEventList : public ReadAttribute { +class DoorLockGetCredentialStatus : public ClusterCommand { public: - ReadTemperatureControlEventList() - : ReadAttribute("event-list") + DoorLockGetCredentialStatus() + : ClusterCommand("get-credential-status") + , mComplex_Credential(&mRequest.credential) { + AddArgument("Credential", &mComplex_Credential); + ClusterCommand::AddArguments(); } - ~ReadTemperatureControlEventList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.EventList response %@", [value description]); - if (error != nil) { - LogNSError("TemperatureControl EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureControlEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeTemperatureControlEventList() {} - + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.credential = [MTRDoorLockClusterCredentialStruct new]; + params.credential.credentialType = + [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; + params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; + TypedComplexArgument mComplex_Credential; +}; + +/* + * Command ClearCredential + */ +class DoorLockClearCredential : public ClusterCommand { +public: + DoorLockClearCredential() + : ClusterCommand("clear-credential") + , mComplex_Credential(&mRequest.credential) + { + AddArgument("Credential", &mComplex_Credential); + ClusterCommand::AddArguments(); + } + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.credential.IsNull()) { + params.credential = nil; + } else { + params.credential = [MTRDoorLockClusterCredentialStruct new]; + params.credential.credentialType = + [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.Value().credentialType)]; + params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.Value().credentialIndex]; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::ClearCredential::Type mRequest; + TypedComplexArgument> + mComplex_Credential; }; /* - * Attribute AttributeList + * Attribute LockState */ -class ReadTemperatureControlAttributeList : public ReadAttribute { +class ReadDoorLockLockState : public ReadAttribute { public: - ReadTemperatureControlAttributeList() - : ReadAttribute("attribute-list") + ReadDoorLockLockState() + : ReadAttribute("lock-state") { } - ~ReadTemperatureControlAttributeList() {} + ~ReadDoorLockLockState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LockState response %@", [value description]); if (error != nil) { - LogNSError("TemperatureControl AttributeList read Error", error); + LogNSError("DoorLock LockState read Error", error); } SetCommandExitStatus(error); }]; @@ -41327,22 +38993,20 @@ class ReadTemperatureControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeDoorLockLockState() + : SubscribeAttribute("lock-state") { } - ~SubscribeAttributeTemperatureControlAttributeList() {} + ~SubscribeAttributeDoorLockLockState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41353,12 +39017,12 @@ class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeLockStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LockState response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41367,29 +39031,27 @@ class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttrib }; /* - * Attribute FeatureMap + * Attribute LockType */ -class ReadTemperatureControlFeatureMap : public ReadAttribute { +class ReadDoorLockLockType : public ReadAttribute { public: - ReadTemperatureControlFeatureMap() - : ReadAttribute("feature-map") + ReadDoorLockLockType() + : ReadAttribute("lock-type") { } - ~ReadTemperatureControlFeatureMap() {} + ~ReadDoorLockLockType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LockType response %@", [value description]); if (error != nil) { - LogNSError("TemperatureControl FeatureMap read Error", error); + LogNSError("DoorLock LockType read Error", error); } SetCommandExitStatus(error); }]; @@ -41397,22 +39059,20 @@ class ReadTemperatureControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeDoorLockLockType() + : SubscribeAttribute("lock-type") { } - ~SubscribeAttributeTemperatureControlFeatureMap() {} + ~SubscribeAttributeDoorLockLockType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41423,12 +39083,12 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeLockTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); + NSLog(@"DoorLock.LockType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41437,29 +39097,27 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute }; /* - * Attribute ClusterRevision + * Attribute ActuatorEnabled */ -class ReadTemperatureControlClusterRevision : public ReadAttribute { +class ReadDoorLockActuatorEnabled : public ReadAttribute { public: - ReadTemperatureControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadDoorLockActuatorEnabled() + : ReadAttribute("actuator-enabled") { } - ~ReadTemperatureControlClusterRevision() {} + ~ReadDoorLockActuatorEnabled() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); if (error != nil) { - LogNSError("TemperatureControl ClusterRevision read Error", error); + LogNSError("DoorLock ActuatorEnabled read Error", error); } SetCommandExitStatus(error); }]; @@ -41467,22 +39125,20 @@ class ReadTemperatureControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeDoorLockActuatorEnabled() + : SubscribeAttribute("actuator-enabled") { } - ~SubscribeAttributeTemperatureControlClusterRevision() {} + ~SubscribeAttributeDoorLockActuatorEnabled() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41493,12 +39149,12 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeActuatorEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); + NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41506,50 +39162,28 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr } }; -/*----------------------------------------------------------------------------*\ -| Cluster RefrigeratorAlarm | 0x0057 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Mask | 0x0000 | -| * State | 0x0002 | -| * Supported | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * Notify | 0x0000 | -\*----------------------------------------------------------------------------*/ - /* - * Attribute Mask + * Attribute DoorState */ -class ReadRefrigeratorAlarmMask : public ReadAttribute { +class ReadDoorLockDoorState : public ReadAttribute { public: - ReadRefrigeratorAlarmMask() - : ReadAttribute("mask") + ReadDoorLockDoorState() + : ReadAttribute("door-state") { } - ~ReadRefrigeratorAlarmMask() {} + ~ReadDoorLockDoorState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorState response %@", [value description]); if (error != nil) { - LogNSError("RefrigeratorAlarm Mask read Error", error); + LogNSError("DoorLock DoorState read Error", error); } SetCommandExitStatus(error); }]; @@ -41557,22 +39191,20 @@ class ReadRefrigeratorAlarmMask : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { +class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmMask() - : SubscribeAttribute("mask") + SubscribeAttributeDoorLockDoorState() + : SubscribeAttribute("door-state") { } - ~SubscribeAttributeRefrigeratorAlarmMask() {} + ~SubscribeAttributeDoorLockDoorState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41583,12 +39215,12 @@ class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaskWithParams:params + [cluster subscribeAttributeDoorStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); + NSLog(@"DoorLock.DoorState response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41597,29 +39229,27 @@ class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { }; /* - * Attribute State + * Attribute DoorOpenEvents */ -class ReadRefrigeratorAlarmState : public ReadAttribute { +class ReadDoorLockDoorOpenEvents : public ReadAttribute { public: - ReadRefrigeratorAlarmState() - : ReadAttribute("state") + ReadDoorLockDoorOpenEvents() + : ReadAttribute("door-open-events") { } - ~ReadRefrigeratorAlarmState() {} + ~ReadDoorLockDoorOpenEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.State response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); if (error != nil) { - LogNSError("RefrigeratorAlarm State read Error", error); + LogNSError("DoorLock DoorOpenEvents read Error", error); } SetCommandExitStatus(error); }]; @@ -41627,22 +39257,58 @@ class ReadRefrigeratorAlarmState : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { +class WriteDoorLockDoorOpenEvents : public WriteAttribute { +public: + WriteDoorLockDoorOpenEvents() + : WriteAttribute("door-open-events") + { + AddArgument("attr-name", "door-open-events"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDoorLockDoorOpenEvents() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000004) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeDoorOpenEventsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock DoorOpenEvents write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmState() - : SubscribeAttribute("state") + SubscribeAttributeDoorLockDoorOpenEvents() + : SubscribeAttribute("door-open-events") { } - ~SubscribeAttributeRefrigeratorAlarmState() {} + ~SubscribeAttributeDoorLockDoorOpenEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41653,12 +39319,12 @@ class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStateWithParams:params + [cluster subscribeAttributeDoorOpenEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.State response %@", [value description]); + NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41667,29 +39333,27 @@ class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { }; /* - * Attribute Supported + * Attribute DoorClosedEvents */ -class ReadRefrigeratorAlarmSupported : public ReadAttribute { +class ReadDoorLockDoorClosedEvents : public ReadAttribute { public: - ReadRefrigeratorAlarmSupported() - : ReadAttribute("supported") + ReadDoorLockDoorClosedEvents() + : ReadAttribute("door-closed-events") { } - ~ReadRefrigeratorAlarmSupported() {} + ~ReadDoorLockDoorClosedEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); if (error != nil) { - LogNSError("RefrigeratorAlarm Supported read Error", error); + LogNSError("DoorLock DoorClosedEvents read Error", error); } SetCommandExitStatus(error); }]; @@ -41697,22 +39361,58 @@ class ReadRefrigeratorAlarmSupported : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { +class WriteDoorLockDoorClosedEvents : public WriteAttribute { +public: + WriteDoorLockDoorClosedEvents() + : WriteAttribute("door-closed-events") + { + AddArgument("attr-name", "door-closed-events"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDoorLockDoorClosedEvents() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000005) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeDoorClosedEventsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock DoorClosedEvents write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmSupported() - : SubscribeAttribute("supported") + SubscribeAttributeDoorLockDoorClosedEvents() + : SubscribeAttribute("door-closed-events") { } - ~SubscribeAttributeRefrigeratorAlarmSupported() {} + ~SubscribeAttributeDoorLockDoorClosedEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41723,12 +39423,12 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedWithParams:params + [cluster subscribeAttributeDoorClosedEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); + NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41737,29 +39437,27 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute OpenPeriod */ -class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { +class ReadDoorLockOpenPeriod : public ReadAttribute { public: - ReadRefrigeratorAlarmGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadDoorLockOpenPeriod() + : ReadAttribute("open-period") { } - ~ReadRefrigeratorAlarmGeneratedCommandList() {} + ~ReadDoorLockOpenPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.OpenPeriod response %@", [value description]); if (error != nil) { - LogNSError("RefrigeratorAlarm GeneratedCommandList read Error", error); + LogNSError("DoorLock OpenPeriod read Error", error); } SetCommandExitStatus(error); }]; @@ -41767,22 +39465,58 @@ class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public SubscribeAttribute { +class WriteDoorLockOpenPeriod : public WriteAttribute { public: - SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteDoorLockOpenPeriod() + : WriteAttribute("open-period") + { + AddArgument("attr-name", "open-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDoorLockOpenPeriod() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000006) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeOpenPeriodWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock OpenPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockOpenPeriod() + : SubscribeAttribute("open-period") { } - ~SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() {} + ~SubscribeAttributeDoorLockOpenPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41793,12 +39527,12 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeOpenPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.OpenPeriod response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41807,29 +39541,27 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe }; /* - * Attribute AcceptedCommandList + * Attribute NumberOfTotalUsersSupported */ -class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { +class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { public: - ReadRefrigeratorAlarmAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadDoorLockNumberOfTotalUsersSupported() + : ReadAttribute("number-of-total-users-supported") { } - ~ReadRefrigeratorAlarmAcceptedCommandList() {} + ~ReadDoorLockNumberOfTotalUsersSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); if (error != nil) { - LogNSError("RefrigeratorAlarm AcceptedCommandList read Error", error); + LogNSError("DoorLock NumberOfTotalUsersSupported read Error", error); } SetCommandExitStatus(error); }]; @@ -41837,22 +39569,20 @@ class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeDoorLockNumberOfTotalUsersSupported() + : SubscribeAttribute("number-of-total-users-supported") { } - ~SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() {} + ~SubscribeAttributeDoorLockNumberOfTotalUsersSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41863,12 +39593,12 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeNumberOfTotalUsersSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41877,29 +39607,27 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA }; /* - * Attribute EventList + * Attribute NumberOfPINUsersSupported */ -class ReadRefrigeratorAlarmEventList : public ReadAttribute { +class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { public: - ReadRefrigeratorAlarmEventList() - : ReadAttribute("event-list") + ReadDoorLockNumberOfPINUsersSupported() + : ReadAttribute("number-of-pinusers-supported") { } - ~ReadRefrigeratorAlarmEventList() {} + ~ReadDoorLockNumberOfPINUsersSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); if (error != nil) { - LogNSError("RefrigeratorAlarm EventList read Error", error); + LogNSError("DoorLock NumberOfPINUsersSupported read Error", error); } SetCommandExitStatus(error); }]; @@ -41907,22 +39635,20 @@ class ReadRefrigeratorAlarmEventList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeDoorLockNumberOfPINUsersSupported() + : SubscribeAttribute("number-of-pinusers-supported") { } - ~SubscribeAttributeRefrigeratorAlarmEventList() {} + ~SubscribeAttributeDoorLockNumberOfPINUsersSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41933,12 +39659,12 @@ class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeNumberOfPINUsersSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41947,29 +39673,27 @@ class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { }; /* - * Attribute AttributeList + * Attribute NumberOfRFIDUsersSupported */ -class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { +class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { public: - ReadRefrigeratorAlarmAttributeList() - : ReadAttribute("attribute-list") + ReadDoorLockNumberOfRFIDUsersSupported() + : ReadAttribute("number-of-rfidusers-supported") { } - ~ReadRefrigeratorAlarmAttributeList() {} + ~ReadDoorLockNumberOfRFIDUsersSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); if (error != nil) { - LogNSError("RefrigeratorAlarm AttributeList read Error", error); + LogNSError("DoorLock NumberOfRFIDUsersSupported read Error", error); } SetCommandExitStatus(error); }]; @@ -41977,22 +39701,20 @@ class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() + : SubscribeAttribute("number-of-rfidusers-supported") { } - ~SubscribeAttributeRefrigeratorAlarmAttributeList() {} + ~SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42003,12 +39725,12 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeNumberOfRFIDUsersSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42017,29 +39739,28 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu }; /* - * Attribute FeatureMap + * Attribute NumberOfWeekDaySchedulesSupportedPerUser */ -class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { +class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribute { public: - ReadRefrigeratorAlarmFeatureMap() - : ReadAttribute("feature-map") + ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() + : ReadAttribute("number-of-week-day-schedules-supported-per-user") { } - ~ReadRefrigeratorAlarmFeatureMap() {} + ~ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); if (error != nil) { - LogNSError("RefrigeratorAlarm FeatureMap read Error", error); + LogNSError("DoorLock NumberOfWeekDaySchedulesSupportedPerUser read Error", error); } SetCommandExitStatus(error); }]; @@ -42047,22 +39768,20 @@ class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() + : SubscribeAttribute("number-of-week-day-schedules-supported-per-user") { } - ~SubscribeAttributeRefrigeratorAlarmFeatureMap() {} + ~SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42073,12 +39792,12 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); + NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42087,29 +39806,28 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute }; /* - * Attribute ClusterRevision + * Attribute NumberOfYearDaySchedulesSupportedPerUser */ -class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { +class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribute { public: - ReadRefrigeratorAlarmClusterRevision() - : ReadAttribute("cluster-revision") + ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() + : ReadAttribute("number-of-year-day-schedules-supported-per-user") { } - ~ReadRefrigeratorAlarmClusterRevision() {} + ~ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); if (error != nil) { - LogNSError("RefrigeratorAlarm ClusterRevision read Error", error); + LogNSError("DoorLock NumberOfYearDaySchedulesSupportedPerUser read Error", error); } SetCommandExitStatus(error); }]; @@ -42117,22 +39835,20 @@ class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() + : SubscribeAttribute("number-of-year-day-schedules-supported-per-user") { } - ~SubscribeAttributeRefrigeratorAlarmClusterRevision() {} + ~SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42143,12 +39859,12 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); + NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42156,70 +39872,50 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri } }; -/*----------------------------------------------------------------------------*\ -| Cluster AirQuality | 0x005B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * AirQuality | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute AirQuality + * Attribute NumberOfHolidaySchedulesSupported */ -class ReadAirQualityAirQuality : public ReadAttribute { +class ReadDoorLockNumberOfHolidaySchedulesSupported : public ReadAttribute { public: - ReadAirQualityAirQuality() - : ReadAttribute("air-quality") + ReadDoorLockNumberOfHolidaySchedulesSupported() + : ReadAttribute("number-of-holiday-schedules-supported") { } - ~ReadAirQualityAirQuality() {} + ~ReadDoorLockNumberOfHolidaySchedulesSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAirQualityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AirQuality response %@", [value description]); - if (error != nil) { - LogNSError("AirQuality AirQuality read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster + readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); + if (error != nil) { + LogNSError("DoorLock NumberOfHolidaySchedulesSupported read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAirQuality() - : SubscribeAttribute("air-quality") + SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() + : SubscribeAttribute("number-of-holiday-schedules-supported") { } - ~SubscribeAttributeAirQualityAirQuality() {} + ~SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42230,12 +39926,12 @@ class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAirQualityWithParams:params + [cluster subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AirQuality response %@", [value description]); + NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42244,29 +39940,27 @@ class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute MaxPINCodeLength */ -class ReadAirQualityGeneratedCommandList : public ReadAttribute { +class ReadDoorLockMaxPINCodeLength : public ReadAttribute { public: - ReadAirQualityGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadDoorLockMaxPINCodeLength() + : ReadAttribute("max-pincode-length") { } - ~ReadAirQualityGeneratedCommandList() {} + ~ReadDoorLockMaxPINCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); if (error != nil) { - LogNSError("AirQuality GeneratedCommandList read Error", error); + LogNSError("DoorLock MaxPINCodeLength read Error", error); } SetCommandExitStatus(error); }]; @@ -42274,22 +39968,20 @@ class ReadAirQualityGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { public: - SubscribeAttributeAirQualityGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeDoorLockMaxPINCodeLength() + : SubscribeAttribute("max-pincode-length") { } - ~SubscribeAttributeAirQualityGeneratedCommandList() {} + ~SubscribeAttributeDoorLockMaxPINCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42300,12 +39992,12 @@ class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxPINCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42314,29 +40006,27 @@ class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribu }; /* - * Attribute AcceptedCommandList + * Attribute MinPINCodeLength */ -class ReadAirQualityAcceptedCommandList : public ReadAttribute { +class ReadDoorLockMinPINCodeLength : public ReadAttribute { public: - ReadAirQualityAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadDoorLockMinPINCodeLength() + : ReadAttribute("min-pincode-length") { } - ~ReadAirQualityAcceptedCommandList() {} + ~ReadDoorLockMinPINCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); if (error != nil) { - LogNSError("AirQuality AcceptedCommandList read Error", error); + LogNSError("DoorLock MinPINCodeLength read Error", error); } SetCommandExitStatus(error); }]; @@ -42344,22 +40034,20 @@ class ReadAirQualityAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeDoorLockMinPINCodeLength() + : SubscribeAttribute("min-pincode-length") { } - ~SubscribeAttributeAirQualityAcceptedCommandList() {} + ~SubscribeAttributeDoorLockMinPINCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42370,12 +40058,12 @@ class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMinPINCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42384,29 +40072,27 @@ class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribut }; /* - * Attribute EventList + * Attribute MaxRFIDCodeLength */ -class ReadAirQualityEventList : public ReadAttribute { +class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { public: - ReadAirQualityEventList() - : ReadAttribute("event-list") + ReadDoorLockMaxRFIDCodeLength() + : ReadAttribute("max-rfidcode-length") { } - ~ReadAirQualityEventList() {} + ~ReadDoorLockMaxRFIDCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); if (error != nil) { - LogNSError("AirQuality EventList read Error", error); + LogNSError("DoorLock MaxRFIDCodeLength read Error", error); } SetCommandExitStatus(error); }]; @@ -42414,22 +40100,20 @@ class ReadAirQualityEventList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { +class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { public: - SubscribeAttributeAirQualityEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeDoorLockMaxRFIDCodeLength() + : SubscribeAttribute("max-rfidcode-length") { } - ~SubscribeAttributeAirQualityEventList() {} + ~SubscribeAttributeDoorLockMaxRFIDCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42440,12 +40124,12 @@ class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMaxRFIDCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42454,29 +40138,27 @@ class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { }; /* - * Attribute AttributeList + * Attribute MinRFIDCodeLength */ -class ReadAirQualityAttributeList : public ReadAttribute { +class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { public: - ReadAirQualityAttributeList() - : ReadAttribute("attribute-list") + ReadDoorLockMinRFIDCodeLength() + : ReadAttribute("min-rfidcode-length") { } - ~ReadAirQualityAttributeList() {} + ~ReadDoorLockMinRFIDCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); if (error != nil) { - LogNSError("AirQuality AttributeList read Error", error); + LogNSError("DoorLock MinRFIDCodeLength read Error", error); } SetCommandExitStatus(error); }]; @@ -42484,22 +40166,20 @@ class ReadAirQualityAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { +class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeDoorLockMinRFIDCodeLength() + : SubscribeAttribute("min-rfidcode-length") { } - ~SubscribeAttributeAirQualityAttributeList() {} + ~SubscribeAttributeDoorLockMinRFIDCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42510,12 +40190,12 @@ class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeMinRFIDCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42524,29 +40204,27 @@ class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute CredentialRulesSupport */ -class ReadAirQualityFeatureMap : public ReadAttribute { +class ReadDoorLockCredentialRulesSupport : public ReadAttribute { public: - ReadAirQualityFeatureMap() - : ReadAttribute("feature-map") + ReadDoorLockCredentialRulesSupport() + : ReadAttribute("credential-rules-support") { } - ~ReadAirQualityFeatureMap() {} + ~ReadDoorLockCredentialRulesSupport() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); if (error != nil) { - LogNSError("AirQuality FeatureMap read Error", error); + LogNSError("DoorLock CredentialRulesSupport read Error", error); } SetCommandExitStatus(error); }]; @@ -42554,22 +40232,20 @@ class ReadAirQualityFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribute { public: - SubscribeAttributeAirQualityFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeDoorLockCredentialRulesSupport() + : SubscribeAttribute("credential-rules-support") { } - ~SubscribeAttributeAirQualityFeatureMap() {} + ~SubscribeAttributeDoorLockCredentialRulesSupport() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42580,12 +40256,12 @@ class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeCredentialRulesSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.FeatureMap response %@", [value description]); + NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42594,29 +40270,28 @@ class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute NumberOfCredentialsSupportedPerUser */ -class ReadAirQualityClusterRevision : public ReadAttribute { +class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { public: - ReadAirQualityClusterRevision() - : ReadAttribute("cluster-revision") + ReadDoorLockNumberOfCredentialsSupportedPerUser() + : ReadAttribute("number-of-credentials-supported-per-user") { } - ~ReadAirQualityClusterRevision() {} + ~ReadDoorLockNumberOfCredentialsSupportedPerUser() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); if (error != nil) { - LogNSError("AirQuality ClusterRevision read Error", error); + LogNSError("DoorLock NumberOfCredentialsSupportedPerUser read Error", error); } SetCommandExitStatus(error); }]; @@ -42624,22 +40299,20 @@ class ReadAirQualityClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public SubscribeAttribute { public: - SubscribeAttributeAirQualityClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() + : SubscribeAttribute("number-of-credentials-supported-per-user") { } - ~SubscribeAttributeAirQualityClusterRevision() {} + ~SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42650,12 +40323,12 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.ClusterRevision response %@", [value description]); + NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42663,137 +40336,89 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster SmokeCoAlarm | 0x005C | -|------------------------------------------------------------------------------| -| Commands: | | -| * SelfTestRequest | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ExpressedState | 0x0000 | -| * SmokeState | 0x0001 | -| * COState | 0x0002 | -| * BatteryAlert | 0x0003 | -| * DeviceMuted | 0x0004 | -| * TestInProgress | 0x0005 | -| * HardwareFaultAlert | 0x0006 | -| * EndOfServiceAlert | 0x0007 | -| * InterconnectSmokeAlarm | 0x0008 | -| * InterconnectCOAlarm | 0x0009 | -| * ContaminationState | 0x000A | -| * SensitivityLevel | 0x000B | -| * ExpiryDate | 0x000C | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SmokeAlarm | 0x0000 | -| * COAlarm | 0x0001 | -| * LowBattery | 0x0002 | -| * HardwareFault | 0x0003 | -| * EndOfService | 0x0004 | -| * SelfTestComplete | 0x0005 | -| * AlarmMuted | 0x0006 | -| * MuteEnded | 0x0007 | -| * InterconnectSmokeAlarm | 0x0008 | -| * InterconnectCOAlarm | 0x0009 | -| * AllClear | 0x000A | -\*----------------------------------------------------------------------------*/ - /* - * Command SelfTestRequest + * Attribute Language */ -class SmokeCoAlarmSelfTestRequest : public ClusterCommand { +class ReadDoorLockLanguage : public ReadAttribute { public: - SmokeCoAlarmSelfTestRequest() - : ClusterCommand("self-test-request") + ReadDoorLockLanguage() + : ReadAttribute("language") { - ClusterCommand::AddArguments(); } + ~ReadDoorLockLanguage() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) command (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster selfTestRequestWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.Language response %@", [value description]); + if (error != nil) { + LogNSError("DoorLock Language read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Attribute ExpressedState - */ -class ReadSmokeCoAlarmExpressedState : public ReadAttribute { +class WriteDoorLockLanguage : public WriteAttribute { public: - ReadSmokeCoAlarmExpressedState() - : ReadAttribute("expressed-state") + WriteDoorLockLanguage() + : WriteAttribute("language") { + AddArgument("attr-name", "language"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); } - ~ReadSmokeCoAlarmExpressedState() {} + ~WriteDoorLockLanguage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000000) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); - if (error != nil) { - LogNSError("SmokeCOAlarm ExpressedState read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() + length:mValue.size() + encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeLanguageWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock Language write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } + +private: + chip::ByteSpan mValue; }; -class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { +class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmExpressedState() - : SubscribeAttribute("expressed-state") + SubscribeAttributeDoorLockLanguage() + : SubscribeAttribute("language") { } - ~SubscribeAttributeSmokeCoAlarmExpressedState() {} + ~SubscribeAttributeDoorLockLanguage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42804,12 +40429,12 @@ class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeExpressedStateWithParams:params + [cluster subscribeAttributeLanguageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.Language response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42818,29 +40443,27 @@ class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { }; /* - * Attribute SmokeState + * Attribute LEDSettings */ -class ReadSmokeCoAlarmSmokeState : public ReadAttribute { +class ReadDoorLockLEDSettings : public ReadAttribute { public: - ReadSmokeCoAlarmSmokeState() - : ReadAttribute("smoke-state") + ReadDoorLockLEDSettings() + : ReadAttribute("ledsettings") { } - ~ReadSmokeCoAlarmSmokeState() {} + ~ReadDoorLockLEDSettings() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSmokeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LEDSettings response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm SmokeState read Error", error); + LogNSError("DoorLock LEDSettings read Error", error); } SetCommandExitStatus(error); }]; @@ -42848,22 +40471,58 @@ class ReadSmokeCoAlarmSmokeState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { +class WriteDoorLockLEDSettings : public WriteAttribute { +public: + WriteDoorLockLEDSettings() + : WriteAttribute("ledsettings") + { + AddArgument("attr-name", "ledsettings"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDoorLockLEDSettings() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000022) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeLEDSettingsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock LEDSettings write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmSmokeState() - : SubscribeAttribute("smoke-state") + SubscribeAttributeDoorLockLEDSettings() + : SubscribeAttribute("ledsettings") { } - ~SubscribeAttributeSmokeCoAlarmSmokeState() {} + ~SubscribeAttributeDoorLockLEDSettings() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42874,12 +40533,12 @@ class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSmokeStateWithParams:params + [cluster subscribeAttributeLEDSettingsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); + NSLog(@"DoorLock.LEDSettings response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42888,29 +40547,27 @@ class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { }; /* - * Attribute COState + * Attribute AutoRelockTime */ -class ReadSmokeCoAlarmCOState : public ReadAttribute { +class ReadDoorLockAutoRelockTime : public ReadAttribute { public: - ReadSmokeCoAlarmCOState() - : ReadAttribute("costate") + ReadDoorLockAutoRelockTime() + : ReadAttribute("auto-relock-time") { } - ~ReadSmokeCoAlarmCOState() {} + ~ReadDoorLockAutoRelockTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCOStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.COState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm COState read Error", error); + LogNSError("DoorLock AutoRelockTime read Error", error); } SetCommandExitStatus(error); }]; @@ -42918,22 +40575,58 @@ class ReadSmokeCoAlarmCOState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { +class WriteDoorLockAutoRelockTime : public WriteAttribute { +public: + WriteDoorLockAutoRelockTime() + : WriteAttribute("auto-relock-time") + { + AddArgument("attr-name", "auto-relock-time"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDoorLockAutoRelockTime() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000023) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeAutoRelockTimeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock AutoRelockTime write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmCOState() - : SubscribeAttribute("costate") + SubscribeAttributeDoorLockAutoRelockTime() + : SubscribeAttribute("auto-relock-time") { } - ~SubscribeAttributeSmokeCoAlarmCOState() {} + ~SubscribeAttributeDoorLockAutoRelockTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42944,12 +40637,12 @@ class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCOStateWithParams:params + [cluster subscribeAttributeAutoRelockTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.COState response %@", [value description]); + NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42958,29 +40651,27 @@ class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { }; /* - * Attribute BatteryAlert + * Attribute SoundVolume */ -class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { +class ReadDoorLockSoundVolume : public ReadAttribute { public: - ReadSmokeCoAlarmBatteryAlert() - : ReadAttribute("battery-alert") + ReadDoorLockSoundVolume() + : ReadAttribute("sound-volume") { } - ~ReadSmokeCoAlarmBatteryAlert() {} + ~ReadDoorLockSoundVolume() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBatteryAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SoundVolume response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm BatteryAlert read Error", error); + LogNSError("DoorLock SoundVolume read Error", error); } SetCommandExitStatus(error); }]; @@ -42988,22 +40679,58 @@ class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { +class WriteDoorLockSoundVolume : public WriteAttribute { public: - SubscribeAttributeSmokeCoAlarmBatteryAlert() - : SubscribeAttribute("battery-alert") + WriteDoorLockSoundVolume() + : WriteAttribute("sound-volume") { + AddArgument("attr-name", "sound-volume"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeSmokeCoAlarmBatteryAlert() {} + ~WriteDoorLockSoundVolume() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSoundVolumeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock SoundVolume write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockSoundVolume() + : SubscribeAttribute("sound-volume") + { + } + + ~SubscribeAttributeDoorLockSoundVolume() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000024) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43014,12 +40741,12 @@ class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatteryAlertWithParams:params + [cluster subscribeAttributeSoundVolumeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); + NSLog(@"DoorLock.SoundVolume response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43028,29 +40755,27 @@ class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { }; /* - * Attribute DeviceMuted + * Attribute OperatingMode */ -class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { +class ReadDoorLockOperatingMode : public ReadAttribute { public: - ReadSmokeCoAlarmDeviceMuted() - : ReadAttribute("device-muted") + ReadDoorLockOperatingMode() + : ReadAttribute("operating-mode") { } - ~ReadSmokeCoAlarmDeviceMuted() {} + ~ReadDoorLockOperatingMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDeviceMutedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.OperatingMode response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm DeviceMuted read Error", error); + LogNSError("DoorLock OperatingMode read Error", error); } SetCommandExitStatus(error); }]; @@ -43058,38 +40783,74 @@ class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { +class WriteDoorLockOperatingMode : public WriteAttribute { public: - SubscribeAttributeSmokeCoAlarmDeviceMuted() - : SubscribeAttribute("device-muted") + WriteDoorLockOperatingMode() + : WriteAttribute("operating-mode") { + AddArgument("attr-name", "operating-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeSmokeCoAlarmDeviceMuted() {} + ~WriteDoorLockOperatingMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeOperatingModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock OperatingMode write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockOperatingMode() + : SubscribeAttribute("operating-mode") + { + } + + ~SubscribeAttributeDoorLockOperatingMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000025) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDeviceMutedWithParams:params + [cluster subscribeAttributeOperatingModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); + NSLog(@"DoorLock.OperatingMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43098,29 +40859,27 @@ class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { }; /* - * Attribute TestInProgress + * Attribute SupportedOperatingModes */ -class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { +class ReadDoorLockSupportedOperatingModes : public ReadAttribute { public: - ReadSmokeCoAlarmTestInProgress() - : ReadAttribute("test-in-progress") + ReadDoorLockSupportedOperatingModes() + : ReadAttribute("supported-operating-modes") { } - ~ReadSmokeCoAlarmTestInProgress() {} + ~ReadDoorLockSupportedOperatingModes() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTestInProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedOperatingModesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm TestInProgress read Error", error); + LogNSError("DoorLock SupportedOperatingModes read Error", error); } SetCommandExitStatus(error); }]; @@ -43128,22 +40887,20 @@ class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { +class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmTestInProgress() - : SubscribeAttribute("test-in-progress") + SubscribeAttributeDoorLockSupportedOperatingModes() + : SubscribeAttribute("supported-operating-modes") { } - ~SubscribeAttributeSmokeCoAlarmTestInProgress() {} + ~SubscribeAttributeDoorLockSupportedOperatingModes() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43154,12 +40911,12 @@ class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTestInProgressWithParams:params + [cluster subscribeAttributeSupportedOperatingModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); + NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43168,29 +40925,27 @@ class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { }; /* - * Attribute HardwareFaultAlert + * Attribute DefaultConfigurationRegister */ -class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { +class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { public: - ReadSmokeCoAlarmHardwareFaultAlert() - : ReadAttribute("hardware-fault-alert") + ReadDoorLockDefaultConfigurationRegister() + : ReadAttribute("default-configuration-register") { } - ~ReadSmokeCoAlarmHardwareFaultAlert() {} + ~ReadDoorLockDefaultConfigurationRegister() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeHardwareFaultAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm HardwareFaultAlert read Error", error); + LogNSError("DoorLock DefaultConfigurationRegister read Error", error); } SetCommandExitStatus(error); }]; @@ -43198,22 +40953,20 @@ class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribute { +class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() - : SubscribeAttribute("hardware-fault-alert") + SubscribeAttributeDoorLockDefaultConfigurationRegister() + : SubscribeAttribute("default-configuration-register") { } - ~SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() {} + ~SubscribeAttributeDoorLockDefaultConfigurationRegister() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43224,12 +40977,12 @@ class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareFaultAlertWithParams:params + [cluster subscribeAttributeDefaultConfigurationRegisterWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); + NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43238,29 +40991,27 @@ class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribu }; /* - * Attribute EndOfServiceAlert + * Attribute EnableLocalProgramming */ -class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { +class ReadDoorLockEnableLocalProgramming : public ReadAttribute { public: - ReadSmokeCoAlarmEndOfServiceAlert() - : ReadAttribute("end-of-service-alert") + ReadDoorLockEnableLocalProgramming() + : ReadAttribute("enable-local-programming") { } - ~ReadSmokeCoAlarmEndOfServiceAlert() {} + ~ReadDoorLockEnableLocalProgramming() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEndOfServiceAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm EndOfServiceAlert read Error", error); + LogNSError("DoorLock EnableLocalProgramming read Error", error); } SetCommandExitStatus(error); }]; @@ -43268,22 +41019,58 @@ class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribute { +class WriteDoorLockEnableLocalProgramming : public WriteAttribute { public: - SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() - : SubscribeAttribute("end-of-service-alert") + WriteDoorLockEnableLocalProgramming() + : WriteAttribute("enable-local-programming") { + AddArgument("attr-name", "enable-local-programming"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() {} + ~WriteDoorLockEnableLocalProgramming() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeEnableLocalProgrammingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnableLocalProgramming write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockEnableLocalProgramming() + : SubscribeAttribute("enable-local-programming") + { + } + + ~SubscribeAttributeDoorLockEnableLocalProgramming() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000028) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43294,12 +41081,12 @@ class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEndOfServiceAlertWithParams:params + [cluster subscribeAttributeEnableLocalProgrammingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); + NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43308,29 +41095,27 @@ class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribut }; /* - * Attribute InterconnectSmokeAlarm + * Attribute EnableOneTouchLocking */ -class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { +class ReadDoorLockEnableOneTouchLocking : public ReadAttribute { public: - ReadSmokeCoAlarmInterconnectSmokeAlarm() - : ReadAttribute("interconnect-smoke-alarm") + ReadDoorLockEnableOneTouchLocking() + : ReadAttribute("enable-one-touch-locking") { } - ~ReadSmokeCoAlarmInterconnectSmokeAlarm() {} + ~ReadDoorLockEnableOneTouchLocking() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInterconnectSmokeAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm InterconnectSmokeAlarm read Error", error); + LogNSError("DoorLock EnableOneTouchLocking read Error", error); } SetCommandExitStatus(error); }]; @@ -43338,22 +41123,58 @@ class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAttribute { +class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { public: - SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() - : SubscribeAttribute("interconnect-smoke-alarm") + WriteDoorLockEnableOneTouchLocking() + : WriteAttribute("enable-one-touch-locking") { + AddArgument("attr-name", "enable-one-touch-locking"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() {} + ~WriteDoorLockEnableOneTouchLocking() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeEnableOneTouchLockingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnableOneTouchLocking write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockEnableOneTouchLocking() + : SubscribeAttribute("enable-one-touch-locking") + { + } + + ~SubscribeAttributeDoorLockEnableOneTouchLocking() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000029) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43364,12 +41185,12 @@ class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInterconnectSmokeAlarmWithParams:params + [cluster subscribeAttributeEnableOneTouchLockingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); + NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43378,29 +41199,27 @@ class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAtt }; /* - * Attribute InterconnectCOAlarm + * Attribute EnableInsideStatusLED */ -class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { +class ReadDoorLockEnableInsideStatusLED : public ReadAttribute { public: - ReadSmokeCoAlarmInterconnectCOAlarm() - : ReadAttribute("interconnect-coalarm") + ReadDoorLockEnableInsideStatusLED() + : ReadAttribute("enable-inside-status-led") { } - ~ReadSmokeCoAlarmInterconnectCOAlarm() {} + ~ReadDoorLockEnableInsideStatusLED() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInterconnectCOAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm InterconnectCOAlarm read Error", error); + LogNSError("DoorLock EnableInsideStatusLED read Error", error); } SetCommandExitStatus(error); }]; @@ -43408,22 +41227,58 @@ class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttribute { +class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { public: - SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() - : SubscribeAttribute("interconnect-coalarm") + WriteDoorLockEnableInsideStatusLED() + : WriteAttribute("enable-inside-status-led") { + AddArgument("attr-name", "enable-inside-status-led"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() {} + ~WriteDoorLockEnableInsideStatusLED() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeEnableInsideStatusLEDWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnableInsideStatusLED write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockEnableInsideStatusLED() + : SubscribeAttribute("enable-inside-status-led") + { + } + + ~SubscribeAttributeDoorLockEnableInsideStatusLED() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43434,12 +41289,12 @@ class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInterconnectCOAlarmWithParams:params + [cluster subscribeAttributeEnableInsideStatusLEDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); + NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43448,29 +41303,27 @@ class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttrib }; /* - * Attribute ContaminationState + * Attribute EnablePrivacyModeButton */ -class ReadSmokeCoAlarmContaminationState : public ReadAttribute { +class ReadDoorLockEnablePrivacyModeButton : public ReadAttribute { public: - ReadSmokeCoAlarmContaminationState() - : ReadAttribute("contamination-state") + ReadDoorLockEnablePrivacyModeButton() + : ReadAttribute("enable-privacy-mode-button") { } - ~ReadSmokeCoAlarmContaminationState() {} + ~ReadDoorLockEnablePrivacyModeButton() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeContaminationStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnablePrivacyModeButtonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm ContaminationState read Error", error); + LogNSError("DoorLock EnablePrivacyModeButton read Error", error); } SetCommandExitStatus(error); }]; @@ -43478,22 +41331,58 @@ class ReadSmokeCoAlarmContaminationState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribute { +class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { public: - SubscribeAttributeSmokeCoAlarmContaminationState() - : SubscribeAttribute("contamination-state") + WriteDoorLockEnablePrivacyModeButton() + : WriteAttribute("enable-privacy-mode-button") { + AddArgument("attr-name", "enable-privacy-mode-button"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeSmokeCoAlarmContaminationState() {} + ~WriteDoorLockEnablePrivacyModeButton() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeEnablePrivacyModeButtonWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnablePrivacyModeButton write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockEnablePrivacyModeButton() + : SubscribeAttribute("enable-privacy-mode-button") + { + } + + ~SubscribeAttributeDoorLockEnablePrivacyModeButton() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002B) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43504,12 +41393,12 @@ class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeContaminationStateWithParams:params + [cluster subscribeAttributeEnablePrivacyModeButtonWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); + NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43518,29 +41407,27 @@ class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribu }; /* - * Attribute SensitivityLevel + * Attribute LocalProgrammingFeatures */ -class ReadSmokeCoAlarmSensitivityLevel : public ReadAttribute { +class ReadDoorLockLocalProgrammingFeatures : public ReadAttribute { public: - ReadSmokeCoAlarmSensitivityLevel() - : ReadAttribute("sensitivity-level") + ReadDoorLockLocalProgrammingFeatures() + : ReadAttribute("local-programming-features") { } - ~ReadSmokeCoAlarmSensitivityLevel() {} + ~ReadDoorLockLocalProgrammingFeatures() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SensitivityLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocalProgrammingFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm SensitivityLevel read Error", error); + LogNSError("DoorLock LocalProgrammingFeatures read Error", error); } SetCommandExitStatus(error); }]; @@ -43548,39 +41435,37 @@ class ReadSmokeCoAlarmSensitivityLevel : public ReadAttribute { } }; -class WriteSmokeCoAlarmSensitivityLevel : public WriteAttribute { +class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { public: - WriteSmokeCoAlarmSensitivityLevel() - : WriteAttribute("sensitivity-level") + WriteDoorLockLocalProgrammingFeatures() + : WriteAttribute("local-programming-features") { - AddArgument("attr-name", "sensitivity-level"); + AddArgument("attr-name", "local-programming-features"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteSmokeCoAlarmSensitivityLevel() {} + ~WriteDoorLockLocalProgrammingFeatures() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) WriteAttribute (0x0000000B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeSensitivityLevelWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("SmokeCOAlarm SensitivityLevel write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeLocalProgrammingFeaturesWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock LocalProgrammingFeatures write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -43588,22 +41473,20 @@ class WriteSmokeCoAlarmSensitivityLevel : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeSmokeCoAlarmSensitivityLevel : public SubscribeAttribute { +class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmSensitivityLevel() - : SubscribeAttribute("sensitivity-level") + SubscribeAttributeDoorLockLocalProgrammingFeatures() + : SubscribeAttribute("local-programming-features") { } - ~SubscribeAttributeSmokeCoAlarmSensitivityLevel() {} + ~SubscribeAttributeDoorLockLocalProgrammingFeatures() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43614,12 +41497,12 @@ class SubscribeAttributeSmokeCoAlarmSensitivityLevel : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSensitivityLevelWithParams:params + [cluster subscribeAttributeLocalProgrammingFeaturesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SensitivityLevel response %@", [value description]); + NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43628,29 +41511,27 @@ class SubscribeAttributeSmokeCoAlarmSensitivityLevel : public SubscribeAttribute }; /* - * Attribute ExpiryDate + * Attribute WrongCodeEntryLimit */ -class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { +class ReadDoorLockWrongCodeEntryLimit : public ReadAttribute { public: - ReadSmokeCoAlarmExpiryDate() - : ReadAttribute("expiry-date") + ReadDoorLockWrongCodeEntryLimit() + : ReadAttribute("wrong-code-entry-limit") { } - ~ReadSmokeCoAlarmExpiryDate() {} + ~ReadDoorLockWrongCodeEntryLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeExpiryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm ExpiryDate read Error", error); + LogNSError("DoorLock WrongCodeEntryLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -43658,22 +41539,58 @@ class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { +class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { public: - SubscribeAttributeSmokeCoAlarmExpiryDate() - : SubscribeAttribute("expiry-date") + WriteDoorLockWrongCodeEntryLimit() + : WriteAttribute("wrong-code-entry-limit") { + AddArgument("attr-name", "wrong-code-entry-limit"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeSmokeCoAlarmExpiryDate() {} + ~WriteDoorLockWrongCodeEntryLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeWrongCodeEntryLimitWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock WrongCodeEntryLimit write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockWrongCodeEntryLimit() + : SubscribeAttribute("wrong-code-entry-limit") + { + } + + ~SubscribeAttributeDoorLockWrongCodeEntryLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000030) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43684,12 +41601,12 @@ class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeExpiryDateWithParams:params + [cluster subscribeAttributeWrongCodeEntryLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); + NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43698,29 +41615,27 @@ class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute UserCodeTemporaryDisableTime */ -class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { +class ReadDoorLockUserCodeTemporaryDisableTime : public ReadAttribute { public: - ReadSmokeCoAlarmGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadDoorLockUserCodeTemporaryDisableTime() + : ReadAttribute("user-code-temporary-disable-time") { } - ~ReadSmokeCoAlarmGeneratedCommandList() {} + ~ReadDoorLockUserCodeTemporaryDisableTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm GeneratedCommandList read Error", error); + LogNSError("DoorLock UserCodeTemporaryDisableTime read Error", error); } SetCommandExitStatus(error); }]; @@ -43728,22 +41643,59 @@ class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttribute { +class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute { public: - SubscribeAttributeSmokeCoAlarmGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteDoorLockUserCodeTemporaryDisableTime() + : WriteAttribute("user-code-temporary-disable-time") { + AddArgument("attr-name", "user-code-temporary-disable-time"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeSmokeCoAlarmGeneratedCommandList() {} + ~WriteDoorLockUserCodeTemporaryDisableTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster + writeAttributeUserCodeTemporaryDisableTimeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() + : SubscribeAttribute("user-code-temporary-disable-time") + { + } + + ~SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000031) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43754,12 +41706,12 @@ class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeUserCodeTemporaryDisableTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43768,29 +41720,27 @@ class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttri }; /* - * Attribute AcceptedCommandList + * Attribute SendPINOverTheAir */ -class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { +class ReadDoorLockSendPINOverTheAir : public ReadAttribute { public: - ReadSmokeCoAlarmAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadDoorLockSendPINOverTheAir() + : ReadAttribute("send-pinover-the-air") { } - ~ReadSmokeCoAlarmAcceptedCommandList() {} + ~ReadDoorLockSendPINOverTheAir() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm AcceptedCommandList read Error", error); + LogNSError("DoorLock SendPINOverTheAir read Error", error); } SetCommandExitStatus(error); }]; @@ -43798,92 +41748,58 @@ class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttribute { +class WriteDoorLockSendPINOverTheAir : public WriteAttribute { public: - SubscribeAttributeSmokeCoAlarmAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteDoorLockSendPINOverTheAir() + : WriteAttribute("send-pinover-the-air") { + AddArgument("attr-name", "send-pinover-the-air"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeSmokeCoAlarmAcceptedCommandList() {} + ~WriteDoorLockSendPINOverTheAir() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm 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(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + [cluster writeAttributeSendPINOverTheAirWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock SendPINOverTheAir write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute EventList - */ -class ReadSmokeCoAlarmEventList : public ReadAttribute { -public: - ReadSmokeCoAlarmEventList() - : ReadAttribute("event-list") - { - } - - ~ReadSmokeCoAlarmEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); - if (error != nil) { - LogNSError("SmokeCOAlarm EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + bool mValue; }; -class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeDoorLockSendPINOverTheAir() + : SubscribeAttribute("send-pinover-the-air") { } - ~SubscribeAttributeSmokeCoAlarmEventList() {} + ~SubscribeAttributeDoorLockSendPINOverTheAir() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43894,12 +41810,12 @@ class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeSendPINOverTheAirWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43908,29 +41824,27 @@ class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { }; /* - * Attribute AttributeList + * Attribute RequirePINforRemoteOperation */ -class ReadSmokeCoAlarmAttributeList : public ReadAttribute { +class ReadDoorLockRequirePINforRemoteOperation : public ReadAttribute { public: - ReadSmokeCoAlarmAttributeList() - : ReadAttribute("attribute-list") + ReadDoorLockRequirePINforRemoteOperation() + : ReadAttribute("require-pinfor-remote-operation") { } - ~ReadSmokeCoAlarmAttributeList() {} + ~ReadDoorLockRequirePINforRemoteOperation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm AttributeList read Error", error); + LogNSError("DoorLock RequirePINforRemoteOperation read Error", error); } SetCommandExitStatus(error); }]; @@ -43938,22 +41852,59 @@ class ReadSmokeCoAlarmAttributeList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { +class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute { public: - SubscribeAttributeSmokeCoAlarmAttributeList() - : SubscribeAttribute("attribute-list") + WriteDoorLockRequirePINforRemoteOperation() + : WriteAttribute("require-pinfor-remote-operation") { + AddArgument("attr-name", "require-pinfor-remote-operation"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeSmokeCoAlarmAttributeList() {} + ~WriteDoorLockRequirePINforRemoteOperation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster + writeAttributeRequirePINforRemoteOperationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockRequirePINforRemoteOperation() + : SubscribeAttribute("require-pinfor-remote-operation") + { + } + + ~SubscribeAttributeDoorLockRequirePINforRemoteOperation() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000033) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43964,12 +41915,12 @@ class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeRequirePINforRemoteOperationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43978,29 +41929,27 @@ class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute ExpiringUserTimeout */ -class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { +class ReadDoorLockExpiringUserTimeout : public ReadAttribute { public: - ReadSmokeCoAlarmFeatureMap() - : ReadAttribute("feature-map") + ReadDoorLockExpiringUserTimeout() + : ReadAttribute("expiring-user-timeout") { } - ~ReadSmokeCoAlarmFeatureMap() {} + ~ReadDoorLockExpiringUserTimeout() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm FeatureMap read Error", error); + LogNSError("DoorLock ExpiringUserTimeout read Error", error); } SetCommandExitStatus(error); }]; @@ -44008,22 +41957,58 @@ class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { +class WriteDoorLockExpiringUserTimeout : public WriteAttribute { public: - SubscribeAttributeSmokeCoAlarmFeatureMap() - : SubscribeAttribute("feature-map") + WriteDoorLockExpiringUserTimeout() + : WriteAttribute("expiring-user-timeout") { + AddArgument("attr-name", "expiring-user-timeout"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeSmokeCoAlarmFeatureMap() {} + ~WriteDoorLockExpiringUserTimeout() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeExpiringUserTimeoutWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock ExpiringUserTimeout write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockExpiringUserTimeout() + : SubscribeAttribute("expiring-user-timeout") + { + } + + ~SubscribeAttributeDoorLockExpiringUserTimeout() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000035) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44034,12 +42019,12 @@ class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeExpiringUserTimeoutWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); + NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44048,29 +42033,27 @@ class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute GeneratedCommandList */ -class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { +class ReadDoorLockGeneratedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmClusterRevision() - : ReadAttribute("cluster-revision") + ReadDoorLockGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadSmokeCoAlarmClusterRevision() {} + ~ReadDoorLockGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("SmokeCOAlarm ClusterRevision read Error", error); + LogNSError("DoorLock GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -44078,22 +42061,20 @@ class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeDoorLockGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeSmokeCoAlarmClusterRevision() {} + ~SubscribeAttributeDoorLockGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44104,12 +42085,12 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44117,238 +42098,28 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute } }; -/*----------------------------------------------------------------------------*\ -| Cluster OperationalState | 0x0060 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | -\*----------------------------------------------------------------------------*/ - -/* - * Command Pause - */ -class OperationalStatePause : public ClusterCommand { -public: - OperationalStatePause() - : ClusterCommand("pause") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterPauseParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster pauseWithParams:params - completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command Stop - */ -class OperationalStateStop : public ClusterCommand { -public: - OperationalStateStop() - : ClusterCommand("stop") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterStopParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopWithParams:params - completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command Start - */ -class OperationalStateStart : public ClusterCommand { -public: - OperationalStateStart() - : ClusterCommand("start") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterStartParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster startWithParams:params - completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command Resume - */ -class OperationalStateResume : public ClusterCommand { -public: - OperationalStateResume() - : ClusterCommand("resume") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterResumeParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resumeWithParams:params - completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - /* - * Attribute PhaseList + * Attribute AcceptedCommandList */ -class ReadOperationalStatePhaseList : public ReadAttribute { +class ReadDoorLockAcceptedCommandList : public ReadAttribute { public: - ReadOperationalStatePhaseList() - : ReadAttribute("phase-list") + ReadDoorLockAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOperationalStatePhaseList() {} + ~ReadDoorLockAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.PhaseList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("OperationalState PhaseList read Error", error); + LogNSError("DoorLock AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -44356,22 +42127,20 @@ class ReadOperationalStatePhaseList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { +class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStatePhaseList() - : SubscribeAttribute("phase-list") + SubscribeAttributeDoorLockAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOperationalStatePhaseList() {} + ~SubscribeAttributeDoorLockAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44382,12 +42151,12 @@ class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhaseListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.PhaseList response %@", [value description]); + NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44396,29 +42165,27 @@ class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { }; /* - * Attribute CurrentPhase + * Attribute AttributeList */ -class ReadOperationalStateCurrentPhase : public ReadAttribute { +class ReadDoorLockAttributeList : public ReadAttribute { public: - ReadOperationalStateCurrentPhase() - : ReadAttribute("current-phase") + ReadDoorLockAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOperationalStateCurrentPhase() {} + ~ReadDoorLockAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CurrentPhase response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("OperationalState CurrentPhase read Error", error); + LogNSError("DoorLock AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -44426,22 +42193,20 @@ class ReadOperationalStateCurrentPhase : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute { +class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateCurrentPhase() - : SubscribeAttribute("current-phase") + SubscribeAttributeDoorLockAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOperationalStateCurrentPhase() {} + ~SubscribeAttributeDoorLockAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44452,12 +42217,12 @@ class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPhaseWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CurrentPhase response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44466,29 +42231,27 @@ class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute }; /* - * Attribute CountdownTime + * Attribute FeatureMap */ -class ReadOperationalStateCountdownTime : public ReadAttribute { +class ReadDoorLockFeatureMap : public ReadAttribute { public: - ReadOperationalStateCountdownTime() - : ReadAttribute("countdown-time") + ReadDoorLockFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOperationalStateCountdownTime() {} + ~ReadDoorLockFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CountdownTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("OperationalState CountdownTime read Error", error); + LogNSError("DoorLock FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -44496,22 +42259,20 @@ class ReadOperationalStateCountdownTime : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribute { +class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateCountdownTime() - : SubscribeAttribute("countdown-time") + SubscribeAttributeDoorLockFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOperationalStateCountdownTime() {} + ~SubscribeAttributeDoorLockFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44522,12 +42283,12 @@ class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCountdownTimeWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CountdownTime response %@", [value description]); + NSLog(@"DoorLock.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44536,29 +42297,27 @@ class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribut }; /* - * Attribute OperationalStateList + * Attribute ClusterRevision */ -class ReadOperationalStateOperationalStateList : public ReadAttribute { +class ReadDoorLockClusterRevision : public ReadAttribute { public: - ReadOperationalStateOperationalStateList() - : ReadAttribute("operational-state-list") + ReadDoorLockClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOperationalStateOperationalStateList() {} + ~ReadDoorLockClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalStateList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("OperationalState OperationalStateList read Error", error); + LogNSError("DoorLock ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -44566,22 +42325,20 @@ class ReadOperationalStateOperationalStateList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeAttribute { +class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateOperationalStateList() - : SubscribeAttribute("operational-state-list") + SubscribeAttributeDoorLockClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOperationalStateOperationalStateList() {} + ~SubscribeAttributeDoorLockClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44592,12 +42349,12 @@ class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalStateList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44605,242 +42362,388 @@ class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeA } }; -/* - * Attribute OperationalState - */ -class ReadOperationalStateOperationalState : public ReadAttribute { -public: - ReadOperationalStateOperationalState() - : ReadAttribute("operational-state") - { - } - - ~ReadOperationalStateOperationalState() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x00000004) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOperationalStateWithCompletion:^( - MTROperationalStateClusterOperationalStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalState response %@", [value description]); - if (error != nil) { - LogNSError("OperationalState OperationalState read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; +/*----------------------------------------------------------------------------*\ +| Cluster WindowCovering | 0x0102 | +|------------------------------------------------------------------------------| +| Commands: | | +| * UpOrOpen | 0x00 | +| * DownOrClose | 0x01 | +| * StopMotion | 0x02 | +| * GoToLiftValue | 0x04 | +| * GoToLiftPercentage | 0x05 | +| * GoToTiltValue | 0x07 | +| * GoToTiltPercentage | 0x08 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Type | 0x0000 | +| * PhysicalClosedLimitLift | 0x0001 | +| * PhysicalClosedLimitTilt | 0x0002 | +| * CurrentPositionLift | 0x0003 | +| * CurrentPositionTilt | 0x0004 | +| * NumberOfActuationsLift | 0x0005 | +| * NumberOfActuationsTilt | 0x0006 | +| * ConfigStatus | 0x0007 | +| * CurrentPositionLiftPercentage | 0x0008 | +| * CurrentPositionTiltPercentage | 0x0009 | +| * OperationalStatus | 0x000A | +| * TargetPositionLiftPercent100ths | 0x000B | +| * TargetPositionTiltPercent100ths | 0x000C | +| * EndProductType | 0x000D | +| * CurrentPositionLiftPercent100ths | 0x000E | +| * CurrentPositionTiltPercent100ths | 0x000F | +| * InstalledOpenLimitLift | 0x0010 | +| * InstalledClosedLimitLift | 0x0011 | +| * InstalledOpenLimitTilt | 0x0012 | +| * InstalledClosedLimitTilt | 0x0013 | +| * Mode | 0x0017 | +| * SafetyStatus | 0x001A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command UpOrOpen + */ +class WindowCoveringUpOrOpen : public ClusterCommand { +public: + WindowCoveringUpOrOpen() + : ClusterCommand("up-or-open") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster upOrOpenWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttribute { +/* + * Command DownOrClose + */ +class WindowCoveringDownOrClose : public ClusterCommand { public: - SubscribeAttributeOperationalStateOperationalState() - : SubscribeAttribute("operational-state") + WindowCoveringDownOrClose() + : ClusterCommand("down-or-close") { + ClusterCommand::AddArguments(); } - ~SubscribeAttributeOperationalStateOperationalState() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster downOrCloseWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeOperationalStateWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(MTROperationalStateClusterOperationalStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalState response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; /* - * Attribute OperationalError + * Command StopMotion */ -class ReadOperationalStateOperationalError : public ReadAttribute { +class WindowCoveringStopMotion : public ClusterCommand { public: - ReadOperationalStateOperationalError() - : ReadAttribute("operational-error") + WindowCoveringStopMotion() + : ClusterCommand("stop-motion") { + ClusterCommand::AddArguments(); } - ~ReadOperationalStateOperationalError() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOperationalErrorWithCompletion:^( - MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalError response %@", [value description]); - if (error != nil) { - LogNSError("OperationalState OperationalError read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopMotionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttribute { +/* + * Command GoToLiftValue + */ +class WindowCoveringGoToLiftValue : public ClusterCommand { public: - SubscribeAttributeOperationalStateOperationalError() - : SubscribeAttribute("operational-error") + WindowCoveringGoToLiftValue() + : ClusterCommand("go-to-lift-value") { + AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeOperationalStateOperationalError() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.liftValue = [NSNumber numberWithUnsignedShort:mRequest.liftValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToLiftValueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeOperationalErrorWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalError response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; }; /* - * Attribute GeneratedCommandList + * Command GoToLiftPercentage */ -class ReadOperationalStateGeneratedCommandList : public ReadAttribute { +class WindowCoveringGoToLiftPercentage : public ClusterCommand { public: - ReadOperationalStateGeneratedCommandList() - : ReadAttribute("generated-command-list") + WindowCoveringGoToLiftPercentage() + : ClusterCommand("go-to-lift-percentage") { + AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); + ClusterCommand::AddArguments(); } - ~ReadOperationalStateGeneratedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("OperationalState GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.liftPercent100thsValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; }; -class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeAttribute { +/* + * Command GoToTiltValue + */ +class WindowCoveringGoToTiltValue : public ClusterCommand { public: - SubscribeAttributeOperationalStateGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WindowCoveringGoToTiltValue() + : ClusterCommand("go-to-tilt-value") { + AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeOperationalStateGeneratedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.tiltValue = [NSNumber numberWithUnsignedShort:mRequest.tiltValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToTiltValueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; +}; + +/* + * Command GoToTiltPercentage + */ +class WindowCoveringGoToTiltPercentage : public ClusterCommand { +public: + WindowCoveringGoToTiltPercentage() + : ClusterCommand("go-to-tilt-percentage") + { + AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.tiltPercent100thsValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; }; /* - * Attribute AcceptedCommandList + * Attribute Type */ -class ReadOperationalStateAcceptedCommandList : public ReadAttribute { +class ReadWindowCoveringType : public ReadAttribute { public: - ReadOperationalStateAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadWindowCoveringType() + : ReadAttribute("type") { } - ~ReadOperationalStateAcceptedCommandList() {} + ~ReadWindowCoveringType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.Type response %@", [value description]); if (error != nil) { - LogNSError("OperationalState AcceptedCommandList read Error", error); + LogNSError("WindowCovering Type read Error", error); } SetCommandExitStatus(error); }]; @@ -44848,22 +42751,22 @@ class ReadOperationalStateAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeWindowCoveringType() + : SubscribeAttribute("type") { } - ~SubscribeAttributeOperationalStateAcceptedCommandList() {} + ~SubscribeAttributeWindowCoveringType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44874,12 +42777,12 @@ class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.Type response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44888,29 +42791,29 @@ class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAt }; /* - * Attribute EventList + * Attribute PhysicalClosedLimitLift */ -class ReadOperationalStateEventList : public ReadAttribute { +class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { public: - ReadOperationalStateEventList() - : ReadAttribute("event-list") + ReadWindowCoveringPhysicalClosedLimitLift() + : ReadAttribute("physical-closed-limit-lift") { } - ~ReadOperationalStateEventList() {} + ~ReadWindowCoveringPhysicalClosedLimitLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); if (error != nil) { - LogNSError("OperationalState EventList read Error", error); + LogNSError("WindowCovering PhysicalClosedLimitLift read Error", error); } SetCommandExitStatus(error); }]; @@ -44918,22 +42821,22 @@ class ReadOperationalStateEventList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() + : SubscribeAttribute("physical-closed-limit-lift") { } - ~SubscribeAttributeOperationalStateEventList() {} + ~SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44944,12 +42847,12 @@ class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePhysicalClosedLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44958,29 +42861,29 @@ class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { }; /* - * Attribute AttributeList + * Attribute PhysicalClosedLimitTilt */ -class ReadOperationalStateAttributeList : public ReadAttribute { +class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { public: - ReadOperationalStateAttributeList() - : ReadAttribute("attribute-list") + ReadWindowCoveringPhysicalClosedLimitTilt() + : ReadAttribute("physical-closed-limit-tilt") { } - ~ReadOperationalStateAttributeList() {} + ~ReadWindowCoveringPhysicalClosedLimitTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); if (error != nil) { - LogNSError("OperationalState AttributeList read Error", error); + LogNSError("WindowCovering PhysicalClosedLimitTilt read Error", error); } SetCommandExitStatus(error); }]; @@ -44988,22 +42891,22 @@ class ReadOperationalStateAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() + : SubscribeAttribute("physical-closed-limit-tilt") { } - ~SubscribeAttributeOperationalStateAttributeList() {} + ~SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45014,12 +42917,12 @@ class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePhysicalClosedLimitTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45028,29 +42931,29 @@ class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribut }; /* - * Attribute FeatureMap + * Attribute CurrentPositionLift */ -class ReadOperationalStateFeatureMap : public ReadAttribute { +class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { public: - ReadOperationalStateFeatureMap() - : ReadAttribute("feature-map") + ReadWindowCoveringCurrentPositionLift() + : ReadAttribute("current-position-lift") { } - ~ReadOperationalStateFeatureMap() {} + ~ReadWindowCoveringCurrentPositionLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); if (error != nil) { - LogNSError("OperationalState FeatureMap read Error", error); + LogNSError("WindowCovering CurrentPositionLift read Error", error); } SetCommandExitStatus(error); }]; @@ -45058,22 +42961,22 @@ class ReadOperationalStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeWindowCoveringCurrentPositionLift() + : SubscribeAttribute("current-position-lift") { } - ~SubscribeAttributeOperationalStateFeatureMap() {} + ~SubscribeAttributeWindowCoveringCurrentPositionLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45084,12 +42987,12 @@ class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeCurrentPositionLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.FeatureMap response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45098,29 +43001,29 @@ class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute CurrentPositionTilt */ -class ReadOperationalStateClusterRevision : public ReadAttribute { +class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { public: - ReadOperationalStateClusterRevision() - : ReadAttribute("cluster-revision") + ReadWindowCoveringCurrentPositionTilt() + : ReadAttribute("current-position-tilt") { } - ~ReadOperationalStateClusterRevision() {} + ~ReadWindowCoveringCurrentPositionTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); if (error != nil) { - LogNSError("OperationalState ClusterRevision read Error", error); + LogNSError("WindowCovering CurrentPositionTilt read Error", error); } SetCommandExitStatus(error); }]; @@ -45128,22 +43031,22 @@ class ReadOperationalStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeWindowCoveringCurrentPositionTilt() + : SubscribeAttribute("current-position-tilt") { } - ~SubscribeAttributeOperationalStateClusterRevision() {} + ~SubscribeAttributeWindowCoveringCurrentPositionTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45154,12 +43057,12 @@ class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeCurrentPositionTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.ClusterRevision response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45167,94 +43070,30 @@ class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttrib } }; -/*----------------------------------------------------------------------------*\ -| Cluster HepaFilterMonitoring | 0x0071 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetCondition | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command ResetCondition - */ -class HepaFilterMonitoringResetCondition : public ClusterCommand { -public: - HepaFilterMonitoringResetCondition() - : ClusterCommand("reset-condition") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRHEPAFilterMonitoringClusterResetConditionParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resetConditionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - /* - * Attribute Condition + * Attribute NumberOfActuationsLift */ -class ReadHepaFilterMonitoringCondition : public ReadAttribute { +class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { public: - ReadHepaFilterMonitoringCondition() - : ReadAttribute("condition") + ReadWindowCoveringNumberOfActuationsLift() + : ReadAttribute("number-of-actuations-lift") { } - ~ReadHepaFilterMonitoringCondition() {} + ~ReadWindowCoveringNumberOfActuationsLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.Condition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); if (error != nil) { - LogNSError("HEPAFilterMonitoring Condition read Error", error); + LogNSError("WindowCovering NumberOfActuationsLift read Error", error); } SetCommandExitStatus(error); }]; @@ -45262,22 +43101,22 @@ class ReadHepaFilterMonitoringCondition : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringCondition() - : SubscribeAttribute("condition") + SubscribeAttributeWindowCoveringNumberOfActuationsLift() + : SubscribeAttribute("number-of-actuations-lift") { } - ~SubscribeAttributeHepaFilterMonitoringCondition() {} + ~SubscribeAttributeWindowCoveringNumberOfActuationsLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45288,12 +43127,12 @@ class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeConditionWithParams:params + [cluster subscribeAttributeNumberOfActuationsLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.Condition response %@", [value description]); + NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45302,29 +43141,29 @@ class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribut }; /* - * Attribute DegradationDirection + * Attribute NumberOfActuationsTilt */ -class ReadHepaFilterMonitoringDegradationDirection : public ReadAttribute { +class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { public: - ReadHepaFilterMonitoringDegradationDirection() - : ReadAttribute("degradation-direction") + ReadWindowCoveringNumberOfActuationsTilt() + : ReadAttribute("number-of-actuations-tilt") { } - ~ReadHepaFilterMonitoringDegradationDirection() {} + ~ReadWindowCoveringNumberOfActuationsTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.DegradationDirection response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); if (error != nil) { - LogNSError("HEPAFilterMonitoring DegradationDirection read Error", error); + LogNSError("WindowCovering NumberOfActuationsTilt read Error", error); } SetCommandExitStatus(error); }]; @@ -45332,22 +43171,22 @@ class ReadHepaFilterMonitoringDegradationDirection : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringDegradationDirection() - : SubscribeAttribute("degradation-direction") + SubscribeAttributeWindowCoveringNumberOfActuationsTilt() + : SubscribeAttribute("number-of-actuations-tilt") { } - ~SubscribeAttributeHepaFilterMonitoringDegradationDirection() {} + ~SubscribeAttributeWindowCoveringNumberOfActuationsTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45358,12 +43197,12 @@ class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDegradationDirectionWithParams:params + [cluster subscribeAttributeNumberOfActuationsTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.DegradationDirection response %@", [value description]); + NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45372,29 +43211,29 @@ class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public Subscr }; /* - * Attribute ChangeIndication + * Attribute ConfigStatus */ -class ReadHepaFilterMonitoringChangeIndication : public ReadAttribute { +class ReadWindowCoveringConfigStatus : public ReadAttribute { public: - ReadHepaFilterMonitoringChangeIndication() - : ReadAttribute("change-indication") + ReadWindowCoveringConfigStatus() + : ReadAttribute("config-status") { } - ~ReadHepaFilterMonitoringChangeIndication() {} + ~ReadWindowCoveringConfigStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ChangeIndication response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); if (error != nil) { - LogNSError("HEPAFilterMonitoring ChangeIndication read Error", error); + LogNSError("WindowCovering ConfigStatus read Error", error); } SetCommandExitStatus(error); }]; @@ -45402,22 +43241,22 @@ class ReadHepaFilterMonitoringChangeIndication : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringChangeIndication() - : SubscribeAttribute("change-indication") + SubscribeAttributeWindowCoveringConfigStatus() + : SubscribeAttribute("config-status") { } - ~SubscribeAttributeHepaFilterMonitoringChangeIndication() {} + ~SubscribeAttributeWindowCoveringConfigStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45428,12 +43267,12 @@ class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChangeIndicationWithParams:params + [cluster subscribeAttributeConfigStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ChangeIndication response %@", [value description]); + NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45442,29 +43281,29 @@ class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeA }; /* - * Attribute InPlaceIndicator + * Attribute CurrentPositionLiftPercentage */ -class ReadHepaFilterMonitoringInPlaceIndicator : public ReadAttribute { +class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { public: - ReadHepaFilterMonitoringInPlaceIndicator() - : ReadAttribute("in-place-indicator") + ReadWindowCoveringCurrentPositionLiftPercentage() + : ReadAttribute("current-position-lift-percentage") { } - ~ReadHepaFilterMonitoringInPlaceIndicator() {} + ~ReadWindowCoveringCurrentPositionLiftPercentage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.InPlaceIndicator response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); if (error != nil) { - LogNSError("HEPAFilterMonitoring InPlaceIndicator read Error", error); + LogNSError("WindowCovering CurrentPositionLiftPercentage read Error", error); } SetCommandExitStatus(error); }]; @@ -45472,22 +43311,22 @@ class ReadHepaFilterMonitoringInPlaceIndicator : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringInPlaceIndicator() - : SubscribeAttribute("in-place-indicator") + SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() + : SubscribeAttribute("current-position-lift-percentage") { } - ~SubscribeAttributeHepaFilterMonitoringInPlaceIndicator() {} + ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45498,12 +43337,12 @@ class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInPlaceIndicatorWithParams:params + [cluster subscribeAttributeCurrentPositionLiftPercentageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.InPlaceIndicator response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45512,29 +43351,29 @@ class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeA }; /* - * Attribute GeneratedCommandList + * Attribute CurrentPositionTiltPercentage */ -class ReadHepaFilterMonitoringGeneratedCommandList : public ReadAttribute { +class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { public: - ReadHepaFilterMonitoringGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadWindowCoveringCurrentPositionTiltPercentage() + : ReadAttribute("current-position-tilt-percentage") { } - ~ReadHepaFilterMonitoringGeneratedCommandList() {} + ~ReadWindowCoveringCurrentPositionTiltPercentage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); if (error != nil) { - LogNSError("HEPAFilterMonitoring GeneratedCommandList read Error", error); + LogNSError("WindowCovering CurrentPositionTiltPercentage read Error", error); } SetCommandExitStatus(error); }]; @@ -45542,22 +43381,22 @@ class ReadHepaFilterMonitoringGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() + : SubscribeAttribute("current-position-tilt-percentage") { } - ~SubscribeAttributeHepaFilterMonitoringGeneratedCommandList() {} + ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45568,12 +43407,12 @@ class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeCurrentPositionTiltPercentageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45582,29 +43421,29 @@ class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public Subscr }; /* - * Attribute AcceptedCommandList + * Attribute OperationalStatus */ -class ReadHepaFilterMonitoringAcceptedCommandList : public ReadAttribute { +class ReadWindowCoveringOperationalStatus : public ReadAttribute { public: - ReadHepaFilterMonitoringAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadWindowCoveringOperationalStatus() + : ReadAttribute("operational-status") { } - ~ReadHepaFilterMonitoringAcceptedCommandList() {} + ~ReadWindowCoveringOperationalStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); if (error != nil) { - LogNSError("HEPAFilterMonitoring AcceptedCommandList read Error", error); + LogNSError("WindowCovering OperationalStatus read Error", error); } SetCommandExitStatus(error); }]; @@ -45612,22 +43451,22 @@ class ReadHepaFilterMonitoringAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeWindowCoveringOperationalStatus() + : SubscribeAttribute("operational-status") { } - ~SubscribeAttributeHepaFilterMonitoringAcceptedCommandList() {} + ~SubscribeAttributeWindowCoveringOperationalStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45638,12 +43477,12 @@ class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeOperationalStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45652,52 +43491,53 @@ class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public Subscri }; /* - * Attribute EventList + * Attribute TargetPositionLiftPercent100ths */ -class ReadHepaFilterMonitoringEventList : public ReadAttribute { +class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { public: - ReadHepaFilterMonitoringEventList() - : ReadAttribute("event-list") + ReadWindowCoveringTargetPositionLiftPercent100ths() + : ReadAttribute("target-position-lift-percent100ths") { } - ~ReadHepaFilterMonitoringEventList() {} + ~ReadWindowCoveringTargetPositionLiftPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.EventList response %@", [value description]); - if (error != nil) { - LogNSError("HEPAFilterMonitoring EventList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering TargetPositionLiftPercent100ths read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() + : SubscribeAttribute("target-position-lift-percent100ths") { } - ~SubscribeAttributeHepaFilterMonitoringEventList() {} + ~SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45708,12 +43548,12 @@ class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeTargetPositionLiftPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45722,52 +43562,53 @@ class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribut }; /* - * Attribute AttributeList + * Attribute TargetPositionTiltPercent100ths */ -class ReadHepaFilterMonitoringAttributeList : public ReadAttribute { +class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { public: - ReadHepaFilterMonitoringAttributeList() - : ReadAttribute("attribute-list") + ReadWindowCoveringTargetPositionTiltPercent100ths() + : ReadAttribute("target-position-tilt-percent100ths") { } - ~ReadHepaFilterMonitoringAttributeList() {} + ~ReadWindowCoveringTargetPositionTiltPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("HEPAFilterMonitoring AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering TargetPositionTiltPercent100ths read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() + : SubscribeAttribute("target-position-tilt-percent100ths") { } - ~SubscribeAttributeHepaFilterMonitoringAttributeList() {} + ~SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45778,12 +43619,12 @@ class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeTargetPositionTiltPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45792,29 +43633,29 @@ class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttr }; /* - * Attribute FeatureMap + * Attribute EndProductType */ -class ReadHepaFilterMonitoringFeatureMap : public ReadAttribute { +class ReadWindowCoveringEndProductType : public ReadAttribute { public: - ReadHepaFilterMonitoringFeatureMap() - : ReadAttribute("feature-map") + ReadWindowCoveringEndProductType() + : ReadAttribute("end-product-type") { } - ~ReadHepaFilterMonitoringFeatureMap() {} + ~ReadWindowCoveringEndProductType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.EndProductType response %@", [value description]); if (error != nil) { - LogNSError("HEPAFilterMonitoring FeatureMap read Error", error); + LogNSError("WindowCovering EndProductType read Error", error); } SetCommandExitStatus(error); }]; @@ -45822,22 +43663,22 @@ class ReadHepaFilterMonitoringFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeWindowCoveringEndProductType() + : SubscribeAttribute("end-product-type") { } - ~SubscribeAttributeHepaFilterMonitoringFeatureMap() {} + ~SubscribeAttributeWindowCoveringEndProductType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45848,12 +43689,12 @@ class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeEndProductTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.FeatureMap response %@", [value description]); + NSLog(@"WindowCovering.EndProductType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45862,52 +43703,53 @@ class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribu }; /* - * Attribute ClusterRevision + * Attribute CurrentPositionLiftPercent100ths */ -class ReadHepaFilterMonitoringClusterRevision : public ReadAttribute { +class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute { public: - ReadHepaFilterMonitoringClusterRevision() - : ReadAttribute("cluster-revision") + ReadWindowCoveringCurrentPositionLiftPercent100ths() + : ReadAttribute("current-position-lift-percent100ths") { } - ~ReadHepaFilterMonitoringClusterRevision() {} + ~ReadWindowCoveringCurrentPositionLiftPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("HEPAFilterMonitoring ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering CurrentPositionLiftPercent100ths read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() + : SubscribeAttribute("current-position-lift-percent100ths") { } - ~SubscribeAttributeHepaFilterMonitoringClusterRevision() {} + ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45918,12 +43760,12 @@ class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeCurrentPositionLiftPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ClusterRevision response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45931,117 +43773,54 @@ class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAt } }; -/*----------------------------------------------------------------------------*\ -| Cluster ActivatedCarbonFilterMonitoring | 0x0072 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetCondition | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command ResetCondition - */ -class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand { -public: - ActivatedCarbonFilterMonitoringResetCondition() - : ClusterCommand("reset-condition") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRActivatedCarbonFilterMonitoringClusterResetConditionParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resetConditionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - /* - * Attribute Condition + * Attribute CurrentPositionTiltPercent100ths */ -class ReadActivatedCarbonFilterMonitoringCondition : public ReadAttribute { +class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringCondition() - : ReadAttribute("condition") + ReadWindowCoveringCurrentPositionTiltPercent100ths() + : ReadAttribute("current-position-tilt-percent100ths") { } - ~ReadActivatedCarbonFilterMonitoringCondition() {} + ~ReadWindowCoveringCurrentPositionTiltPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.Condition response %@", [value description]); - if (error != nil) { - LogNSError("ActivatedCarbonFilterMonitoring Condition read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering CurrentPositionTiltPercent100ths read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringCondition() - : SubscribeAttribute("condition") + SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() + : SubscribeAttribute("current-position-tilt-percent100ths") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringCondition() {} + ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46052,12 +43831,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeConditionWithParams:params + [cluster subscribeAttributeCurrentPositionTiltPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.Condition response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46066,29 +43845,29 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public Subscr }; /* - * Attribute DegradationDirection + * Attribute InstalledOpenLimitLift */ -class ReadActivatedCarbonFilterMonitoringDegradationDirection : public ReadAttribute { +class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringDegradationDirection() - : ReadAttribute("degradation-direction") + ReadWindowCoveringInstalledOpenLimitLift() + : ReadAttribute("installed-open-limit-lift") { } - ~ReadActivatedCarbonFilterMonitoringDegradationDirection() {} + ~ReadWindowCoveringInstalledOpenLimitLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); if (error != nil) { - LogNSError("ActivatedCarbonFilterMonitoring DegradationDirection read Error", error); + LogNSError("WindowCovering InstalledOpenLimitLift read Error", error); } SetCommandExitStatus(error); }]; @@ -46096,22 +43875,22 @@ class ReadActivatedCarbonFilterMonitoringDegradationDirection : public ReadAttri } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection() - : SubscribeAttribute("degradation-direction") + SubscribeAttributeWindowCoveringInstalledOpenLimitLift() + : SubscribeAttribute("installed-open-limit-lift") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection() {} + ~SubscribeAttributeWindowCoveringInstalledOpenLimitLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46122,12 +43901,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDegradationDirectionWithParams:params + [cluster subscribeAttributeInstalledOpenLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection response %@", [value description]); + NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46136,29 +43915,29 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : pu }; /* - * Attribute ChangeIndication + * Attribute InstalledClosedLimitLift */ -class ReadActivatedCarbonFilterMonitoringChangeIndication : public ReadAttribute { +class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringChangeIndication() - : ReadAttribute("change-indication") + ReadWindowCoveringInstalledClosedLimitLift() + : ReadAttribute("installed-closed-limit-lift") { } - ~ReadActivatedCarbonFilterMonitoringChangeIndication() {} + ~ReadWindowCoveringInstalledClosedLimitLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); if (error != nil) { - LogNSError("ActivatedCarbonFilterMonitoring ChangeIndication read Error", error); + LogNSError("WindowCovering InstalledClosedLimitLift read Error", error); } SetCommandExitStatus(error); }]; @@ -46166,22 +43945,22 @@ class ReadActivatedCarbonFilterMonitoringChangeIndication : public ReadAttribute } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication() - : SubscribeAttribute("change-indication") + SubscribeAttributeWindowCoveringInstalledClosedLimitLift() + : SubscribeAttribute("installed-closed-limit-lift") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication() {} + ~SubscribeAttributeWindowCoveringInstalledClosedLimitLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46192,12 +43971,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChangeIndicationWithParams:params + [cluster subscribeAttributeInstalledClosedLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication response %@", [value description]); + NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46206,29 +43985,29 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public }; /* - * Attribute InPlaceIndicator + * Attribute InstalledOpenLimitTilt */ -class ReadActivatedCarbonFilterMonitoringInPlaceIndicator : public ReadAttribute { +class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringInPlaceIndicator() - : ReadAttribute("in-place-indicator") + ReadWindowCoveringInstalledOpenLimitTilt() + : ReadAttribute("installed-open-limit-tilt") { } - ~ReadActivatedCarbonFilterMonitoringInPlaceIndicator() {} + ~ReadWindowCoveringInstalledOpenLimitTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); if (error != nil) { - LogNSError("ActivatedCarbonFilterMonitoring InPlaceIndicator read Error", error); + LogNSError("WindowCovering InstalledOpenLimitTilt read Error", error); } SetCommandExitStatus(error); }]; @@ -46236,22 +44015,22 @@ class ReadActivatedCarbonFilterMonitoringInPlaceIndicator : public ReadAttribute } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator() - : SubscribeAttribute("in-place-indicator") + SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() + : SubscribeAttribute("installed-open-limit-tilt") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator() {} + ~SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46262,12 +44041,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInPlaceIndicatorWithParams:params + [cluster subscribeAttributeInstalledOpenLimitTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator response %@", [value description]); + NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46276,29 +44055,29 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public }; /* - * Attribute GeneratedCommandList + * Attribute InstalledClosedLimitTilt */ -class ReadActivatedCarbonFilterMonitoringGeneratedCommandList : public ReadAttribute { +class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadWindowCoveringInstalledClosedLimitTilt() + : ReadAttribute("installed-closed-limit-tilt") { } - ~ReadActivatedCarbonFilterMonitoringGeneratedCommandList() {} + ~ReadWindowCoveringInstalledClosedLimitTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); if (error != nil) { - LogNSError("ActivatedCarbonFilterMonitoring GeneratedCommandList read Error", error); + LogNSError("WindowCovering InstalledClosedLimitTilt read Error", error); } SetCommandExitStatus(error); }]; @@ -46306,22 +44085,22 @@ class ReadActivatedCarbonFilterMonitoringGeneratedCommandList : public ReadAttri } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() + : SubscribeAttribute("installed-closed-limit-tilt") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList() {} + ~SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46332,12 +44111,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeInstalledClosedLimitTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46346,29 +44125,29 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : pu }; /* - * Attribute AcceptedCommandList + * Attribute Mode */ -class ReadActivatedCarbonFilterMonitoringAcceptedCommandList : public ReadAttribute { +class ReadWindowCoveringMode : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadWindowCoveringMode() + : ReadAttribute("mode") { } - ~ReadActivatedCarbonFilterMonitoringAcceptedCommandList() {} + ~ReadWindowCoveringMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.Mode response %@", [value description]); if (error != nil) { - LogNSError("ActivatedCarbonFilterMonitoring AcceptedCommandList read Error", error); + LogNSError("WindowCovering Mode read Error", error); } SetCommandExitStatus(error); }]; @@ -46376,22 +44155,62 @@ class ReadActivatedCarbonFilterMonitoringAcceptedCommandList : public ReadAttrib } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : public SubscribeAttribute { +class WriteWindowCoveringMode : public WriteAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteWindowCoveringMode() + : WriteAttribute("mode") + { + AddArgument("attr-name", "mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteWindowCoveringMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) WriteAttribute (0x00000017) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("WindowCovering Mode write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { +public: + SubscribeAttributeWindowCoveringMode() + : SubscribeAttribute("mode") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList() {} + ~SubscribeAttributeWindowCoveringMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46402,12 +44221,152 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeModeWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.Mode response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SafetyStatus + */ +class ReadWindowCoveringSafetyStatus : public ReadAttribute { +public: + ReadWindowCoveringSafetyStatus() + : ReadAttribute("safety-status") + { + } + + ~ReadWindowCoveringSafetyStatus() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering SafetyStatus read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { +public: + SubscribeAttributeWindowCoveringSafetyStatus() + : SubscribeAttribute("safety-status") + { + } + + ~SubscribeAttributeWindowCoveringSafetyStatus() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSafetyStatusWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { +public: + ReadWindowCoveringGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadWindowCoveringGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeWindowCoveringGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeWindowCoveringGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList response %@", [value description]); + NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46416,29 +44375,29 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : pub }; /* - * Attribute EventList + * Attribute AcceptedCommandList */ -class ReadActivatedCarbonFilterMonitoringEventList : public ReadAttribute { +class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringEventList() - : ReadAttribute("event-list") + ReadWindowCoveringAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadActivatedCarbonFilterMonitoringEventList() {} + ~ReadWindowCoveringAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ActivatedCarbonFilterMonitoring EventList read Error", error); + LogNSError("WindowCovering AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -46446,22 +44405,22 @@ class ReadActivatedCarbonFilterMonitoringEventList : public ReadAttribute { } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeWindowCoveringAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringEventList() {} + ~SubscribeAttributeWindowCoveringAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46472,12 +44431,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.EventList response %@", [value description]); + NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46488,27 +44447,27 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public Subscr /* * Attribute AttributeList */ -class ReadActivatedCarbonFilterMonitoringAttributeList : public ReadAttribute { +class ReadWindowCoveringAttributeList : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringAttributeList() + ReadWindowCoveringAttributeList() : ReadAttribute("attribute-list") { } - ~ReadActivatedCarbonFilterMonitoringAttributeList() {} + ~ReadWindowCoveringAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList response %@", [value description]); + NSLog(@"WindowCovering.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("ActivatedCarbonFilterMonitoring AttributeList read Error", error); + LogNSError("WindowCovering AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -46516,22 +44475,22 @@ class ReadActivatedCarbonFilterMonitoringAttributeList : public ReadAttribute { } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList() + SubscribeAttributeWindowCoveringAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList() {} + ~SubscribeAttributeWindowCoveringAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46547,7 +44506,7 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public Su mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList response %@", [value description]); + NSLog(@"WindowCovering.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46558,27 +44517,27 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public Su /* * Attribute FeatureMap */ -class ReadActivatedCarbonFilterMonitoringFeatureMap : public ReadAttribute { +class ReadWindowCoveringFeatureMap : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringFeatureMap() + ReadWindowCoveringFeatureMap() : ReadAttribute("feature-map") { } - ~ReadActivatedCarbonFilterMonitoringFeatureMap() {} + ~ReadWindowCoveringFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap response %@", [value description]); + NSLog(@"WindowCovering.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("ActivatedCarbonFilterMonitoring FeatureMap read Error", error); + LogNSError("WindowCovering FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -46586,22 +44545,22 @@ class ReadActivatedCarbonFilterMonitoringFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap() + SubscribeAttributeWindowCoveringFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap() {} + ~SubscribeAttributeWindowCoveringFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46617,7 +44576,7 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public Subsc mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap response %@", [value description]); + NSLog(@"WindowCovering.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46628,27 +44587,27 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public Subsc /* * Attribute ClusterRevision */ -class ReadActivatedCarbonFilterMonitoringClusterRevision : public ReadAttribute { +class ReadWindowCoveringClusterRevision : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringClusterRevision() + ReadWindowCoveringClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadActivatedCarbonFilterMonitoringClusterRevision() {} + ~ReadWindowCoveringClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision response %@", [value description]); + NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("ActivatedCarbonFilterMonitoring ClusterRevision read Error", error); + LogNSError("WindowCovering ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -46656,22 +44615,22 @@ class ReadActivatedCarbonFilterMonitoringClusterRevision : public ReadAttribute } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision() + SubscribeAttributeWindowCoveringClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision() {} + ~SubscribeAttributeWindowCoveringClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46687,7 +44646,7 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision response %@", [value description]); + NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46696,66 +44655,23 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public }; /*----------------------------------------------------------------------------*\ -| Cluster DoorLock | 0x0101 | +| Cluster BarrierControl | 0x0103 | |------------------------------------------------------------------------------| | Commands: | | -| * LockDoor | 0x00 | -| * UnlockDoor | 0x01 | -| * UnlockWithTimeout | 0x03 | -| * SetWeekDaySchedule | 0x0B | -| * GetWeekDaySchedule | 0x0C | -| * ClearWeekDaySchedule | 0x0D | -| * SetYearDaySchedule | 0x0E | -| * GetYearDaySchedule | 0x0F | -| * ClearYearDaySchedule | 0x10 | -| * SetHolidaySchedule | 0x11 | -| * GetHolidaySchedule | 0x12 | -| * ClearHolidaySchedule | 0x13 | -| * SetUser | 0x1A | -| * GetUser | 0x1B | -| * ClearUser | 0x1D | -| * SetCredential | 0x22 | -| * GetCredentialStatus | 0x24 | -| * ClearCredential | 0x26 | -| * UnboltDoor | 0x27 | +| * BarrierControlGoToPercent | 0x00 | +| * BarrierControlStop | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * LockState | 0x0000 | -| * LockType | 0x0001 | -| * ActuatorEnabled | 0x0002 | -| * DoorState | 0x0003 | -| * DoorOpenEvents | 0x0004 | -| * DoorClosedEvents | 0x0005 | -| * OpenPeriod | 0x0006 | -| * NumberOfTotalUsersSupported | 0x0011 | -| * NumberOfPINUsersSupported | 0x0012 | -| * NumberOfRFIDUsersSupported | 0x0013 | -| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | -| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | -| * NumberOfHolidaySchedulesSupported | 0x0016 | -| * MaxPINCodeLength | 0x0017 | -| * MinPINCodeLength | 0x0018 | -| * MaxRFIDCodeLength | 0x0019 | -| * MinRFIDCodeLength | 0x001A | -| * CredentialRulesSupport | 0x001B | -| * NumberOfCredentialsSupportedPerUser | 0x001C | -| * Language | 0x0021 | -| * LEDSettings | 0x0022 | -| * AutoRelockTime | 0x0023 | -| * SoundVolume | 0x0024 | -| * OperatingMode | 0x0025 | -| * SupportedOperatingModes | 0x0026 | -| * DefaultConfigurationRegister | 0x0027 | -| * EnableLocalProgramming | 0x0028 | -| * EnableOneTouchLocking | 0x0029 | -| * EnableInsideStatusLED | 0x002A | -| * EnablePrivacyModeButton | 0x002B | -| * LocalProgrammingFeatures | 0x002C | -| * WrongCodeEntryLimit | 0x0030 | -| * UserCodeTemporaryDisableTime | 0x0031 | -| * SendPINOverTheAir | 0x0032 | -| * RequirePINforRemoteOperation | 0x0033 | -| * ExpiringUserTimeout | 0x0035 | +| * BarrierMovingState | 0x0001 | +| * BarrierSafetyStatus | 0x0002 | +| * BarrierCapabilities | 0x0003 | +| * BarrierOpenEvents | 0x0004 | +| * BarrierCloseEvents | 0x0005 | +| * BarrierCommandOpenEvents | 0x0006 | +| * BarrierCommandCloseEvents | 0x0007 | +| * BarrierOpenPeriod | 0x0008 | +| * BarrierClosePeriod | 0x0009 | +| * BarrierPosition | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -46764,22247 +44680,441 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * DoorLockAlarm | 0x0000 | -| * DoorStateChange | 0x0001 | -| * LockOperation | 0x0002 | -| * LockOperationError | 0x0003 | -| * LockUserChange | 0x0004 | \*----------------------------------------------------------------------------*/ /* - * Command LockDoor + * Command BarrierControlGoToPercent */ -class DoorLockLockDoor : public ClusterCommand { +class BarrierControlBarrierControlGoToPercent : public ClusterCommand { public: - DoorLockLockDoor() - : ClusterCommand("lock-door") + BarrierControlBarrierControlGoToPercent() + : ClusterCommand("barrier-control-go-to-percent") { - AddArgument("PINCode", &mRequest.PINCode); + AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; - } + params.percentOpen = [NSNumber numberWithUnsignedChar:mRequest.percentOpen]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster lockDoorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster barrierControlGoToPercentWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::DoorLock::Commands::LockDoor::Type mRequest; + chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; }; /* - * Command UnlockDoor + * Command BarrierControlStop */ -class DoorLockUnlockDoor : public ClusterCommand { +class BarrierControlBarrierControlStop : public ClusterCommand { public: - DoorLockUnlockDoor() - : ClusterCommand("unlock-door") + BarrierControlBarrierControlStop() + : ClusterCommand("barrier-control-stop") { - AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; - } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster barrierControlStopWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type mRequest; }; /* - * Command UnlockWithTimeout + * Attribute BarrierMovingState */ -class DoorLockUnlockWithTimeout : public ClusterCommand { +class ReadBarrierControlBarrierMovingState : public ReadAttribute { public: - DoorLockUnlockWithTimeout() - : ClusterCommand("unlock-with-timeout") + ReadBarrierControlBarrierMovingState() + : ReadAttribute("barrier-moving-state") { - AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); - AddArgument("PINCode", &mRequest.PINCode); - ClusterCommand::AddArguments(); } + ~ReadBarrierControlBarrierMovingState() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.timeout = [NSNumber numberWithUnsignedShort:mRequest.timeout]; - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster unlockWithTimeoutWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierMovingStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); + if (error != nil) { + LogNSError("BarrierControl BarrierMovingState read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type mRequest; }; -/* - * Command SetWeekDaySchedule - */ -class DoorLockSetWeekDaySchedule : public ClusterCommand { +class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttribute { public: - DoorLockSetWeekDaySchedule() - : ClusterCommand("set-week-day-schedule") + SubscribeAttributeBarrierControlBarrierMovingState() + : SubscribeAttribute("barrier-moving-state") { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); - AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); - AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); - AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); - AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeBarrierControlBarrierMovingState() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - params.daysMask = [NSNumber numberWithUnsignedChar:mRequest.daysMask.Raw()]; - params.startHour = [NSNumber numberWithUnsignedChar:mRequest.startHour]; - params.startMinute = [NSNumber numberWithUnsignedChar:mRequest.startMinute]; - params.endHour = [NSNumber numberWithUnsignedChar:mRequest.endHour]; - params.endMinute = [NSNumber numberWithUnsignedChar:mRequest.endMinute]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl 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 subscribeAttributeBarrierMovingStateWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; }; /* - * Command GetWeekDaySchedule + * Attribute BarrierSafetyStatus */ -class DoorLockGetWeekDaySchedule : public ClusterCommand { +class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { public: - DoorLockGetWeekDaySchedule() - : ClusterCommand("get-week-day-schedule") + ReadBarrierControlBarrierSafetyStatus() + : ReadAttribute("barrier-safety-status") { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } + ~ReadBarrierControlBarrierSafetyStatus() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); + if (error != nil) { + LogNSError("BarrierControl BarrierSafetyStatus read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; }; -/* - * Command ClearWeekDaySchedule - */ -class DoorLockClearWeekDaySchedule : public ClusterCommand { +class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttribute { public: - DoorLockClearWeekDaySchedule() - : ClusterCommand("clear-week-day-schedule") + SubscribeAttributeBarrierControlBarrierSafetyStatus() + : SubscribeAttribute("barrier-safety-status") { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeBarrierControlBarrierSafetyStatus() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl 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 subscribeAttributeBarrierSafetyStatusWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; }; /* - * Command SetYearDaySchedule + * Attribute BarrierCapabilities */ -class DoorLockSetYearDaySchedule : public ClusterCommand { +class ReadBarrierControlBarrierCapabilities : public ReadAttribute { public: - DoorLockSetYearDaySchedule() - : ClusterCommand("set-year-day-schedule") + ReadBarrierControlBarrierCapabilities() + : ReadAttribute("barrier-capabilities") { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); - ClusterCommand::AddArguments(); } + ~ReadBarrierControlBarrierCapabilities() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; - params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setYearDayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); + if (error != nil) { + LogNSError("BarrierControl BarrierCapabilities read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type mRequest; }; -/* - * Command GetYearDaySchedule - */ -class DoorLockGetYearDaySchedule : public ClusterCommand { +class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttribute { public: - DoorLockGetYearDaySchedule() - : ClusterCommand("get-year-day-schedule") + SubscribeAttributeBarrierControlBarrierCapabilities() + : SubscribeAttribute("barrier-capabilities") { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeBarrierControlBarrierCapabilities() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl 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 subscribeAttributeBarrierCapabilitiesWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; }; /* - * Command ClearYearDaySchedule + * Attribute BarrierOpenEvents */ -class DoorLockClearYearDaySchedule : public ClusterCommand { +class ReadBarrierControlBarrierOpenEvents : public ReadAttribute { public: - DoorLockClearYearDaySchedule() - : ClusterCommand("clear-year-day-schedule") + ReadBarrierControlBarrierOpenEvents() + : ReadAttribute("barrier-open-events") { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } + ~ReadBarrierControlBarrierOpenEvents() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearYearDayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); + if (error != nil) { + LogNSError("BarrierControl BarrierOpenEvents read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; }; -/* - * Command SetHolidaySchedule - */ -class DoorLockSetHolidaySchedule : public ClusterCommand { +class WriteBarrierControlBarrierOpenEvents : public WriteAttribute { public: - DoorLockSetHolidaySchedule() - : ClusterCommand("set-holiday-schedule") + WriteBarrierControlBarrierOpenEvents() + : WriteAttribute("barrier-open-events") { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); - AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); - ClusterCommand::AddArguments(); + AddArgument("attr-name", "barrier-open-events"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } + ~WriteBarrierControlBarrierOpenEvents() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; - params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; - params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; - params.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operatingMode)]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setHolidayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeBarrierOpenEventsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierOpenEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type mRequest; + uint16_t mValue; }; -/* - * Command GetHolidaySchedule - */ -class DoorLockGetHolidaySchedule : public ClusterCommand { +class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttribute { public: - DoorLockGetHolidaySchedule() - : ClusterCommand("get-holiday-schedule") + SubscribeAttributeBarrierControlBarrierOpenEvents() + : SubscribeAttribute("barrier-open-events") { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeBarrierControlBarrierOpenEvents() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl 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 subscribeAttributeBarrierOpenEventsWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; }; /* - * Command ClearHolidaySchedule + * Attribute BarrierCloseEvents */ -class DoorLockClearHolidaySchedule : public ClusterCommand { +class ReadBarrierControlBarrierCloseEvents : public ReadAttribute { public: - DoorLockClearHolidaySchedule() - : ClusterCommand("clear-holiday-schedule") + ReadBarrierControlBarrierCloseEvents() + : ReadAttribute("barrier-close-events") { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - ClusterCommand::AddArguments(); } + ~ReadBarrierControlBarrierCloseEvents() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearHolidayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; -}; - -/* - * Command SetUser - */ -class DoorLockSetUser : public ClusterCommand { -public: - DoorLockSetUser() - : ClusterCommand("set-user") - { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserName", &mRequest.userName); - AddArgument("UserUniqueID", 0, UINT32_MAX, &mRequest.userUniqueID); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); - AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - if (mRequest.userName.IsNull()) { - params.userName = nil; - } else { - params.userName = [[NSString alloc] initWithBytes:mRequest.userName.Value().data() - length:mRequest.userName.Value().size() - encoding:NSUTF8StringEncoding]; - } - if (mRequest.userUniqueID.IsNull()) { - params.userUniqueID = nil; - } else { - params.userUniqueID = [NSNumber numberWithUnsignedInt:mRequest.userUniqueID.Value()]; - } - if (mRequest.userStatus.IsNull()) { - params.userStatus = nil; - } else { - params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; - } - if (mRequest.userType.IsNull()) { - params.userType = nil; - } else { - params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; - } - if (mRequest.credentialRule.IsNull()) { - params.credentialRule = nil; - } else { - params.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credentialRule.Value())]; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setUserWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::DoorLock::Commands::SetUser::Type mRequest; -}; - -/* - * Command GetUser - */ -class DoorLockGetUser : public ClusterCommand { -public: - DoorLockGetUser() - : ClusterCommand("get-user") - { - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; -}; - -/* - * Command ClearUser - */ -class DoorLockClearUser : public ClusterCommand { -public: - DoorLockClearUser() - : ClusterCommand("clear-user") - { - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearUserWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::DoorLock::Commands::ClearUser::Type mRequest; -}; - -/* - * Command SetCredential - */ -class DoorLockSetCredential : public ClusterCommand { -public: - DoorLockSetCredential() - : ClusterCommand("set-credential") - , mComplex_Credential(&mRequest.credential) - { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); - AddArgument("Credential", &mComplex_Credential); - AddArgument("CredentialData", &mRequest.credentialData); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; - params.credential = [MTRDoorLockClusterCredentialStruct new]; - params.credential.credentialType = - [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; - params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; - params.credentialData = [NSData dataWithBytes:mRequest.credentialData.data() length:mRequest.credentialData.size()]; - if (mRequest.userIndex.IsNull()) { - params.userIndex = nil; - } else { - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex.Value()]; - } - if (mRequest.userStatus.IsNull()) { - params.userStatus = nil; - } else { - params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; - } - if (mRequest.userType.IsNull()) { - params.userType = nil; - } else { - params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setCredentialWithParams:params - completion:^( - MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; - TypedComplexArgument mComplex_Credential; -}; - -/* - * Command GetCredentialStatus - */ -class DoorLockGetCredentialStatus : public ClusterCommand { -public: - DoorLockGetCredentialStatus() - : ClusterCommand("get-credential-status") - , mComplex_Credential(&mRequest.credential) - { - AddArgument("Credential", &mComplex_Credential); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.credential = [MTRDoorLockClusterCredentialStruct new]; - params.credential.credentialType = - [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; - params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; - TypedComplexArgument mComplex_Credential; -}; - -/* - * Command ClearCredential - */ -class DoorLockClearCredential : public ClusterCommand { -public: - DoorLockClearCredential() - : ClusterCommand("clear-credential") - , mComplex_Credential(&mRequest.credential) - { - AddArgument("Credential", &mComplex_Credential); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.credential.IsNull()) { - params.credential = nil; - } else { - params.credential = [MTRDoorLockClusterCredentialStruct new]; - params.credential.credentialType = - [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.Value().credentialType)]; - params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.Value().credentialIndex]; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type mRequest; - TypedComplexArgument> - mComplex_Credential; -}; - -/* - * Command UnboltDoor - */ -class DoorLockUnboltDoor : public ClusterCommand { -public: - DoorLockUnboltDoor() - : ClusterCommand("unbolt-door") - { - AddArgument("PINCode", &mRequest.PINCode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000027) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster unboltDoorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type mRequest; -}; - -/* - * Attribute LockState - */ -class ReadDoorLockLockState : public ReadAttribute { -public: - ReadDoorLockLockState() - : ReadAttribute("lock-state") - { - } - - ~ReadDoorLockLockState() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockState response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock LockState read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockLockState() - : SubscribeAttribute("lock-state") - { - } - - ~SubscribeAttributeDoorLockLockState() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLockStateWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockState response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LockType - */ -class ReadDoorLockLockType : public ReadAttribute { -public: - ReadDoorLockLockType() - : ReadAttribute("lock-type") - { - } - - ~ReadDoorLockLockType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockType response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock LockType read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockLockType() - : SubscribeAttribute("lock-type") - { - } - - ~SubscribeAttributeDoorLockLockType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLockTypeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockType response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ActuatorEnabled - */ -class ReadDoorLockActuatorEnabled : public ReadAttribute { -public: - ReadDoorLockActuatorEnabled() - : ReadAttribute("actuator-enabled") - { - } - - ~ReadDoorLockActuatorEnabled() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock ActuatorEnabled read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockActuatorEnabled() - : SubscribeAttribute("actuator-enabled") - { - } - - ~SubscribeAttributeDoorLockActuatorEnabled() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeActuatorEnabledWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute DoorState - */ -class ReadDoorLockDoorState : public ReadAttribute { -public: - ReadDoorLockDoorState() - : ReadAttribute("door-state") - { - } - - ~ReadDoorLockDoorState() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorState response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock DoorState read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockDoorState() - : SubscribeAttribute("door-state") - { - } - - ~SubscribeAttributeDoorLockDoorState() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000003) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeDoorStateWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorState response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute DoorOpenEvents - */ -class ReadDoorLockDoorOpenEvents : public ReadAttribute { -public: - ReadDoorLockDoorOpenEvents() - : ReadAttribute("door-open-events") - { - } - - ~ReadDoorLockDoorOpenEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000004) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock DoorOpenEvents read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockDoorOpenEvents : public WriteAttribute { -public: - WriteDoorLockDoorOpenEvents() - : WriteAttribute("door-open-events") - { - AddArgument("attr-name", "door-open-events"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockDoorOpenEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000004) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeDoorOpenEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock DoorOpenEvents write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockDoorOpenEvents() - : SubscribeAttribute("door-open-events") - { - } - - ~SubscribeAttributeDoorLockDoorOpenEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000004) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeDoorOpenEventsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute DoorClosedEvents - */ -class ReadDoorLockDoorClosedEvents : public ReadAttribute { -public: - ReadDoorLockDoorClosedEvents() - : ReadAttribute("door-closed-events") - { - } - - ~ReadDoorLockDoorClosedEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000005) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock DoorClosedEvents read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockDoorClosedEvents : public WriteAttribute { -public: - WriteDoorLockDoorClosedEvents() - : WriteAttribute("door-closed-events") - { - AddArgument("attr-name", "door-closed-events"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockDoorClosedEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000005) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeDoorClosedEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock DoorClosedEvents write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockDoorClosedEvents() - : SubscribeAttribute("door-closed-events") - { - } - - ~SubscribeAttributeDoorLockDoorClosedEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000005) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeDoorClosedEventsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OpenPeriod - */ -class ReadDoorLockOpenPeriod : public ReadAttribute { -public: - ReadDoorLockOpenPeriod() - : ReadAttribute("open-period") - { - } - - ~ReadDoorLockOpenPeriod() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000006) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OpenPeriod response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock OpenPeriod read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockOpenPeriod : public WriteAttribute { -public: - WriteDoorLockOpenPeriod() - : WriteAttribute("open-period") - { - AddArgument("attr-name", "open-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockOpenPeriod() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000006) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeOpenPeriodWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock OpenPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockOpenPeriod() - : SubscribeAttribute("open-period") - { - } - - ~SubscribeAttributeDoorLockOpenPeriod() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000006) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOpenPeriodWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OpenPeriod response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfTotalUsersSupported - */ -class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { -public: - ReadDoorLockNumberOfTotalUsersSupported() - : ReadAttribute("number-of-total-users-supported") - { - } - - ~ReadDoorLockNumberOfTotalUsersSupported() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000011) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock NumberOfTotalUsersSupported read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockNumberOfTotalUsersSupported() - : SubscribeAttribute("number-of-total-users-supported") - { - } - - ~SubscribeAttributeDoorLockNumberOfTotalUsersSupported() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000011) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfTotalUsersSupportedWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfPINUsersSupported - */ -class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { -public: - ReadDoorLockNumberOfPINUsersSupported() - : ReadAttribute("number-of-pinusers-supported") - { - } - - ~ReadDoorLockNumberOfPINUsersSupported() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000012) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock NumberOfPINUsersSupported read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockNumberOfPINUsersSupported() - : SubscribeAttribute("number-of-pinusers-supported") - { - } - - ~SubscribeAttributeDoorLockNumberOfPINUsersSupported() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000012) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfPINUsersSupportedWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfRFIDUsersSupported - */ -class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { -public: - ReadDoorLockNumberOfRFIDUsersSupported() - : ReadAttribute("number-of-rfidusers-supported") - { - } - - ~ReadDoorLockNumberOfRFIDUsersSupported() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000013) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock NumberOfRFIDUsersSupported read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() - : SubscribeAttribute("number-of-rfidusers-supported") - { - } - - ~SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000013) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfRFIDUsersSupportedWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfWeekDaySchedulesSupportedPerUser - */ -class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribute { -public: - ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() - : ReadAttribute("number-of-week-day-schedules-supported-per-user") - { - } - - ~ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000014) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock NumberOfWeekDaySchedulesSupportedPerUser read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() - : SubscribeAttribute("number-of-week-day-schedules-supported-per-user") - { - } - - ~SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000014) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfYearDaySchedulesSupportedPerUser - */ -class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribute { -public: - ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() - : ReadAttribute("number-of-year-day-schedules-supported-per-user") - { - } - - ~ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000015) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock NumberOfYearDaySchedulesSupportedPerUser read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() - : SubscribeAttribute("number-of-year-day-schedules-supported-per-user") - { - } - - ~SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000015) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfHolidaySchedulesSupported - */ -class ReadDoorLockNumberOfHolidaySchedulesSupported : public ReadAttribute { -public: - ReadDoorLockNumberOfHolidaySchedulesSupported() - : ReadAttribute("number-of-holiday-schedules-supported") - { - } - - ~ReadDoorLockNumberOfHolidaySchedulesSupported() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000016) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock NumberOfHolidaySchedulesSupported read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() - : SubscribeAttribute("number-of-holiday-schedules-supported") - { - } - - ~SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000016) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxPINCodeLength - */ -class ReadDoorLockMaxPINCodeLength : public ReadAttribute { -public: - ReadDoorLockMaxPINCodeLength() - : ReadAttribute("max-pincode-length") - { - } - - ~ReadDoorLockMaxPINCodeLength() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000017) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock MaxPINCodeLength read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockMaxPINCodeLength() - : SubscribeAttribute("max-pincode-length") - { - } - - ~SubscribeAttributeDoorLockMaxPINCodeLength() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000017) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxPINCodeLengthWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinPINCodeLength - */ -class ReadDoorLockMinPINCodeLength : public ReadAttribute { -public: - ReadDoorLockMinPINCodeLength() - : ReadAttribute("min-pincode-length") - { - } - - ~ReadDoorLockMinPINCodeLength() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000018) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock MinPINCodeLength read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockMinPINCodeLength() - : SubscribeAttribute("min-pincode-length") - { - } - - ~SubscribeAttributeDoorLockMinPINCodeLength() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000018) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinPINCodeLengthWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxRFIDCodeLength - */ -class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { -public: - ReadDoorLockMaxRFIDCodeLength() - : ReadAttribute("max-rfidcode-length") - { - } - - ~ReadDoorLockMaxRFIDCodeLength() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000019) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock MaxRFIDCodeLength read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockMaxRFIDCodeLength() - : SubscribeAttribute("max-rfidcode-length") - { - } - - ~SubscribeAttributeDoorLockMaxRFIDCodeLength() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000019) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxRFIDCodeLengthWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinRFIDCodeLength - */ -class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { -public: - ReadDoorLockMinRFIDCodeLength() - : ReadAttribute("min-rfidcode-length") - { - } - - ~ReadDoorLockMinRFIDCodeLength() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock MinRFIDCodeLength read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockMinRFIDCodeLength() - : SubscribeAttribute("min-rfidcode-length") - { - } - - ~SubscribeAttributeDoorLockMinRFIDCodeLength() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinRFIDCodeLengthWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CredentialRulesSupport - */ -class ReadDoorLockCredentialRulesSupport : public ReadAttribute { -public: - ReadDoorLockCredentialRulesSupport() - : ReadAttribute("credential-rules-support") - { - } - - ~ReadDoorLockCredentialRulesSupport() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001B) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock CredentialRulesSupport read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockCredentialRulesSupport() - : SubscribeAttribute("credential-rules-support") - { - } - - ~SubscribeAttributeDoorLockCredentialRulesSupport() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001B) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCredentialRulesSupportWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfCredentialsSupportedPerUser - */ -class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { -public: - ReadDoorLockNumberOfCredentialsSupportedPerUser() - : ReadAttribute("number-of-credentials-supported-per-user") - { - } - - ~ReadDoorLockNumberOfCredentialsSupportedPerUser() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001C) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock NumberOfCredentialsSupportedPerUser read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() - : SubscribeAttribute("number-of-credentials-supported-per-user") - { - } - - ~SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001C) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Language - */ -class ReadDoorLockLanguage : public ReadAttribute { -public: - ReadDoorLockLanguage() - : ReadAttribute("language") - { - } - - ~ReadDoorLockLanguage() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000021) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.Language response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock Language read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockLanguage : public WriteAttribute { -public: - WriteDoorLockLanguage() - : WriteAttribute("language") - { - AddArgument("attr-name", "language"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLanguage() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000021) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() - length:mValue.size() - encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeLanguageWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock Language write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::ByteSpan mValue; -}; - -class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockLanguage() - : SubscribeAttribute("language") - { - } - - ~SubscribeAttributeDoorLockLanguage() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000021) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLanguageWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.Language response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LEDSettings - */ -class ReadDoorLockLEDSettings : public ReadAttribute { -public: - ReadDoorLockLEDSettings() - : ReadAttribute("ledsettings") - { - } - - ~ReadDoorLockLEDSettings() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000022) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LEDSettings response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock LEDSettings read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockLEDSettings : public WriteAttribute { -public: - WriteDoorLockLEDSettings() - : WriteAttribute("ledsettings") - { - AddArgument("attr-name", "ledsettings"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLEDSettings() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000022) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeLEDSettingsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock LEDSettings write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockLEDSettings() - : SubscribeAttribute("ledsettings") - { - } - - ~SubscribeAttributeDoorLockLEDSettings() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000022) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLEDSettingsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LEDSettings response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AutoRelockTime - */ -class ReadDoorLockAutoRelockTime : public ReadAttribute { -public: - ReadDoorLockAutoRelockTime() - : ReadAttribute("auto-relock-time") - { - } - - ~ReadDoorLockAutoRelockTime() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000023) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock AutoRelockTime read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockAutoRelockTime : public WriteAttribute { -public: - WriteDoorLockAutoRelockTime() - : WriteAttribute("auto-relock-time") - { - AddArgument("attr-name", "auto-relock-time"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockAutoRelockTime() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000023) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeAutoRelockTimeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock AutoRelockTime write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockAutoRelockTime() - : SubscribeAttribute("auto-relock-time") - { - } - - ~SubscribeAttributeDoorLockAutoRelockTime() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000023) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAutoRelockTimeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SoundVolume - */ -class ReadDoorLockSoundVolume : public ReadAttribute { -public: - ReadDoorLockSoundVolume() - : ReadAttribute("sound-volume") - { - } - - ~ReadDoorLockSoundVolume() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000024) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SoundVolume response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock SoundVolume read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockSoundVolume : public WriteAttribute { -public: - WriteDoorLockSoundVolume() - : WriteAttribute("sound-volume") - { - AddArgument("attr-name", "sound-volume"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockSoundVolume() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000024) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeSoundVolumeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock SoundVolume write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockSoundVolume() - : SubscribeAttribute("sound-volume") - { - } - - ~SubscribeAttributeDoorLockSoundVolume() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000024) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSoundVolumeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SoundVolume response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OperatingMode - */ -class ReadDoorLockOperatingMode : public ReadAttribute { -public: - ReadDoorLockOperatingMode() - : ReadAttribute("operating-mode") - { - } - - ~ReadDoorLockOperatingMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000025) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OperatingMode response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock OperatingMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockOperatingMode : public WriteAttribute { -public: - WriteDoorLockOperatingMode() - : WriteAttribute("operating-mode") - { - AddArgument("attr-name", "operating-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockOperatingMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000025) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOperatingModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock OperatingMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockOperatingMode() - : SubscribeAttribute("operating-mode") - { - } - - ~SubscribeAttributeDoorLockOperatingMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000025) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOperatingModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OperatingMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SupportedOperatingModes - */ -class ReadDoorLockSupportedOperatingModes : public ReadAttribute { -public: - ReadDoorLockSupportedOperatingModes() - : ReadAttribute("supported-operating-modes") - { - } - - ~ReadDoorLockSupportedOperatingModes() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000026) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedOperatingModesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock SupportedOperatingModes read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockSupportedOperatingModes() - : SubscribeAttribute("supported-operating-modes") - { - } - - ~SubscribeAttributeDoorLockSupportedOperatingModes() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000026) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSupportedOperatingModesWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute DefaultConfigurationRegister - */ -class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { -public: - ReadDoorLockDefaultConfigurationRegister() - : ReadAttribute("default-configuration-register") - { - } - - ~ReadDoorLockDefaultConfigurationRegister() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000027) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock DefaultConfigurationRegister read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockDefaultConfigurationRegister() - : SubscribeAttribute("default-configuration-register") - { - } - - ~SubscribeAttributeDoorLockDefaultConfigurationRegister() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000027) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeDefaultConfigurationRegisterWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EnableLocalProgramming - */ -class ReadDoorLockEnableLocalProgramming : public ReadAttribute { -public: - ReadDoorLockEnableLocalProgramming() - : ReadAttribute("enable-local-programming") - { - } - - ~ReadDoorLockEnableLocalProgramming() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000028) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock EnableLocalProgramming read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockEnableLocalProgramming : public WriteAttribute { -public: - WriteDoorLockEnableLocalProgramming() - : WriteAttribute("enable-local-programming") - { - AddArgument("attr-name", "enable-local-programming"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnableLocalProgramming() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000028) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnableLocalProgrammingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableLocalProgramming write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - bool mValue; -}; - -class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockEnableLocalProgramming() - : SubscribeAttribute("enable-local-programming") - { - } - - ~SubscribeAttributeDoorLockEnableLocalProgramming() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000028) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEnableLocalProgrammingWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EnableOneTouchLocking - */ -class ReadDoorLockEnableOneTouchLocking : public ReadAttribute { -public: - ReadDoorLockEnableOneTouchLocking() - : ReadAttribute("enable-one-touch-locking") - { - } - - ~ReadDoorLockEnableOneTouchLocking() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000029) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock EnableOneTouchLocking read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { -public: - WriteDoorLockEnableOneTouchLocking() - : WriteAttribute("enable-one-touch-locking") - { - AddArgument("attr-name", "enable-one-touch-locking"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnableOneTouchLocking() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000029) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnableOneTouchLockingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableOneTouchLocking write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - bool mValue; -}; - -class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockEnableOneTouchLocking() - : SubscribeAttribute("enable-one-touch-locking") - { - } - - ~SubscribeAttributeDoorLockEnableOneTouchLocking() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000029) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEnableOneTouchLockingWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EnableInsideStatusLED - */ -class ReadDoorLockEnableInsideStatusLED : public ReadAttribute { -public: - ReadDoorLockEnableInsideStatusLED() - : ReadAttribute("enable-inside-status-led") - { - } - - ~ReadDoorLockEnableInsideStatusLED() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock EnableInsideStatusLED read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { -public: - WriteDoorLockEnableInsideStatusLED() - : WriteAttribute("enable-inside-status-led") - { - AddArgument("attr-name", "enable-inside-status-led"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnableInsideStatusLED() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnableInsideStatusLEDWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableInsideStatusLED write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - bool mValue; -}; - -class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockEnableInsideStatusLED() - : SubscribeAttribute("enable-inside-status-led") - { - } - - ~SubscribeAttributeDoorLockEnableInsideStatusLED() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEnableInsideStatusLEDWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EnablePrivacyModeButton - */ -class ReadDoorLockEnablePrivacyModeButton : public ReadAttribute { -public: - ReadDoorLockEnablePrivacyModeButton() - : ReadAttribute("enable-privacy-mode-button") - { - } - - ~ReadDoorLockEnablePrivacyModeButton() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002B) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnablePrivacyModeButtonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock EnablePrivacyModeButton read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { -public: - WriteDoorLockEnablePrivacyModeButton() - : WriteAttribute("enable-privacy-mode-button") - { - AddArgument("attr-name", "enable-privacy-mode-button"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnablePrivacyModeButton() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002B) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnablePrivacyModeButtonWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnablePrivacyModeButton write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - bool mValue; -}; - -class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockEnablePrivacyModeButton() - : SubscribeAttribute("enable-privacy-mode-button") - { - } - - ~SubscribeAttributeDoorLockEnablePrivacyModeButton() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002B) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEnablePrivacyModeButtonWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LocalProgrammingFeatures - */ -class ReadDoorLockLocalProgrammingFeatures : public ReadAttribute { -public: - ReadDoorLockLocalProgrammingFeatures() - : ReadAttribute("local-programming-features") - { - } - - ~ReadDoorLockLocalProgrammingFeatures() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002C) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalProgrammingFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock LocalProgrammingFeatures read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { -public: - WriteDoorLockLocalProgrammingFeatures() - : WriteAttribute("local-programming-features") - { - AddArgument("attr-name", "local-programming-features"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLocalProgrammingFeatures() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002C) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeLocalProgrammingFeaturesWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock LocalProgrammingFeatures write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockLocalProgrammingFeatures() - : SubscribeAttribute("local-programming-features") - { - } - - ~SubscribeAttributeDoorLockLocalProgrammingFeatures() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002C) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLocalProgrammingFeaturesWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute WrongCodeEntryLimit - */ -class ReadDoorLockWrongCodeEntryLimit : public ReadAttribute { -public: - ReadDoorLockWrongCodeEntryLimit() - : ReadAttribute("wrong-code-entry-limit") - { - } - - ~ReadDoorLockWrongCodeEntryLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000030) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock WrongCodeEntryLimit read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { -public: - WriteDoorLockWrongCodeEntryLimit() - : WriteAttribute("wrong-code-entry-limit") - { - AddArgument("attr-name", "wrong-code-entry-limit"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockWrongCodeEntryLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000030) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeWrongCodeEntryLimitWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock WrongCodeEntryLimit write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockWrongCodeEntryLimit() - : SubscribeAttribute("wrong-code-entry-limit") - { - } - - ~SubscribeAttributeDoorLockWrongCodeEntryLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000030) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeWrongCodeEntryLimitWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute UserCodeTemporaryDisableTime - */ -class ReadDoorLockUserCodeTemporaryDisableTime : public ReadAttribute { -public: - ReadDoorLockUserCodeTemporaryDisableTime() - : ReadAttribute("user-code-temporary-disable-time") - { - } - - ~ReadDoorLockUserCodeTemporaryDisableTime() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000031) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock UserCodeTemporaryDisableTime read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute { -public: - WriteDoorLockUserCodeTemporaryDisableTime() - : WriteAttribute("user-code-temporary-disable-time") - { - AddArgument("attr-name", "user-code-temporary-disable-time"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockUserCodeTemporaryDisableTime() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000031) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster - writeAttributeUserCodeTemporaryDisableTimeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() - : SubscribeAttribute("user-code-temporary-disable-time") - { - } - - ~SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000031) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeUserCodeTemporaryDisableTimeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SendPINOverTheAir - */ -class ReadDoorLockSendPINOverTheAir : public ReadAttribute { -public: - ReadDoorLockSendPINOverTheAir() - : ReadAttribute("send-pinover-the-air") - { - } - - ~ReadDoorLockSendPINOverTheAir() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000032) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock SendPINOverTheAir read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockSendPINOverTheAir : public WriteAttribute { -public: - WriteDoorLockSendPINOverTheAir() - : WriteAttribute("send-pinover-the-air") - { - AddArgument("attr-name", "send-pinover-the-air"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockSendPINOverTheAir() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000032) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeSendPINOverTheAirWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock SendPINOverTheAir write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - bool mValue; -}; - -class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockSendPINOverTheAir() - : SubscribeAttribute("send-pinover-the-air") - { - } - - ~SubscribeAttributeDoorLockSendPINOverTheAir() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000032) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSendPINOverTheAirWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute RequirePINforRemoteOperation - */ -class ReadDoorLockRequirePINforRemoteOperation : public ReadAttribute { -public: - ReadDoorLockRequirePINforRemoteOperation() - : ReadAttribute("require-pinfor-remote-operation") - { - } - - ~ReadDoorLockRequirePINforRemoteOperation() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000033) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock RequirePINforRemoteOperation read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute { -public: - WriteDoorLockRequirePINforRemoteOperation() - : WriteAttribute("require-pinfor-remote-operation") - { - AddArgument("attr-name", "require-pinfor-remote-operation"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockRequirePINforRemoteOperation() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000033) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster - writeAttributeRequirePINforRemoteOperationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - bool mValue; -}; - -class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockRequirePINforRemoteOperation() - : SubscribeAttribute("require-pinfor-remote-operation") - { - } - - ~SubscribeAttributeDoorLockRequirePINforRemoteOperation() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000033) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeRequirePINforRemoteOperationWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ExpiringUserTimeout - */ -class ReadDoorLockExpiringUserTimeout : public ReadAttribute { -public: - ReadDoorLockExpiringUserTimeout() - : ReadAttribute("expiring-user-timeout") - { - } - - ~ReadDoorLockExpiringUserTimeout() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000035) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock ExpiringUserTimeout read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockExpiringUserTimeout : public WriteAttribute { -public: - WriteDoorLockExpiringUserTimeout() - : WriteAttribute("expiring-user-timeout") - { - AddArgument("attr-name", "expiring-user-timeout"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockExpiringUserTimeout() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000035) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeExpiringUserTimeoutWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock ExpiringUserTimeout write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockExpiringUserTimeout() - : SubscribeAttribute("expiring-user-timeout") - { - } - - ~SubscribeAttributeDoorLockExpiringUserTimeout() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000035) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeExpiringUserTimeoutWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadDoorLockGeneratedCommandList : public ReadAttribute { -public: - ReadDoorLockGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadDoorLockGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeDoorLockGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadDoorLockAcceptedCommandList : public ReadAttribute { -public: - ReadDoorLockAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadDoorLockAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeDoorLockAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EventList - */ -class ReadDoorLockEventList : public ReadAttribute { -public: - ReadDoorLockEventList() - : ReadAttribute("event-list") - { - } - - ~ReadDoorLockEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EventList response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockEventList : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeDoorLockEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AttributeList - */ -class ReadDoorLockAttributeList : public ReadAttribute { -public: - ReadDoorLockAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadDoorLockAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeDoorLockAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadDoorLockFeatureMap : public ReadAttribute { -public: - ReadDoorLockFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadDoorLockFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeDoorLockFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.FeatureMap response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadDoorLockClusterRevision : public ReadAttribute { -public: - ReadDoorLockClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadDoorLockClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeDoorLockClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster WindowCovering | 0x0102 | -|------------------------------------------------------------------------------| -| Commands: | | -| * UpOrOpen | 0x00 | -| * DownOrClose | 0x01 | -| * StopMotion | 0x02 | -| * GoToLiftValue | 0x04 | -| * GoToLiftPercentage | 0x05 | -| * GoToTiltValue | 0x07 | -| * GoToTiltPercentage | 0x08 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Type | 0x0000 | -| * PhysicalClosedLimitLift | 0x0001 | -| * PhysicalClosedLimitTilt | 0x0002 | -| * CurrentPositionLift | 0x0003 | -| * CurrentPositionTilt | 0x0004 | -| * NumberOfActuationsLift | 0x0005 | -| * NumberOfActuationsTilt | 0x0006 | -| * ConfigStatus | 0x0007 | -| * CurrentPositionLiftPercentage | 0x0008 | -| * CurrentPositionTiltPercentage | 0x0009 | -| * OperationalStatus | 0x000A | -| * TargetPositionLiftPercent100ths | 0x000B | -| * TargetPositionTiltPercent100ths | 0x000C | -| * EndProductType | 0x000D | -| * CurrentPositionLiftPercent100ths | 0x000E | -| * CurrentPositionTiltPercent100ths | 0x000F | -| * InstalledOpenLimitLift | 0x0010 | -| * InstalledClosedLimitLift | 0x0011 | -| * InstalledOpenLimitTilt | 0x0012 | -| * InstalledClosedLimitTilt | 0x0013 | -| * Mode | 0x0017 | -| * SafetyStatus | 0x001A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command UpOrOpen - */ -class WindowCoveringUpOrOpen : public ClusterCommand { -public: - WindowCoveringUpOrOpen() - : ClusterCommand("up-or-open") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster upOrOpenWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command DownOrClose - */ -class WindowCoveringDownOrClose : public ClusterCommand { -public: - WindowCoveringDownOrClose() - : ClusterCommand("down-or-close") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster downOrCloseWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command StopMotion - */ -class WindowCoveringStopMotion : public ClusterCommand { -public: - WindowCoveringStopMotion() - : ClusterCommand("stop-motion") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopMotionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command GoToLiftValue - */ -class WindowCoveringGoToLiftValue : public ClusterCommand { -public: - WindowCoveringGoToLiftValue() - : ClusterCommand("go-to-lift-value") - { - AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.liftValue = [NSNumber numberWithUnsignedShort:mRequest.liftValue]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster goToLiftValueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; -}; - -/* - * Command GoToLiftPercentage - */ -class WindowCoveringGoToLiftPercentage : public ClusterCommand { -public: - WindowCoveringGoToLiftPercentage() - : ClusterCommand("go-to-lift-percentage") - { - AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.liftPercent100thsValue]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; -}; - -/* - * Command GoToTiltValue - */ -class WindowCoveringGoToTiltValue : public ClusterCommand { -public: - WindowCoveringGoToTiltValue() - : ClusterCommand("go-to-tilt-value") - { - AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tiltValue = [NSNumber numberWithUnsignedShort:mRequest.tiltValue]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster goToTiltValueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; -}; - -/* - * Command GoToTiltPercentage - */ -class WindowCoveringGoToTiltPercentage : public ClusterCommand { -public: - WindowCoveringGoToTiltPercentage() - : ClusterCommand("go-to-tilt-percentage") - { - AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.tiltPercent100thsValue]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; -}; - -/* - * Attribute Type - */ -class ReadWindowCoveringType : public ReadAttribute { -public: - ReadWindowCoveringType() - : ReadAttribute("type") - { - } - - ~ReadWindowCoveringType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Type response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering Type read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringType() - : SubscribeAttribute("type") - { - } - - ~SubscribeAttributeWindowCoveringType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeTypeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Type response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute PhysicalClosedLimitLift - */ -class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { -public: - ReadWindowCoveringPhysicalClosedLimitLift() - : ReadAttribute("physical-closed-limit-lift") - { - } - - ~ReadWindowCoveringPhysicalClosedLimitLift() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering PhysicalClosedLimitLift read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() - : SubscribeAttribute("physical-closed-limit-lift") - { - } - - ~SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePhysicalClosedLimitLiftWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute PhysicalClosedLimitTilt - */ -class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { -public: - ReadWindowCoveringPhysicalClosedLimitTilt() - : ReadAttribute("physical-closed-limit-tilt") - { - } - - ~ReadWindowCoveringPhysicalClosedLimitTilt() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering PhysicalClosedLimitTilt read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() - : SubscribeAttribute("physical-closed-limit-tilt") - { - } - - ~SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePhysicalClosedLimitTiltWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CurrentPositionLift - */ -class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { -public: - ReadWindowCoveringCurrentPositionLift() - : ReadAttribute("current-position-lift") - { - } - - ~ReadWindowCoveringCurrentPositionLift() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering CurrentPositionLift read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringCurrentPositionLift() - : SubscribeAttribute("current-position-lift") - { - } - - ~SubscribeAttributeWindowCoveringCurrentPositionLift() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000003) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentPositionLiftWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CurrentPositionTilt - */ -class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { -public: - ReadWindowCoveringCurrentPositionTilt() - : ReadAttribute("current-position-tilt") - { - } - - ~ReadWindowCoveringCurrentPositionTilt() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000004) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering CurrentPositionTilt read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringCurrentPositionTilt() - : SubscribeAttribute("current-position-tilt") - { - } - - ~SubscribeAttributeWindowCoveringCurrentPositionTilt() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000004) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentPositionTiltWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfActuationsLift - */ -class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { -public: - ReadWindowCoveringNumberOfActuationsLift() - : ReadAttribute("number-of-actuations-lift") - { - } - - ~ReadWindowCoveringNumberOfActuationsLift() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000005) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering NumberOfActuationsLift read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringNumberOfActuationsLift() - : SubscribeAttribute("number-of-actuations-lift") - { - } - - ~SubscribeAttributeWindowCoveringNumberOfActuationsLift() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000005) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfActuationsLiftWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfActuationsTilt - */ -class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { -public: - ReadWindowCoveringNumberOfActuationsTilt() - : ReadAttribute("number-of-actuations-tilt") - { - } - - ~ReadWindowCoveringNumberOfActuationsTilt() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000006) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering NumberOfActuationsTilt read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringNumberOfActuationsTilt() - : SubscribeAttribute("number-of-actuations-tilt") - { - } - - ~SubscribeAttributeWindowCoveringNumberOfActuationsTilt() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000006) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfActuationsTiltWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ConfigStatus - */ -class ReadWindowCoveringConfigStatus : public ReadAttribute { -public: - ReadWindowCoveringConfigStatus() - : ReadAttribute("config-status") - { - } - - ~ReadWindowCoveringConfigStatus() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000007) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering ConfigStatus read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringConfigStatus() - : SubscribeAttribute("config-status") - { - } - - ~SubscribeAttributeWindowCoveringConfigStatus() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000007) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeConfigStatusWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CurrentPositionLiftPercentage - */ -class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { -public: - ReadWindowCoveringCurrentPositionLiftPercentage() - : ReadAttribute("current-position-lift-percentage") - { - } - - ~ReadWindowCoveringCurrentPositionLiftPercentage() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000008) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering CurrentPositionLiftPercentage read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() - : SubscribeAttribute("current-position-lift-percentage") - { - } - - ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000008) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentPositionLiftPercentageWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CurrentPositionTiltPercentage - */ -class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { -public: - ReadWindowCoveringCurrentPositionTiltPercentage() - : ReadAttribute("current-position-tilt-percentage") - { - } - - ~ReadWindowCoveringCurrentPositionTiltPercentage() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000009) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering CurrentPositionTiltPercentage read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() - : SubscribeAttribute("current-position-tilt-percentage") - { - } - - ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000009) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentPositionTiltPercentageWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OperationalStatus - */ -class ReadWindowCoveringOperationalStatus : public ReadAttribute { -public: - ReadWindowCoveringOperationalStatus() - : ReadAttribute("operational-status") - { - } - - ~ReadWindowCoveringOperationalStatus() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering OperationalStatus read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringOperationalStatus() - : SubscribeAttribute("operational-status") - { - } - - ~SubscribeAttributeWindowCoveringOperationalStatus() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOperationalStatusWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute TargetPositionLiftPercent100ths - */ -class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { -public: - ReadWindowCoveringTargetPositionLiftPercent100ths() - : ReadAttribute("target-position-lift-percent100ths") - { - } - - ~ReadWindowCoveringTargetPositionLiftPercent100ths() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000B) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering TargetPositionLiftPercent100ths read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() - : SubscribeAttribute("target-position-lift-percent100ths") - { - } - - ~SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000B) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeTargetPositionLiftPercent100thsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute TargetPositionTiltPercent100ths - */ -class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { -public: - ReadWindowCoveringTargetPositionTiltPercent100ths() - : ReadAttribute("target-position-tilt-percent100ths") - { - } - - ~ReadWindowCoveringTargetPositionTiltPercent100ths() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000C) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering TargetPositionTiltPercent100ths read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() - : SubscribeAttribute("target-position-tilt-percent100ths") - { - } - - ~SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000C) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeTargetPositionTiltPercent100thsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EndProductType - */ -class ReadWindowCoveringEndProductType : public ReadAttribute { -public: - ReadWindowCoveringEndProductType() - : ReadAttribute("end-product-type") - { - } - - ~ReadWindowCoveringEndProductType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000D) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EndProductType response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering EndProductType read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringEndProductType() - : SubscribeAttribute("end-product-type") - { - } - - ~SubscribeAttributeWindowCoveringEndProductType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000D) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEndProductTypeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EndProductType response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CurrentPositionLiftPercent100ths - */ -class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute { -public: - ReadWindowCoveringCurrentPositionLiftPercent100ths() - : ReadAttribute("current-position-lift-percent100ths") - { - } - - ~ReadWindowCoveringCurrentPositionLiftPercent100ths() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000E) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering CurrentPositionLiftPercent100ths read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() - : SubscribeAttribute("current-position-lift-percent100ths") - { - } - - ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000E) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentPositionLiftPercent100thsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CurrentPositionTiltPercent100ths - */ -class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute { -public: - ReadWindowCoveringCurrentPositionTiltPercent100ths() - : ReadAttribute("current-position-tilt-percent100ths") - { - } - - ~ReadWindowCoveringCurrentPositionTiltPercent100ths() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000F) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering CurrentPositionTiltPercent100ths read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() - : SubscribeAttribute("current-position-tilt-percent100ths") - { - } - - ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000F) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentPositionTiltPercent100thsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute InstalledOpenLimitLift - */ -class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { -public: - ReadWindowCoveringInstalledOpenLimitLift() - : ReadAttribute("installed-open-limit-lift") - { - } - - ~ReadWindowCoveringInstalledOpenLimitLift() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000010) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering InstalledOpenLimitLift read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringInstalledOpenLimitLift() - : SubscribeAttribute("installed-open-limit-lift") - { - } - - ~SubscribeAttributeWindowCoveringInstalledOpenLimitLift() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000010) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeInstalledOpenLimitLiftWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute InstalledClosedLimitLift - */ -class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { -public: - ReadWindowCoveringInstalledClosedLimitLift() - : ReadAttribute("installed-closed-limit-lift") - { - } - - ~ReadWindowCoveringInstalledClosedLimitLift() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000011) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering InstalledClosedLimitLift read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringInstalledClosedLimitLift() - : SubscribeAttribute("installed-closed-limit-lift") - { - } - - ~SubscribeAttributeWindowCoveringInstalledClosedLimitLift() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000011) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeInstalledClosedLimitLiftWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute InstalledOpenLimitTilt - */ -class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { -public: - ReadWindowCoveringInstalledOpenLimitTilt() - : ReadAttribute("installed-open-limit-tilt") - { - } - - ~ReadWindowCoveringInstalledOpenLimitTilt() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000012) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering InstalledOpenLimitTilt read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() - : SubscribeAttribute("installed-open-limit-tilt") - { - } - - ~SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000012) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeInstalledOpenLimitTiltWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute InstalledClosedLimitTilt - */ -class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { -public: - ReadWindowCoveringInstalledClosedLimitTilt() - : ReadAttribute("installed-closed-limit-tilt") - { - } - - ~ReadWindowCoveringInstalledClosedLimitTilt() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000013) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering InstalledClosedLimitTilt read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() - : SubscribeAttribute("installed-closed-limit-tilt") - { - } - - ~SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000013) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeInstalledClosedLimitTiltWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Mode - */ -class ReadWindowCoveringMode : public ReadAttribute { -public: - ReadWindowCoveringMode() - : ReadAttribute("mode") - { - } - - ~ReadWindowCoveringMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000017) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Mode response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering Mode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteWindowCoveringMode : public WriteAttribute { -public: - WriteWindowCoveringMode() - : WriteAttribute("mode") - { - AddArgument("attr-name", "mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteWindowCoveringMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) WriteAttribute (0x00000017) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("WindowCovering Mode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringMode() - : SubscribeAttribute("mode") - { - } - - ~SubscribeAttributeWindowCoveringMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000017) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Mode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SafetyStatus - */ -class ReadWindowCoveringSafetyStatus : public ReadAttribute { -public: - ReadWindowCoveringSafetyStatus() - : ReadAttribute("safety-status") - { - } - - ~ReadWindowCoveringSafetyStatus() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000001A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering SafetyStatus read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringSafetyStatus() - : SubscribeAttribute("safety-status") - { - } - - ~SubscribeAttributeWindowCoveringSafetyStatus() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000001A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSafetyStatusWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { -public: - ReadWindowCoveringGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadWindowCoveringGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeWindowCoveringGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { -public: - ReadWindowCoveringAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadWindowCoveringAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeWindowCoveringAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EventList - */ -class ReadWindowCoveringEventList : public ReadAttribute { -public: - ReadWindowCoveringEventList() - : ReadAttribute("event-list") - { - } - - ~ReadWindowCoveringEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EventList response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringEventList : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeWindowCoveringEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AttributeList - */ -class ReadWindowCoveringAttributeList : public ReadAttribute { -public: - ReadWindowCoveringAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadWindowCoveringAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeWindowCoveringAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadWindowCoveringFeatureMap : public ReadAttribute { -public: - ReadWindowCoveringFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadWindowCoveringFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeWindowCoveringFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.FeatureMap response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadWindowCoveringClusterRevision : public ReadAttribute { -public: - ReadWindowCoveringClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadWindowCoveringClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeWindowCoveringClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeWindowCoveringClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster BarrierControl | 0x0103 | -|------------------------------------------------------------------------------| -| Commands: | | -| * BarrierControlGoToPercent | 0x00 | -| * BarrierControlStop | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * BarrierMovingState | 0x0001 | -| * BarrierSafetyStatus | 0x0002 | -| * BarrierCapabilities | 0x0003 | -| * BarrierOpenEvents | 0x0004 | -| * BarrierCloseEvents | 0x0005 | -| * BarrierCommandOpenEvents | 0x0006 | -| * BarrierCommandCloseEvents | 0x0007 | -| * BarrierOpenPeriod | 0x0008 | -| * BarrierClosePeriod | 0x0009 | -| * BarrierPosition | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command BarrierControlGoToPercent - */ -class BarrierControlBarrierControlGoToPercent : public ClusterCommand { -public: - BarrierControlBarrierControlGoToPercent() - : ClusterCommand("barrier-control-go-to-percent") - { - AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.percentOpen = [NSNumber numberWithUnsignedChar:mRequest.percentOpen]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster barrierControlGoToPercentWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; -}; - -/* - * Command BarrierControlStop - */ -class BarrierControlBarrierControlStop : public ClusterCommand { -public: - BarrierControlBarrierControlStop() - : ClusterCommand("barrier-control-stop") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster barrierControlStopWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Attribute BarrierMovingState - */ -class ReadBarrierControlBarrierMovingState : public ReadAttribute { -public: - ReadBarrierControlBarrierMovingState() - : ReadAttribute("barrier-moving-state") - { - } - - ~ReadBarrierControlBarrierMovingState() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierMovingStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl BarrierMovingState read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlBarrierMovingState() - : SubscribeAttribute("barrier-moving-state") - { - } - - ~SubscribeAttributeBarrierControlBarrierMovingState() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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 subscribeAttributeBarrierMovingStateWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute BarrierSafetyStatus - */ -class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { -public: - ReadBarrierControlBarrierSafetyStatus() - : ReadAttribute("barrier-safety-status") - { - } - - ~ReadBarrierControlBarrierSafetyStatus() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl BarrierSafetyStatus read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlBarrierSafetyStatus() - : SubscribeAttribute("barrier-safety-status") - { - } - - ~SubscribeAttributeBarrierControlBarrierSafetyStatus() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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 subscribeAttributeBarrierSafetyStatusWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute BarrierCapabilities - */ -class ReadBarrierControlBarrierCapabilities : public ReadAttribute { -public: - ReadBarrierControlBarrierCapabilities() - : ReadAttribute("barrier-capabilities") - { - } - - ~ReadBarrierControlBarrierCapabilities() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl BarrierCapabilities read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlBarrierCapabilities() - : SubscribeAttribute("barrier-capabilities") - { - } - - ~SubscribeAttributeBarrierControlBarrierCapabilities() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000003) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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 subscribeAttributeBarrierCapabilitiesWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute BarrierOpenEvents - */ -class ReadBarrierControlBarrierOpenEvents : public ReadAttribute { -public: - ReadBarrierControlBarrierOpenEvents() - : ReadAttribute("barrier-open-events") - { - } - - ~ReadBarrierControlBarrierOpenEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000004) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl BarrierOpenEvents read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierOpenEvents : public WriteAttribute { -public: - WriteBarrierControlBarrierOpenEvents() - : WriteAttribute("barrier-open-events") - { - AddArgument("attr-name", "barrier-open-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierOpenEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000004) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierOpenEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierOpenEvents write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlBarrierOpenEvents() - : SubscribeAttribute("barrier-open-events") - { - } - - ~SubscribeAttributeBarrierControlBarrierOpenEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000004) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeBarrierOpenEventsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute BarrierCloseEvents - */ -class ReadBarrierControlBarrierCloseEvents : public ReadAttribute { -public: - ReadBarrierControlBarrierCloseEvents() - : ReadAttribute("barrier-close-events") - { - } - - ~ReadBarrierControlBarrierCloseEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000005) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl BarrierCloseEvents read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierCloseEvents : public WriteAttribute { -public: - WriteBarrierControlBarrierCloseEvents() - : WriteAttribute("barrier-close-events") - { - AddArgument("attr-name", "barrier-close-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierCloseEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000005) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierCloseEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCloseEvents write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlBarrierCloseEvents() - : SubscribeAttribute("barrier-close-events") - { - } - - ~SubscribeAttributeBarrierControlBarrierCloseEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000005) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeBarrierCloseEventsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute BarrierCommandOpenEvents - */ -class ReadBarrierControlBarrierCommandOpenEvents : public ReadAttribute { -public: - ReadBarrierControlBarrierCommandOpenEvents() - : ReadAttribute("barrier-command-open-events") - { - } - - ~ReadBarrierControlBarrierCommandOpenEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000006) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierCommandOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl BarrierCommandOpenEvents read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierCommandOpenEvents : public WriteAttribute { -public: - WriteBarrierControlBarrierCommandOpenEvents() - : WriteAttribute("barrier-command-open-events") - { - AddArgument("attr-name", "barrier-command-open-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierCommandOpenEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000006) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributeBarrierCommandOpenEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCommandOpenEvents write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlBarrierCommandOpenEvents() - : SubscribeAttribute("barrier-command-open-events") - { - } - - ~SubscribeAttributeBarrierControlBarrierCommandOpenEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000006) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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 subscribeAttributeBarrierCommandOpenEventsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute BarrierCommandCloseEvents - */ -class ReadBarrierControlBarrierCommandCloseEvents : public ReadAttribute { -public: - ReadBarrierControlBarrierCommandCloseEvents() - : ReadAttribute("barrier-command-close-events") - { - } - - ~ReadBarrierControlBarrierCommandCloseEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000007) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierCommandCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl BarrierCommandCloseEvents read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierCommandCloseEvents : public WriteAttribute { -public: - WriteBarrierControlBarrierCommandCloseEvents() - : WriteAttribute("barrier-command-close-events") - { - AddArgument("attr-name", "barrier-command-close-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierCommandCloseEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000007) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributeBarrierCommandCloseEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCommandCloseEvents write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlBarrierCommandCloseEvents() - : SubscribeAttribute("barrier-command-close-events") - { - } - - ~SubscribeAttributeBarrierControlBarrierCommandCloseEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000007) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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 subscribeAttributeBarrierCommandCloseEventsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute BarrierOpenPeriod - */ -class ReadBarrierControlBarrierOpenPeriod : public ReadAttribute { -public: - ReadBarrierControlBarrierOpenPeriod() - : ReadAttribute("barrier-open-period") - { - } - - ~ReadBarrierControlBarrierOpenPeriod() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000008) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl BarrierOpenPeriod read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute { -public: - WriteBarrierControlBarrierOpenPeriod() - : WriteAttribute("barrier-open-period") - { - AddArgument("attr-name", "barrier-open-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierOpenPeriod() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000008) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierOpenPeriodWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierOpenPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlBarrierOpenPeriod() - : SubscribeAttribute("barrier-open-period") - { - } - - ~SubscribeAttributeBarrierControlBarrierOpenPeriod() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000008) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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 subscribeAttributeBarrierOpenPeriodWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute BarrierClosePeriod - */ -class ReadBarrierControlBarrierClosePeriod : public ReadAttribute { -public: - ReadBarrierControlBarrierClosePeriod() - : ReadAttribute("barrier-close-period") - { - } - - ~ReadBarrierControlBarrierClosePeriod() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000009) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierClosePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl BarrierClosePeriod read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { -public: - WriteBarrierControlBarrierClosePeriod() - : WriteAttribute("barrier-close-period") - { - AddArgument("attr-name", "barrier-close-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierClosePeriod() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000009) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierClosePeriodWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierClosePeriod write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlBarrierClosePeriod() - : SubscribeAttribute("barrier-close-period") - { - } - - ~SubscribeAttributeBarrierControlBarrierClosePeriod() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000009) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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 subscribeAttributeBarrierClosePeriodWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute BarrierPosition - */ -class ReadBarrierControlBarrierPosition : public ReadAttribute { -public: - ReadBarrierControlBarrierPosition() - : ReadAttribute("barrier-position") - { - } - - ~ReadBarrierControlBarrierPosition() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000000A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl BarrierPosition read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlBarrierPosition() - : SubscribeAttribute("barrier-position") - { - } - - ~SubscribeAttributeBarrierControlBarrierPosition() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000000A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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 subscribeAttributeBarrierPositionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadBarrierControlGeneratedCommandList : public ReadAttribute { -public: - ReadBarrierControlGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadBarrierControlGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeBarrierControlGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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(@"BarrierControl.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadBarrierControlAcceptedCommandList : public ReadAttribute { -public: - ReadBarrierControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadBarrierControlAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeBarrierControlAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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(@"BarrierControl.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EventList - */ -class ReadBarrierControlEventList : public ReadAttribute { -public: - ReadBarrierControlEventList() - : ReadAttribute("event-list") - { - } - - ~ReadBarrierControlEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.EventList response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBarrierControlEventList : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeBarrierControlEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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(@"BarrierControl.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AttributeList - */ -class ReadBarrierControlAttributeList : public ReadAttribute { -public: - ReadBarrierControlAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadBarrierControlAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeBarrierControlAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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(@"BarrierControl.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadBarrierControlFeatureMap : public ReadAttribute { -public: - ReadBarrierControlFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadBarrierControlFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeBarrierControlFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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(@"BarrierControl.FeatureMap response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadBarrierControlClusterRevision : public ReadAttribute { -public: - ReadBarrierControlClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadBarrierControlClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeBarrierControlClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeBarrierControlClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl 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(@"BarrierControl.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster PumpConfigurationAndControl | 0x0200 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MaxPressure | 0x0000 | -| * MaxSpeed | 0x0001 | -| * MaxFlow | 0x0002 | -| * MinConstPressure | 0x0003 | -| * MaxConstPressure | 0x0004 | -| * MinCompPressure | 0x0005 | -| * MaxCompPressure | 0x0006 | -| * MinConstSpeed | 0x0007 | -| * MaxConstSpeed | 0x0008 | -| * MinConstFlow | 0x0009 | -| * MaxConstFlow | 0x000A | -| * MinConstTemp | 0x000B | -| * MaxConstTemp | 0x000C | -| * PumpStatus | 0x0010 | -| * EffectiveOperationMode | 0x0011 | -| * EffectiveControlMode | 0x0012 | -| * Capacity | 0x0013 | -| * Speed | 0x0014 | -| * LifetimeRunningHours | 0x0015 | -| * Power | 0x0016 | -| * LifetimeEnergyConsumed | 0x0017 | -| * OperationMode | 0x0020 | -| * ControlMode | 0x0021 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SupplyVoltageLow | 0x0000 | -| * SupplyVoltageHigh | 0x0001 | -| * PowerMissingPhase | 0x0002 | -| * SystemPressureLow | 0x0003 | -| * SystemPressureHigh | 0x0004 | -| * DryRunning | 0x0005 | -| * MotorTemperatureHigh | 0x0006 | -| * PumpMotorFatalFailure | 0x0007 | -| * ElectronicTemperatureHigh | 0x0008 | -| * PumpBlocked | 0x0009 | -| * SensorFailure | 0x000A | -| * ElectronicNonFatalFailure | 0x000B | -| * ElectronicFatalFailure | 0x000C | -| * GeneralFault | 0x000D | -| * Leakage | 0x000E | -| * AirDetection | 0x000F | -| * TurbineOperation | 0x0010 | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute MaxPressure - */ -class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMaxPressure() - : ReadAttribute("max-pressure") - { - } - - ~ReadPumpConfigurationAndControlMaxPressure() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxPressure read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlMaxPressure : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlMaxPressure() - : SubscribeAttribute("max-pressure") - { - } - - ~SubscribeAttributePumpConfigurationAndControlMaxPressure() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxPressureWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxSpeed - */ -class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMaxSpeed() - : ReadAttribute("max-speed") - { - } - - ~ReadPumpConfigurationAndControlMaxSpeed() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxSpeed read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlMaxSpeed() - : SubscribeAttribute("max-speed") - { - } - - ~SubscribeAttributePumpConfigurationAndControlMaxSpeed() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxSpeedWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxFlow - */ -class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMaxFlow() - : ReadAttribute("max-flow") - { - } - - ~ReadPumpConfigurationAndControlMaxFlow() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxFlow read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlMaxFlow() - : SubscribeAttribute("max-flow") - { - } - - ~SubscribeAttributePumpConfigurationAndControlMaxFlow() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxFlowWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinConstPressure - */ -class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMinConstPressure() - : ReadAttribute("min-const-pressure") - { - } - - ~ReadPumpConfigurationAndControlMinConstPressure() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MinConstPressure read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlMinConstPressure() - : SubscribeAttribute("min-const-pressure") - { - } - - ~SubscribeAttributePumpConfigurationAndControlMinConstPressure() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000003) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinConstPressureWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxConstPressure - */ -class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMaxConstPressure() - : ReadAttribute("max-const-pressure") - { - } - - ~ReadPumpConfigurationAndControlMaxConstPressure() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000004) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxConstPressure read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlMaxConstPressure() - : SubscribeAttribute("max-const-pressure") - { - } - - ~SubscribeAttributePumpConfigurationAndControlMaxConstPressure() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000004) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxConstPressureWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinCompPressure - */ -class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMinCompPressure() - : ReadAttribute("min-comp-pressure") - { - } - - ~ReadPumpConfigurationAndControlMinCompPressure() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000005) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlMinCompPressure() - : SubscribeAttribute("min-comp-pressure") - { - } - - ~SubscribeAttributePumpConfigurationAndControlMinCompPressure() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000005) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinCompPressureWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxCompPressure - */ -class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMaxCompPressure() - : ReadAttribute("max-comp-pressure") - { - } - - ~ReadPumpConfigurationAndControlMaxCompPressure() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000006) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlMaxCompPressure() - : SubscribeAttribute("max-comp-pressure") - { - } - - ~SubscribeAttributePumpConfigurationAndControlMaxCompPressure() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000006) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxCompPressureWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinConstSpeed - */ -class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMinConstSpeed() - : ReadAttribute("min-const-speed") - { - } - - ~ReadPumpConfigurationAndControlMinConstSpeed() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000007) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlMinConstSpeed() - : SubscribeAttribute("min-const-speed") - { - } - - ~SubscribeAttributePumpConfigurationAndControlMinConstSpeed() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000007) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinConstSpeedWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxConstSpeed - */ -class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMaxConstSpeed() - : ReadAttribute("max-const-speed") - { - } - - ~ReadPumpConfigurationAndControlMaxConstSpeed() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000008) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() - : SubscribeAttribute("max-const-speed") - { - } - - ~SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000008) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxConstSpeedWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinConstFlow - */ -class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMinConstFlow() - : ReadAttribute("min-const-flow") - { - } - - ~ReadPumpConfigurationAndControlMinConstFlow() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000009) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlMinConstFlow() - : SubscribeAttribute("min-const-flow") - { - } - - ~SubscribeAttributePumpConfigurationAndControlMinConstFlow() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000009) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinConstFlowWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxConstFlow - */ -class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMaxConstFlow() - : ReadAttribute("max-const-flow") - { - } - - ~ReadPumpConfigurationAndControlMaxConstFlow() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlMaxConstFlow() - : SubscribeAttribute("max-const-flow") - { - } - - ~SubscribeAttributePumpConfigurationAndControlMaxConstFlow() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxConstFlowWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinConstTemp - */ -class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMinConstTemp() - : ReadAttribute("min-const-temp") - { - } - - ~ReadPumpConfigurationAndControlMinConstTemp() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000B) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlMinConstTemp() - : SubscribeAttribute("min-const-temp") - { - } - - ~SubscribeAttributePumpConfigurationAndControlMinConstTemp() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000B) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinConstTempWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxConstTemp - */ -class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMaxConstTemp() - : ReadAttribute("max-const-temp") - { - } - - ~ReadPumpConfigurationAndControlMaxConstTemp() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000C) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlMaxConstTemp() - : SubscribeAttribute("max-const-temp") - { - } - - ~SubscribeAttributePumpConfigurationAndControlMaxConstTemp() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000C) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxConstTempWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute PumpStatus - */ -class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { -public: - ReadPumpConfigurationAndControlPumpStatus() - : ReadAttribute("pump-status") - { - } - - ~ReadPumpConfigurationAndControlPumpStatus() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000010) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlPumpStatus : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlPumpStatus() - : SubscribeAttribute("pump-status") - { - } - - ~SubscribeAttributePumpConfigurationAndControlPumpStatus() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000010) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePumpStatusWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EffectiveOperationMode - */ -class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribute { -public: - ReadPumpConfigurationAndControlEffectiveOperationMode() - : ReadAttribute("effective-operation-mode") - { - } - - ~ReadPumpConfigurationAndControlEffectiveOperationMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000011) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() - : SubscribeAttribute("effective-operation-mode") - { - } - - ~SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000011) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEffectiveOperationModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EffectiveControlMode - */ -class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute { -public: - ReadPumpConfigurationAndControlEffectiveControlMode() - : ReadAttribute("effective-control-mode") - { - } - - ~ReadPumpConfigurationAndControlEffectiveControlMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000012) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() - : SubscribeAttribute("effective-control-mode") - { - } - - ~SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000012) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEffectiveControlModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Capacity - */ -class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { -public: - ReadPumpConfigurationAndControlCapacity() - : ReadAttribute("capacity") - { - } - - ~ReadPumpConfigurationAndControlCapacity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000013) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl Capacity read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlCapacity() - : SubscribeAttribute("capacity") - { - } - - ~SubscribeAttributePumpConfigurationAndControlCapacity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000013) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCapacityWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Speed - */ -class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { -public: - ReadPumpConfigurationAndControlSpeed() - : ReadAttribute("speed") - { - } - - ~ReadPumpConfigurationAndControlSpeed() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000014) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl Speed read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlSpeed() - : SubscribeAttribute("speed") - { - } - - ~SubscribeAttributePumpConfigurationAndControlSpeed() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000014) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSpeedWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LifetimeRunningHours - */ -class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute { -public: - ReadPumpConfigurationAndControlLifetimeRunningHours() - : ReadAttribute("lifetime-running-hours") - { - } - - ~ReadPumpConfigurationAndControlLifetimeRunningHours() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000015) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribute { -public: - WritePumpConfigurationAndControlLifetimeRunningHours() - : WriteAttribute("lifetime-running-hours") - { - AddArgument("attr-name", "lifetime-running-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePumpConfigurationAndControlLifetimeRunningHours() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000015) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeLifetimeRunningHoursWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() - : SubscribeAttribute("lifetime-running-hours") - { - } - - ~SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000015) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLifetimeRunningHoursWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Power - */ -class ReadPumpConfigurationAndControlPower : public ReadAttribute { -public: - ReadPumpConfigurationAndControlPower() - : ReadAttribute("power") - { - } - - ~ReadPumpConfigurationAndControlPower() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000016) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl Power read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlPower() - : SubscribeAttribute("power") - { - } - - ~SubscribeAttributePumpConfigurationAndControlPower() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000016) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePowerWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LifetimeEnergyConsumed - */ -class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribute { -public: - ReadPumpConfigurationAndControlLifetimeEnergyConsumed() - : ReadAttribute("lifetime-energy-consumed") - { - } - - ~ReadPumpConfigurationAndControlLifetimeEnergyConsumed() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000017) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttribute { -public: - WritePumpConfigurationAndControlLifetimeEnergyConsumed() - : WriteAttribute("lifetime-energy-consumed") - { - AddArgument("attr-name", "lifetime-energy-consumed"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePumpConfigurationAndControlLifetimeEnergyConsumed() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000017) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster - writeAttributeLifetimeEnergyConsumedWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() - : SubscribeAttribute("lifetime-energy-consumed") - { - } - - ~SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000017) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLifetimeEnergyConsumedWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OperationMode - */ -class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { -public: - ReadPumpConfigurationAndControlOperationMode() - : ReadAttribute("operation-mode") - { - } - - ~ReadPumpConfigurationAndControlOperationMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000020) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl OperationMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { -public: - WritePumpConfigurationAndControlOperationMode() - : WriteAttribute("operation-mode") - { - AddArgument("attr-name", "operation-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePumpConfigurationAndControlOperationMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000020) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOperationModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl OperationMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributePumpConfigurationAndControlOperationMode : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlOperationMode() - : SubscribeAttribute("operation-mode") - { - } - - ~SubscribeAttributePumpConfigurationAndControlOperationMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000020) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOperationModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ControlMode - */ -class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { -public: - ReadPumpConfigurationAndControlControlMode() - : ReadAttribute("control-mode") - { - } - - ~ReadPumpConfigurationAndControlControlMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000021) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl ControlMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WritePumpConfigurationAndControlControlMode : public WriteAttribute { -public: - WritePumpConfigurationAndControlControlMode() - : WriteAttribute("control-mode") - { - AddArgument("attr-name", "control-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePumpConfigurationAndControlControlMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000021) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeControlModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl ControlMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributePumpConfigurationAndControlControlMode : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlControlMode() - : SubscribeAttribute("control-mode") - { - } - - ~SubscribeAttributePumpConfigurationAndControlControlMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000021) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeControlModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute { -public: - ReadPumpConfigurationAndControlGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadPumpConfigurationAndControlGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute { -public: - ReadPumpConfigurationAndControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadPumpConfigurationAndControlAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EventList - */ -class ReadPumpConfigurationAndControlEventList : public ReadAttribute { -public: - ReadPumpConfigurationAndControlEventList() - : ReadAttribute("event-list") - { - } - - ~ReadPumpConfigurationAndControlEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributePumpConfigurationAndControlEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AttributeList - */ -class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { -public: - ReadPumpConfigurationAndControlAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadPumpConfigurationAndControlAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlAttributeList : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributePumpConfigurationAndControlAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { -public: - ReadPumpConfigurationAndControlFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadPumpConfigurationAndControlFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributePumpConfigurationAndControlFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { -public: - ReadPumpConfigurationAndControlClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadPumpConfigurationAndControlClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributePumpConfigurationAndControlClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributePumpConfigurationAndControlClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster Thermostat | 0x0201 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetpointRaiseLower | 0x00 | -| * SetWeeklySchedule | 0x01 | -| * GetWeeklySchedule | 0x02 | -| * ClearWeeklySchedule | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LocalTemperature | 0x0000 | -| * OutdoorTemperature | 0x0001 | -| * Occupancy | 0x0002 | -| * AbsMinHeatSetpointLimit | 0x0003 | -| * AbsMaxHeatSetpointLimit | 0x0004 | -| * AbsMinCoolSetpointLimit | 0x0005 | -| * AbsMaxCoolSetpointLimit | 0x0006 | -| * PICoolingDemand | 0x0007 | -| * PIHeatingDemand | 0x0008 | -| * HVACSystemTypeConfiguration | 0x0009 | -| * LocalTemperatureCalibration | 0x0010 | -| * OccupiedCoolingSetpoint | 0x0011 | -| * OccupiedHeatingSetpoint | 0x0012 | -| * UnoccupiedCoolingSetpoint | 0x0013 | -| * UnoccupiedHeatingSetpoint | 0x0014 | -| * MinHeatSetpointLimit | 0x0015 | -| * MaxHeatSetpointLimit | 0x0016 | -| * MinCoolSetpointLimit | 0x0017 | -| * MaxCoolSetpointLimit | 0x0018 | -| * MinSetpointDeadBand | 0x0019 | -| * RemoteSensing | 0x001A | -| * ControlSequenceOfOperation | 0x001B | -| * SystemMode | 0x001C | -| * ThermostatRunningMode | 0x001E | -| * StartOfWeek | 0x0020 | -| * NumberOfWeeklyTransitions | 0x0021 | -| * NumberOfDailyTransitions | 0x0022 | -| * TemperatureSetpointHold | 0x0023 | -| * TemperatureSetpointHoldDuration | 0x0024 | -| * ThermostatProgrammingOperationMode | 0x0025 | -| * ThermostatRunningState | 0x0029 | -| * SetpointChangeSource | 0x0030 | -| * SetpointChangeAmount | 0x0031 | -| * SetpointChangeSourceTimestamp | 0x0032 | -| * OccupiedSetback | 0x0034 | -| * OccupiedSetbackMin | 0x0035 | -| * OccupiedSetbackMax | 0x0036 | -| * UnoccupiedSetback | 0x0037 | -| * UnoccupiedSetbackMin | 0x0038 | -| * UnoccupiedSetbackMax | 0x0039 | -| * EmergencyHeatDelta | 0x003A | -| * ACType | 0x0040 | -| * ACCapacity | 0x0041 | -| * ACRefrigerantType | 0x0042 | -| * ACCompressorType | 0x0043 | -| * ACErrorCode | 0x0044 | -| * ACLouverPosition | 0x0045 | -| * ACCoilTemperature | 0x0046 | -| * ACCapacityformat | 0x0047 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command SetpointRaiseLower - */ -class ThermostatSetpointRaiseLower : public ClusterCommand { -public: - ThermostatSetpointRaiseLower() - : ClusterCommand("setpoint-raise-lower") - { - AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.mode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.mode)]; - params.amount = [NSNumber numberWithChar:mRequest.amount]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setpointRaiseLowerWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type mRequest; -}; - -/* - * Command SetWeeklySchedule - */ -class ThermostatSetWeeklySchedule : public ClusterCommand { -public: - ThermostatSetWeeklySchedule() - : ClusterCommand("set-weekly-schedule") - , mComplex_Transitions(&mRequest.transitions) - { - AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); - AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); - AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); - AddArgument("Transitions", &mComplex_Transitions); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:mRequest.numberOfTransitionsForSequence]; - params.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekForSequence.Raw()]; - params.modeForSequence = [NSNumber numberWithUnsignedChar:mRequest.modeForSequence.Raw()]; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.transitions) { - MTRThermostatClusterThermostatScheduleTransition * newElement_0; - newElement_0 = [MTRThermostatClusterThermostatScheduleTransition new]; - newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; - if (entry_0.heatSetpoint.IsNull()) { - newElement_0.heatSetpoint = nil; - } else { - newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; - } - if (entry_0.coolSetpoint.IsNull()) { - newElement_0.coolSetpoint = nil; - } else { - newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; - } - [array_0 addObject:newElement_0]; - } - params.transitions = array_0; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setWeeklyScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; - TypedComplexArgument< - chip::app::DataModel::List> - mComplex_Transitions; -}; - -/* - * Command GetWeeklySchedule - */ -class ThermostatGetWeeklySchedule : public ClusterCommand { -public: - ThermostatGetWeeklySchedule() - : ClusterCommand("get-weekly-schedule") - { - AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); - AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.daysToReturn = [NSNumber numberWithUnsignedChar:mRequest.daysToReturn.Raw()]; - params.modeToReturn = [NSNumber numberWithUnsignedChar:mRequest.modeToReturn.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getWeeklyScheduleWithParams:params - completion:^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; -}; - -/* - * Command ClearWeeklySchedule - */ -class ThermostatClearWeeklySchedule : public ClusterCommand { -public: - ThermostatClearWeeklySchedule() - : ClusterCommand("clear-weekly-schedule") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearWeeklyScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Attribute LocalTemperature - */ -class ReadThermostatLocalTemperature : public ReadAttribute { -public: - ReadThermostatLocalTemperature() - : ReadAttribute("local-temperature") - { - } - - ~ReadThermostatLocalTemperature() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperature response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat LocalTemperature read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { -public: - SubscribeAttributeThermostatLocalTemperature() - : SubscribeAttribute("local-temperature") - { - } - - ~SubscribeAttributeThermostatLocalTemperature() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - 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 subscribeAttributeLocalTemperatureWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperature response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OutdoorTemperature - */ -class ReadThermostatOutdoorTemperature : public ReadAttribute { -public: - ReadThermostatOutdoorTemperature() - : ReadAttribute("outdoor-temperature") - { - } - - ~ReadThermostatOutdoorTemperature() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat OutdoorTemperature read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute { -public: - SubscribeAttributeThermostatOutdoorTemperature() - : SubscribeAttribute("outdoor-temperature") - { - } - - ~SubscribeAttributeThermostatOutdoorTemperature() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - 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 subscribeAttributeOutdoorTemperatureWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Occupancy - */ -class ReadThermostatOccupancy : public ReadAttribute { -public: - ReadThermostatOccupancy() - : ReadAttribute("occupancy") - { - } - - ~ReadThermostatOccupancy() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Occupancy response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat Occupancy read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { -public: - SubscribeAttributeThermostatOccupancy() - : SubscribeAttribute("occupancy") - { - } - - ~SubscribeAttributeThermostatOccupancy() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - 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 subscribeAttributeOccupancyWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Occupancy response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AbsMinHeatSetpointLimit - */ -class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { -public: - ReadThermostatAbsMinHeatSetpointLimit() - : ReadAttribute("abs-min-heat-setpoint-limit") - { - } - - ~ReadThermostatAbsMinHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttribute { -public: - SubscribeAttributeThermostatAbsMinHeatSetpointLimit() - : SubscribeAttribute("abs-min-heat-setpoint-limit") - { - } - - ~SubscribeAttributeThermostatAbsMinHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000003) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - 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 subscribeAttributeAbsMinHeatSetpointLimitWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AbsMaxHeatSetpointLimit - */ -class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { -public: - ReadThermostatAbsMaxHeatSetpointLimit() - : ReadAttribute("abs-max-heat-setpoint-limit") - { - } - - ~ReadThermostatAbsMaxHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000004) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttribute { -public: - SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() - : SubscribeAttribute("abs-max-heat-setpoint-limit") - { - } - - ~SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000004) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - 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 subscribeAttributeAbsMaxHeatSetpointLimitWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AbsMinCoolSetpointLimit - */ -class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { -public: - ReadThermostatAbsMinCoolSetpointLimit() - : ReadAttribute("abs-min-cool-setpoint-limit") - { - } - - ~ReadThermostatAbsMinCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000005) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttribute { -public: - SubscribeAttributeThermostatAbsMinCoolSetpointLimit() - : SubscribeAttribute("abs-min-cool-setpoint-limit") - { - } - - ~SubscribeAttributeThermostatAbsMinCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000005) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAbsMinCoolSetpointLimitWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AbsMaxCoolSetpointLimit - */ -class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { -public: - ReadThermostatAbsMaxCoolSetpointLimit() - : ReadAttribute("abs-max-cool-setpoint-limit") - { - } - - ~ReadThermostatAbsMaxCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000006) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttribute { -public: - SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() - : SubscribeAttribute("abs-max-cool-setpoint-limit") - { - } - - ~SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000006) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - 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 subscribeAttributeAbsMaxCoolSetpointLimitWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute PICoolingDemand - */ -class ReadThermostatPICoolingDemand : public ReadAttribute { -public: - ReadThermostatPICoolingDemand() - : ReadAttribute("picooling-demand") - { - } - - ~ReadThermostatPICoolingDemand() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000007) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat PICoolingDemand read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { -public: - SubscribeAttributeThermostatPICoolingDemand() - : SubscribeAttribute("picooling-demand") - { - } - - ~SubscribeAttributeThermostatPICoolingDemand() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000007) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePICoolingDemandWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute PIHeatingDemand - */ -class ReadThermostatPIHeatingDemand : public ReadAttribute { -public: - ReadThermostatPIHeatingDemand() - : ReadAttribute("piheating-demand") - { - } - - ~ReadThermostatPIHeatingDemand() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000008) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat PIHeatingDemand read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { -public: - SubscribeAttributeThermostatPIHeatingDemand() - : SubscribeAttribute("piheating-demand") - { - } - - ~SubscribeAttributeThermostatPIHeatingDemand() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000008) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePIHeatingDemandWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute HVACSystemTypeConfiguration - */ -class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { -public: - ReadThermostatHVACSystemTypeConfiguration() - : ReadAttribute("hvacsystem-type-configuration") - { - } - - ~ReadThermostatHVACSystemTypeConfiguration() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000009) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { -public: - WriteThermostatHVACSystemTypeConfiguration() - : WriteAttribute("hvacsystem-type-configuration") - { - AddArgument("attr-name", "hvacsystem-type-configuration"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatHVACSystemTypeConfiguration() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000009) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster - writeAttributeHVACSystemTypeConfigurationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public SubscribeAttribute { -public: - SubscribeAttributeThermostatHVACSystemTypeConfiguration() - : SubscribeAttribute("hvacsystem-type-configuration") - { - } - - ~SubscribeAttributeThermostatHVACSystemTypeConfiguration() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000009) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeHVACSystemTypeConfigurationWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LocalTemperatureCalibration - */ -class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { -public: - ReadThermostatLocalTemperatureCalibration() - : ReadAttribute("local-temperature-calibration") - { - } - - ~ReadThermostatLocalTemperatureCalibration() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000010) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat LocalTemperatureCalibration read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { -public: - WriteThermostatLocalTemperatureCalibration() - : WriteAttribute("local-temperature-calibration") - { - AddArgument("attr-name", "local-temperature-calibration"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatLocalTemperatureCalibration() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000010) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; - - [cluster - writeAttributeLocalTemperatureCalibrationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat LocalTemperatureCalibration write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int8_t mValue; -}; - -class SubscribeAttributeThermostatLocalTemperatureCalibration : public SubscribeAttribute { -public: - SubscribeAttributeThermostatLocalTemperatureCalibration() - : SubscribeAttribute("local-temperature-calibration") - { - } - - ~SubscribeAttributeThermostatLocalTemperatureCalibration() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000010) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLocalTemperatureCalibrationWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OccupiedCoolingSetpoint - */ -class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { -public: - ReadThermostatOccupiedCoolingSetpoint() - : ReadAttribute("occupied-cooling-setpoint") - { - } - - ~ReadThermostatOccupiedCoolingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000011) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { -public: - WriteThermostatOccupiedCoolingSetpoint() - : WriteAttribute("occupied-cooling-setpoint") - { - AddArgument("attr-name", "occupied-cooling-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatOccupiedCoolingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000011) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster writeAttributeOccupiedCoolingSetpointWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttribute { -public: - SubscribeAttributeThermostatOccupiedCoolingSetpoint() - : SubscribeAttribute("occupied-cooling-setpoint") - { - } - - ~SubscribeAttributeThermostatOccupiedCoolingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000011) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOccupiedCoolingSetpointWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OccupiedHeatingSetpoint - */ -class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { -public: - ReadThermostatOccupiedHeatingSetpoint() - : ReadAttribute("occupied-heating-setpoint") - { - } - - ~ReadThermostatOccupiedHeatingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000012) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { -public: - WriteThermostatOccupiedHeatingSetpoint() - : WriteAttribute("occupied-heating-setpoint") - { - AddArgument("attr-name", "occupied-heating-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatOccupiedHeatingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000012) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster writeAttributeOccupiedHeatingSetpointWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttribute { -public: - SubscribeAttributeThermostatOccupiedHeatingSetpoint() - : SubscribeAttribute("occupied-heating-setpoint") - { - } - - ~SubscribeAttributeThermostatOccupiedHeatingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000012) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOccupiedHeatingSetpointWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute UnoccupiedCoolingSetpoint - */ -class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { -public: - ReadThermostatUnoccupiedCoolingSetpoint() - : ReadAttribute("unoccupied-cooling-setpoint") - { - } - - ~ReadThermostatUnoccupiedCoolingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000013) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { -public: - WriteThermostatUnoccupiedCoolingSetpoint() - : WriteAttribute("unoccupied-cooling-setpoint") - { - AddArgument("attr-name", "unoccupied-cooling-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUnoccupiedCoolingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000013) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster - writeAttributeUnoccupiedCoolingSetpointWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() - : SubscribeAttribute("unoccupied-cooling-setpoint") - { - } - - ~SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000013) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeUnoccupiedCoolingSetpointWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute UnoccupiedHeatingSetpoint - */ -class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { -public: - ReadThermostatUnoccupiedHeatingSetpoint() - : ReadAttribute("unoccupied-heating-setpoint") - { - } - - ~ReadThermostatUnoccupiedHeatingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000014) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { -public: - WriteThermostatUnoccupiedHeatingSetpoint() - : WriteAttribute("unoccupied-heating-setpoint") - { - AddArgument("attr-name", "unoccupied-heating-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUnoccupiedHeatingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000014) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster - writeAttributeUnoccupiedHeatingSetpointWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() - : SubscribeAttribute("unoccupied-heating-setpoint") - { - } - - ~SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000014) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeUnoccupiedHeatingSetpointWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinHeatSetpointLimit - */ -class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { -public: - ReadThermostatMinHeatSetpointLimit() - : ReadAttribute("min-heat-setpoint-limit") - { - } - - ~ReadThermostatMinHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000015) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat MinHeatSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { -public: - WriteThermostatMinHeatSetpointLimit() - : WriteAttribute("min-heat-setpoint-limit") - { - AddArgument("attr-name", "min-heat-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMinHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000015) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster writeAttributeMinHeatSetpointLimitWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinHeatSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribute { -public: - SubscribeAttributeThermostatMinHeatSetpointLimit() - : SubscribeAttribute("min-heat-setpoint-limit") - { - } - - ~SubscribeAttributeThermostatMinHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000015) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinHeatSetpointLimitWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxHeatSetpointLimit - */ -class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { -public: - ReadThermostatMaxHeatSetpointLimit() - : ReadAttribute("max-heat-setpoint-limit") - { - } - - ~ReadThermostatMaxHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000016) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { -public: - WriteThermostatMaxHeatSetpointLimit() - : WriteAttribute("max-heat-setpoint-limit") - { - AddArgument("attr-name", "max-heat-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMaxHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000016) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster writeAttributeMaxHeatSetpointLimitWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribute { -public: - SubscribeAttributeThermostatMaxHeatSetpointLimit() - : SubscribeAttribute("max-heat-setpoint-limit") - { - } - - ~SubscribeAttributeThermostatMaxHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000016) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxHeatSetpointLimitWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinCoolSetpointLimit - */ -class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { -public: - ReadThermostatMinCoolSetpointLimit() - : ReadAttribute("min-cool-setpoint-limit") - { - } - - ~ReadThermostatMinCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000017) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat MinCoolSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { -public: - WriteThermostatMinCoolSetpointLimit() - : WriteAttribute("min-cool-setpoint-limit") - { - AddArgument("attr-name", "min-cool-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMinCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000017) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster writeAttributeMinCoolSetpointLimitWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinCoolSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribute { -public: - SubscribeAttributeThermostatMinCoolSetpointLimit() - : SubscribeAttribute("min-cool-setpoint-limit") - { - } - - ~SubscribeAttributeThermostatMinCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000017) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinCoolSetpointLimitWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxCoolSetpointLimit - */ -class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { -public: - ReadThermostatMaxCoolSetpointLimit() - : ReadAttribute("max-cool-setpoint-limit") - { - } - - ~ReadThermostatMaxCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000018) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { -public: - WriteThermostatMaxCoolSetpointLimit() - : WriteAttribute("max-cool-setpoint-limit") - { - AddArgument("attr-name", "max-cool-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMaxCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000018) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster writeAttributeMaxCoolSetpointLimitWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribute { -public: - SubscribeAttributeThermostatMaxCoolSetpointLimit() - : SubscribeAttribute("max-cool-setpoint-limit") - { - } - - ~SubscribeAttributeThermostatMaxCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000018) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxCoolSetpointLimitWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinSetpointDeadBand - */ -class ReadThermostatMinSetpointDeadBand : public ReadAttribute { -public: - ReadThermostatMinSetpointDeadBand() - : ReadAttribute("min-setpoint-dead-band") - { - } - - ~ReadThermostatMinSetpointDeadBand() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000019) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat MinSetpointDeadBand read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatMinSetpointDeadBand : public WriteAttribute { -public: - WriteThermostatMinSetpointDeadBand() - : WriteAttribute("min-setpoint-dead-band") - { - AddArgument("attr-name", "min-setpoint-dead-band"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMinSetpointDeadBand() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000019) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; - - [cluster writeAttributeMinSetpointDeadBandWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinSetpointDeadBand write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int8_t mValue; -}; - -class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribute { -public: - SubscribeAttributeThermostatMinSetpointDeadBand() - : SubscribeAttribute("min-setpoint-dead-band") - { - } - - ~SubscribeAttributeThermostatMinSetpointDeadBand() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000019) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinSetpointDeadBandWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute RemoteSensing - */ -class ReadThermostatRemoteSensing : public ReadAttribute { -public: - ReadThermostatRemoteSensing() - : ReadAttribute("remote-sensing") - { - } - - ~ReadThermostatRemoteSensing() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.RemoteSensing response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat RemoteSensing read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatRemoteSensing : public WriteAttribute { -public: - WriteThermostatRemoteSensing() - : WriteAttribute("remote-sensing") - { - AddArgument("attr-name", "remote-sensing"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatRemoteSensing() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeRemoteSensingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat RemoteSensing write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { -public: - SubscribeAttributeThermostatRemoteSensing() - : SubscribeAttribute("remote-sensing") - { - } - - ~SubscribeAttributeThermostatRemoteSensing() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeRemoteSensingWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.RemoteSensing response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ControlSequenceOfOperation - */ -class ReadThermostatControlSequenceOfOperation : public ReadAttribute { -public: - ReadThermostatControlSequenceOfOperation() - : ReadAttribute("control-sequence-of-operation") - { - } - - ~ReadThermostatControlSequenceOfOperation() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001B) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ControlSequenceOfOperation read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatControlSequenceOfOperation : public WriteAttribute { -public: - WriteThermostatControlSequenceOfOperation() - : WriteAttribute("control-sequence-of-operation") - { - AddArgument("attr-name", "control-sequence-of-operation"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatControlSequenceOfOperation() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001B) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster - writeAttributeControlSequenceOfOperationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ControlSequenceOfOperation write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeAttribute { -public: - SubscribeAttributeThermostatControlSequenceOfOperation() - : SubscribeAttribute("control-sequence-of-operation") - { - } - - ~SubscribeAttributeThermostatControlSequenceOfOperation() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001B) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeControlSequenceOfOperationWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SystemMode - */ -class ReadThermostatSystemMode : public ReadAttribute { -public: - ReadThermostatSystemMode() - : ReadAttribute("system-mode") - { - } - - ~ReadThermostatSystemMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001C) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SystemMode response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat SystemMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatSystemMode : public WriteAttribute { -public: - WriteThermostatSystemMode() - : WriteAttribute("system-mode") - { - AddArgument("attr-name", "system-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatSystemMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001C) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeSystemModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat SystemMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { -public: - SubscribeAttributeThermostatSystemMode() - : SubscribeAttribute("system-mode") - { - } - - ~SubscribeAttributeThermostatSystemMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001C) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSystemModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SystemMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ThermostatRunningMode - */ -class ReadThermostatThermostatRunningMode : public ReadAttribute { -public: - ReadThermostatThermostatRunningMode() - : ReadAttribute("thermostat-running-mode") - { - } - - ~ReadThermostatThermostatRunningMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001E) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ThermostatRunningMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttribute { -public: - SubscribeAttributeThermostatThermostatRunningMode() - : SubscribeAttribute("thermostat-running-mode") - { - } - - ~SubscribeAttributeThermostatThermostatRunningMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001E) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeThermostatRunningModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute StartOfWeek - */ -class ReadThermostatStartOfWeek : public ReadAttribute { -public: - ReadThermostatStartOfWeek() - : ReadAttribute("start-of-week") - { - } - - ~ReadThermostatStartOfWeek() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000020) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.StartOfWeek response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat StartOfWeek read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { -public: - SubscribeAttributeThermostatStartOfWeek() - : SubscribeAttribute("start-of-week") - { - } - - ~SubscribeAttributeThermostatStartOfWeek() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000020) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeStartOfWeekWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.StartOfWeek response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfWeeklyTransitions - */ -class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { -public: - ReadThermostatNumberOfWeeklyTransitions() - : ReadAttribute("number-of-weekly-transitions") - { - } - - ~ReadThermostatNumberOfWeeklyTransitions() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000021) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAttribute { -public: - SubscribeAttributeThermostatNumberOfWeeklyTransitions() - : SubscribeAttribute("number-of-weekly-transitions") - { - } - - ~SubscribeAttributeThermostatNumberOfWeeklyTransitions() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000021) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfWeeklyTransitionsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfDailyTransitions - */ -class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { -public: - ReadThermostatNumberOfDailyTransitions() - : ReadAttribute("number-of-daily-transitions") - { - } - - ~ReadThermostatNumberOfDailyTransitions() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000022) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat NumberOfDailyTransitions read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAttribute { -public: - SubscribeAttributeThermostatNumberOfDailyTransitions() - : SubscribeAttribute("number-of-daily-transitions") - { - } - - ~SubscribeAttributeThermostatNumberOfDailyTransitions() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000022) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfDailyTransitionsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute TemperatureSetpointHold - */ -class ReadThermostatTemperatureSetpointHold : public ReadAttribute { -public: - ReadThermostatTemperatureSetpointHold() - : ReadAttribute("temperature-setpoint-hold") - { - } - - ~ReadThermostatTemperatureSetpointHold() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000023) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHold read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatTemperatureSetpointHold : public WriteAttribute { -public: - WriteThermostatTemperatureSetpointHold() - : WriteAttribute("temperature-setpoint-hold") - { - AddArgument("attr-name", "temperature-setpoint-hold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatTemperatureSetpointHold() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000023) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeTemperatureSetpointHoldWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHold write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttribute { -public: - SubscribeAttributeThermostatTemperatureSetpointHold() - : SubscribeAttribute("temperature-setpoint-hold") - { - } - - ~SubscribeAttributeThermostatTemperatureSetpointHold() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000023) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeTemperatureSetpointHoldWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute TemperatureSetpointHoldDuration - */ -class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { -public: - ReadThermostatTemperatureSetpointHoldDuration() - : ReadAttribute("temperature-setpoint-hold-duration") - { - } - - ~ReadThermostatTemperatureSetpointHoldDuration() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000024) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { -public: - WriteThermostatTemperatureSetpointHoldDuration() - : WriteAttribute("temperature-setpoint-hold-duration") - { - AddArgument("attr-name", "temperature-setpoint-hold-duration"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatTemperatureSetpointHoldDuration() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000024) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributeTemperatureSetpointHoldDurationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public SubscribeAttribute { -public: - SubscribeAttributeThermostatTemperatureSetpointHoldDuration() - : SubscribeAttribute("temperature-setpoint-hold-duration") - { - } - - ~SubscribeAttributeThermostatTemperatureSetpointHoldDuration() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000024) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeTemperatureSetpointHoldDurationWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ThermostatProgrammingOperationMode - */ -class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { -public: - ReadThermostatThermostatProgrammingOperationMode() - : ReadAttribute("thermostat-programming-operation-mode") - { - } - - ~ReadThermostatThermostatProgrammingOperationMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000025) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute { -public: - WriteThermostatThermostatProgrammingOperationMode() - : WriteAttribute("thermostat-programming-operation-mode") - { - AddArgument("attr-name", "thermostat-programming-operation-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatThermostatProgrammingOperationMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000025) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster - writeAttributeThermostatProgrammingOperationModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "Thermostat ThermostatProgrammingOperationMode write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public SubscribeAttribute { -public: - SubscribeAttributeThermostatThermostatProgrammingOperationMode() - : SubscribeAttribute("thermostat-programming-operation-mode") - { - } - - ~SubscribeAttributeThermostatThermostatProgrammingOperationMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000025) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeThermostatProgrammingOperationModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ThermostatRunningState - */ -class ReadThermostatThermostatRunningState : public ReadAttribute { -public: - ReadThermostatThermostatRunningState() - : ReadAttribute("thermostat-running-state") - { - } - - ~ReadThermostatThermostatRunningState() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000029) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ThermostatRunningState read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttribute { -public: - SubscribeAttributeThermostatThermostatRunningState() - : SubscribeAttribute("thermostat-running-state") - { - } - - ~SubscribeAttributeThermostatThermostatRunningState() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000029) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeThermostatRunningStateWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SetpointChangeSource - */ -class ReadThermostatSetpointChangeSource : public ReadAttribute { -public: - ReadThermostatSetpointChangeSource() - : ReadAttribute("setpoint-change-source") - { - } - - ~ReadThermostatSetpointChangeSource() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000030) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat SetpointChangeSource read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribute { -public: - SubscribeAttributeThermostatSetpointChangeSource() - : SubscribeAttribute("setpoint-change-source") - { - } - - ~SubscribeAttributeThermostatSetpointChangeSource() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000030) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSetpointChangeSourceWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SetpointChangeAmount - */ -class ReadThermostatSetpointChangeAmount : public ReadAttribute { -public: - ReadThermostatSetpointChangeAmount() - : ReadAttribute("setpoint-change-amount") - { - } - - ~ReadThermostatSetpointChangeAmount() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000031) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat SetpointChangeAmount read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribute { -public: - SubscribeAttributeThermostatSetpointChangeAmount() - : SubscribeAttribute("setpoint-change-amount") - { - } - - ~SubscribeAttributeThermostatSetpointChangeAmount() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000031) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSetpointChangeAmountWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SetpointChangeSourceTimestamp - */ -class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { -public: - ReadThermostatSetpointChangeSourceTimestamp() - : ReadAttribute("setpoint-change-source-timestamp") - { - } - - ~ReadThermostatSetpointChangeSourceTimestamp() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000032) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public SubscribeAttribute { -public: - SubscribeAttributeThermostatSetpointChangeSourceTimestamp() - : SubscribeAttribute("setpoint-change-source-timestamp") - { - } - - ~SubscribeAttributeThermostatSetpointChangeSourceTimestamp() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000032) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSetpointChangeSourceTimestampWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OccupiedSetback - */ -class ReadThermostatOccupiedSetback : public ReadAttribute { -public: - ReadThermostatOccupiedSetback() - : ReadAttribute("occupied-setback") - { - } - - ~ReadThermostatOccupiedSetback() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000034) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat OccupiedSetback read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatOccupiedSetback : public WriteAttribute { -public: - WriteThermostatOccupiedSetback() - : WriteAttribute("occupied-setback") - { - AddArgument("attr-name", "occupied-setback"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatOccupiedSetback() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000034) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOccupiedSetbackWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedSetback write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { -public: - SubscribeAttributeThermostatOccupiedSetback() - : SubscribeAttribute("occupied-setback") - { - } - - ~SubscribeAttributeThermostatOccupiedSetback() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000034) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOccupiedSetbackWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OccupiedSetbackMin - */ -class ReadThermostatOccupiedSetbackMin : public ReadAttribute { -public: - ReadThermostatOccupiedSetbackMin() - : ReadAttribute("occupied-setback-min") - { - } - - ~ReadThermostatOccupiedSetbackMin() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000035) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat OccupiedSetbackMin read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute { -public: - SubscribeAttributeThermostatOccupiedSetbackMin() - : SubscribeAttribute("occupied-setback-min") - { - } - - ~SubscribeAttributeThermostatOccupiedSetbackMin() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000035) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOccupiedSetbackMinWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OccupiedSetbackMax - */ -class ReadThermostatOccupiedSetbackMax : public ReadAttribute { -public: - ReadThermostatOccupiedSetbackMax() - : ReadAttribute("occupied-setback-max") - { - } - - ~ReadThermostatOccupiedSetbackMax() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000036) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat OccupiedSetbackMax read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute { -public: - SubscribeAttributeThermostatOccupiedSetbackMax() - : SubscribeAttribute("occupied-setback-max") - { - } - - ~SubscribeAttributeThermostatOccupiedSetbackMax() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000036) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOccupiedSetbackMaxWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute UnoccupiedSetback - */ -class ReadThermostatUnoccupiedSetback : public ReadAttribute { -public: - ReadThermostatUnoccupiedSetback() - : ReadAttribute("unoccupied-setback") - { - } - - ~ReadThermostatUnoccupiedSetback() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000037) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat UnoccupiedSetback read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUnoccupiedSetback : public WriteAttribute { -public: - WriteThermostatUnoccupiedSetback() - : WriteAttribute("unoccupied-setback") - { - AddArgument("attr-name", "unoccupied-setback"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUnoccupiedSetback() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000037) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeUnoccupiedSetbackWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedSetback write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUnoccupiedSetback() - : SubscribeAttribute("unoccupied-setback") - { - } - - ~SubscribeAttributeThermostatUnoccupiedSetback() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000037) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeUnoccupiedSetbackWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute UnoccupiedSetbackMin - */ -class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { -public: - ReadThermostatUnoccupiedSetbackMin() - : ReadAttribute("unoccupied-setback-min") - { - } - - ~ReadThermostatUnoccupiedSetbackMin() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000038) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUnoccupiedSetbackMin() - : SubscribeAttribute("unoccupied-setback-min") - { - } - - ~SubscribeAttributeThermostatUnoccupiedSetbackMin() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000038) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeUnoccupiedSetbackMinWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute UnoccupiedSetbackMax - */ -class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { -public: - ReadThermostatUnoccupiedSetbackMax() - : ReadAttribute("unoccupied-setback-max") - { - } - - ~ReadThermostatUnoccupiedSetbackMax() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000039) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUnoccupiedSetbackMax() - : SubscribeAttribute("unoccupied-setback-max") - { - } - - ~SubscribeAttributeThermostatUnoccupiedSetbackMax() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000039) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeUnoccupiedSetbackMaxWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EmergencyHeatDelta - */ -class ReadThermostatEmergencyHeatDelta : public ReadAttribute { -public: - ReadThermostatEmergencyHeatDelta() - : ReadAttribute("emergency-heat-delta") - { - } - - ~ReadThermostatEmergencyHeatDelta() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000003A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat EmergencyHeatDelta read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatEmergencyHeatDelta : public WriteAttribute { -public: - WriteThermostatEmergencyHeatDelta() - : WriteAttribute("emergency-heat-delta") - { - AddArgument("attr-name", "emergency-heat-delta"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatEmergencyHeatDelta() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000003A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeEmergencyHeatDeltaWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat EmergencyHeatDelta write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute { -public: - SubscribeAttributeThermostatEmergencyHeatDelta() - : SubscribeAttribute("emergency-heat-delta") - { - } - - ~SubscribeAttributeThermostatEmergencyHeatDelta() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000003A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEmergencyHeatDeltaWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ACType - */ -class ReadThermostatACType : public ReadAttribute { -public: - ReadThermostatACType() - : ReadAttribute("actype") - { - } - - ~ReadThermostatACType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000040) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACType response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ACType read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACType : public WriteAttribute { -public: - WriteThermostatACType() - : WriteAttribute("actype") - { - AddArgument("attr-name", "actype"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000040) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACTypeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACType write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatACType : public SubscribeAttribute { -public: - SubscribeAttributeThermostatACType() - : SubscribeAttribute("actype") - { - } - - ~SubscribeAttributeThermostatACType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000040) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeACTypeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACType response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ACCapacity - */ -class ReadThermostatACCapacity : public ReadAttribute { -public: - ReadThermostatACCapacity() - : ReadAttribute("accapacity") - { - } - - ~ReadThermostatACCapacity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000041) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacity response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ACCapacity read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACCapacity : public WriteAttribute { -public: - WriteThermostatACCapacity() - : WriteAttribute("accapacity") - { - AddArgument("attr-name", "accapacity"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCapacity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000041) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeACCapacityWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCapacity write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { -public: - SubscribeAttributeThermostatACCapacity() - : SubscribeAttribute("accapacity") - { - } - - ~SubscribeAttributeThermostatACCapacity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000041) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeACCapacityWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacity response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ACRefrigerantType - */ -class ReadThermostatACRefrigerantType : public ReadAttribute { -public: - ReadThermostatACRefrigerantType() - : ReadAttribute("acrefrigerant-type") - { - } - - ~ReadThermostatACRefrigerantType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000042) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ACRefrigerantType read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACRefrigerantType : public WriteAttribute { -public: - WriteThermostatACRefrigerantType() - : WriteAttribute("acrefrigerant-type") - { - AddArgument("attr-name", "acrefrigerant-type"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACRefrigerantType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000042) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACRefrigerantTypeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACRefrigerantType write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute { -public: - SubscribeAttributeThermostatACRefrigerantType() - : SubscribeAttribute("acrefrigerant-type") - { - } - - ~SubscribeAttributeThermostatACRefrigerantType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000042) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeACRefrigerantTypeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ACCompressorType - */ -class ReadThermostatACCompressorType : public ReadAttribute { -public: - ReadThermostatACCompressorType() - : ReadAttribute("accompressor-type") - { - } - - ~ReadThermostatACCompressorType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000043) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCompressorType response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ACCompressorType read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACCompressorType : public WriteAttribute { -public: - WriteThermostatACCompressorType() - : WriteAttribute("accompressor-type") - { - AddArgument("attr-name", "accompressor-type"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCompressorType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000043) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACCompressorTypeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCompressorType write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { -public: - SubscribeAttributeThermostatACCompressorType() - : SubscribeAttribute("accompressor-type") - { - } - - ~SubscribeAttributeThermostatACCompressorType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000043) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeACCompressorTypeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCompressorType response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ACErrorCode - */ -class ReadThermostatACErrorCode : public ReadAttribute { -public: - ReadThermostatACErrorCode() - : ReadAttribute("acerror-code") - { - } - - ~ReadThermostatACErrorCode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000044) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACErrorCode response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ACErrorCode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACErrorCode : public WriteAttribute { -public: - WriteThermostatACErrorCode() - : WriteAttribute("acerror-code") - { - AddArgument("attr-name", "acerror-code"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACErrorCode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000044) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeACErrorCodeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACErrorCode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { -public: - SubscribeAttributeThermostatACErrorCode() - : SubscribeAttribute("acerror-code") - { - } - - ~SubscribeAttributeThermostatACErrorCode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000044) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeACErrorCodeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACErrorCode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ACLouverPosition - */ -class ReadThermostatACLouverPosition : public ReadAttribute { -public: - ReadThermostatACLouverPosition() - : ReadAttribute("aclouver-position") - { - } - - ~ReadThermostatACLouverPosition() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000045) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ACLouverPosition read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACLouverPosition : public WriteAttribute { -public: - WriteThermostatACLouverPosition() - : WriteAttribute("aclouver-position") - { - AddArgument("attr-name", "aclouver-position"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACLouverPosition() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000045) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACLouverPositionWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACLouverPosition write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { -public: - SubscribeAttributeThermostatACLouverPosition() - : SubscribeAttribute("aclouver-position") - { - } - - ~SubscribeAttributeThermostatACLouverPosition() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000045) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeACLouverPositionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ACCoilTemperature - */ -class ReadThermostatACCoilTemperature : public ReadAttribute { -public: - ReadThermostatACCoilTemperature() - : ReadAttribute("accoil-temperature") - { - } - - ~ReadThermostatACCoilTemperature() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000046) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ACCoilTemperature read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute { -public: - SubscribeAttributeThermostatACCoilTemperature() - : SubscribeAttribute("accoil-temperature") - { - } - - ~SubscribeAttributeThermostatACCoilTemperature() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000046) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeACCoilTemperatureWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ACCapacityformat - */ -class ReadThermostatACCapacityformat : public ReadAttribute { -public: - ReadThermostatACCapacityformat() - : ReadAttribute("accapacityformat") - { - } - - ~ReadThermostatACCapacityformat() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000047) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ACCapacityformat read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACCapacityformat : public WriteAttribute { -public: - WriteThermostatACCapacityformat() - : WriteAttribute("accapacityformat") - { - AddArgument("attr-name", "accapacityformat"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCapacityformat() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000047) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACCapacityformatWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCapacityformat write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { -public: - SubscribeAttributeThermostatACCapacityformat() - : SubscribeAttribute("accapacityformat") - { - } - - ~SubscribeAttributeThermostatACCapacityformat() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000047) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeACCapacityformatWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadThermostatGeneratedCommandList : public ReadAttribute { -public: - ReadThermostatGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadThermostatGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeThermostatGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeThermostatGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadThermostatAcceptedCommandList : public ReadAttribute { -public: - ReadThermostatAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadThermostatAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeThermostatAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeThermostatAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EventList - */ -class ReadThermostatEventList : public ReadAttribute { -public: - ReadThermostatEventList() - : ReadAttribute("event-list") - { - } - - ~ReadThermostatEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EventList response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatEventList : public SubscribeAttribute { -public: - SubscribeAttributeThermostatEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeThermostatEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AttributeList - */ -class ReadThermostatAttributeList : public ReadAttribute { -public: - ReadThermostatAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadThermostatAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeThermostatAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeThermostatAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadThermostatFeatureMap : public ReadAttribute { -public: - ReadThermostatFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadThermostatFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeThermostatFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeThermostatFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.FeatureMap response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadThermostatClusterRevision : public ReadAttribute { -public: - ReadThermostatClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadThermostatClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeThermostatClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeThermostatClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster FanControl | 0x0202 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Step | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * FanMode | 0x0000 | -| * FanModeSequence | 0x0001 | -| * PercentSetting | 0x0002 | -| * PercentCurrent | 0x0003 | -| * SpeedMax | 0x0004 | -| * SpeedSetting | 0x0005 | -| * SpeedCurrent | 0x0006 | -| * RockSupport | 0x0007 | -| * RockSetting | 0x0008 | -| * WindSupport | 0x0009 | -| * WindSetting | 0x000A | -| * AirflowDirection | 0x000B | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command Step - */ -class FanControlStep : public ClusterCommand { -public: - FanControlStep() - : ClusterCommand("step") - { - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("Wrap", 0, 1, &mRequest.wrap); - AddArgument("LowestOff", 0, 1, &mRequest.lowestOff); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRFanControlClusterStepParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - if (mRequest.wrap.HasValue()) { - params.wrap = [NSNumber numberWithBool:mRequest.wrap.Value()]; - } else { - params.wrap = nil; - } - if (mRequest.lowestOff.HasValue()) { - params.lowestOff = [NSNumber numberWithBool:mRequest.lowestOff.Value()]; - } else { - params.lowestOff = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::FanControl::Commands::Step::Type mRequest; -}; - -/* - * Attribute FanMode - */ -class ReadFanControlFanMode : public ReadAttribute { -public: - ReadFanControlFanMode() - : ReadAttribute("fan-mode") - { - } - - ~ReadFanControlFanMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanMode response %@", [value description]); - if (error != nil) { - LogNSError("FanControl FanMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteFanControlFanMode : public WriteAttribute { -public: - WriteFanControlFanMode() - : WriteAttribute("fan-mode") - { - AddArgument("attr-name", "fan-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlFanMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeFanModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl FanMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { -public: - SubscribeAttributeFanControlFanMode() - : SubscribeAttribute("fan-mode") - { - } - - ~SubscribeAttributeFanControlFanMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFanModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FanModeSequence - */ -class ReadFanControlFanModeSequence : public ReadAttribute { -public: - ReadFanControlFanModeSequence() - : ReadAttribute("fan-mode-sequence") - { - } - - ~ReadFanControlFanModeSequence() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanModeSequence response %@", [value description]); - if (error != nil) { - LogNSError("FanControl FanModeSequence read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteFanControlFanModeSequence : public WriteAttribute { -public: - WriteFanControlFanModeSequence() - : WriteAttribute("fan-mode-sequence") - { - AddArgument("attr-name", "fan-mode-sequence"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlFanModeSequence() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeFanModeSequenceWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl FanModeSequence write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { -public: - SubscribeAttributeFanControlFanModeSequence() - : SubscribeAttribute("fan-mode-sequence") - { - } - - ~SubscribeAttributeFanControlFanModeSequence() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFanModeSequenceWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanModeSequence response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute PercentSetting - */ -class ReadFanControlPercentSetting : public ReadAttribute { -public: - ReadFanControlPercentSetting() - : ReadAttribute("percent-setting") - { - } - - ~ReadFanControlPercentSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentSetting response %@", [value description]); - if (error != nil) { - LogNSError("FanControl PercentSetting read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteFanControlPercentSetting : public WriteAttribute { -public: - WriteFanControlPercentSetting() - : WriteAttribute("percent-setting") - { - AddArgument("attr-name", "percent-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlPercentSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributePercentSettingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl PercentSetting write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::Percent mValue; -}; - -class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { -public: - SubscribeAttributeFanControlPercentSetting() - : SubscribeAttribute("percent-setting") - { - } - - ~SubscribeAttributeFanControlPercentSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePercentSettingWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentSetting response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute PercentCurrent - */ -class ReadFanControlPercentCurrent : public ReadAttribute { -public: - ReadFanControlPercentCurrent() - : ReadAttribute("percent-current") - { - } - - ~ReadFanControlPercentCurrent() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentCurrent response %@", [value description]); - if (error != nil) { - LogNSError("FanControl PercentCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { -public: - SubscribeAttributeFanControlPercentCurrent() - : SubscribeAttribute("percent-current") - { - } - - ~SubscribeAttributeFanControlPercentCurrent() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000003) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePercentCurrentWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentCurrent response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SpeedMax - */ -class ReadFanControlSpeedMax : public ReadAttribute { -public: - ReadFanControlSpeedMax() - : ReadAttribute("speed-max") - { - } - - ~ReadFanControlSpeedMax() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000004) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedMax response %@", [value description]); - if (error != nil) { - LogNSError("FanControl SpeedMax read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { -public: - SubscribeAttributeFanControlSpeedMax() - : SubscribeAttribute("speed-max") - { - } - - ~SubscribeAttributeFanControlSpeedMax() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000004) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSpeedMaxWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedMax response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SpeedSetting - */ -class ReadFanControlSpeedSetting : public ReadAttribute { -public: - ReadFanControlSpeedSetting() - : ReadAttribute("speed-setting") - { - } - - ~ReadFanControlSpeedSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000005) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedSetting response %@", [value description]); - if (error != nil) { - LogNSError("FanControl SpeedSetting read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteFanControlSpeedSetting : public WriteAttribute { -public: - WriteFanControlSpeedSetting() - : WriteAttribute("speed-setting") - { - AddArgument("attr-name", "speed-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlSpeedSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000005) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeSpeedSettingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl SpeedSetting write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { -public: - SubscribeAttributeFanControlSpeedSetting() - : SubscribeAttribute("speed-setting") - { - } - - ~SubscribeAttributeFanControlSpeedSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000005) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSpeedSettingWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedSetting response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SpeedCurrent - */ -class ReadFanControlSpeedCurrent : public ReadAttribute { -public: - ReadFanControlSpeedCurrent() - : ReadAttribute("speed-current") - { - } - - ~ReadFanControlSpeedCurrent() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000006) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedCurrent response %@", [value description]); - if (error != nil) { - LogNSError("FanControl SpeedCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { -public: - SubscribeAttributeFanControlSpeedCurrent() - : SubscribeAttribute("speed-current") - { - } - - ~SubscribeAttributeFanControlSpeedCurrent() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000006) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSpeedCurrentWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedCurrent response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute RockSupport - */ -class ReadFanControlRockSupport : public ReadAttribute { -public: - ReadFanControlRockSupport() - : ReadAttribute("rock-support") - { - } - - ~ReadFanControlRockSupport() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000007) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSupport response %@", [value description]); - if (error != nil) { - LogNSError("FanControl RockSupport read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { -public: - SubscribeAttributeFanControlRockSupport() - : SubscribeAttribute("rock-support") - { - } - - ~SubscribeAttributeFanControlRockSupport() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000007) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeRockSupportWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSupport response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute RockSetting - */ -class ReadFanControlRockSetting : public ReadAttribute { -public: - ReadFanControlRockSetting() - : ReadAttribute("rock-setting") - { - } - - ~ReadFanControlRockSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000008) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSetting response %@", [value description]); - if (error != nil) { - LogNSError("FanControl RockSetting read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteFanControlRockSetting : public WriteAttribute { -public: - WriteFanControlRockSetting() - : WriteAttribute("rock-setting") - { - AddArgument("attr-name", "rock-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlRockSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000008) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeRockSettingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl RockSetting write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { -public: - SubscribeAttributeFanControlRockSetting() - : SubscribeAttribute("rock-setting") - { - } - - ~SubscribeAttributeFanControlRockSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000008) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeRockSettingWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSetting response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute WindSupport - */ -class ReadFanControlWindSupport : public ReadAttribute { -public: - ReadFanControlWindSupport() - : ReadAttribute("wind-support") - { - } - - ~ReadFanControlWindSupport() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000009) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSupport response %@", [value description]); - if (error != nil) { - LogNSError("FanControl WindSupport read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { -public: - SubscribeAttributeFanControlWindSupport() - : SubscribeAttribute("wind-support") - { - } - - ~SubscribeAttributeFanControlWindSupport() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000009) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeWindSupportWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSupport response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute WindSetting - */ -class ReadFanControlWindSetting : public ReadAttribute { -public: - ReadFanControlWindSetting() - : ReadAttribute("wind-setting") - { - } - - ~ReadFanControlWindSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000000A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSetting response %@", [value description]); - if (error != nil) { - LogNSError("FanControl WindSetting read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteFanControlWindSetting : public WriteAttribute { -public: - WriteFanControlWindSetting() - : WriteAttribute("wind-setting") - { - AddArgument("attr-name", "wind-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlWindSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x0000000A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeWindSettingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl WindSetting write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { -public: - SubscribeAttributeFanControlWindSetting() - : SubscribeAttribute("wind-setting") - { - } - - ~SubscribeAttributeFanControlWindSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000000A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeWindSettingWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSetting response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AirflowDirection - */ -class ReadFanControlAirflowDirection : public ReadAttribute { -public: - ReadFanControlAirflowDirection() - : ReadAttribute("airflow-direction") - { - } - - ~ReadFanControlAirflowDirection() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000000B) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAirflowDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AirflowDirection response %@", [value description]); - if (error != nil) { - LogNSError("FanControl AirflowDirection read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteFanControlAirflowDirection : public WriteAttribute { -public: - WriteFanControlAirflowDirection() - : WriteAttribute("airflow-direction") - { - AddArgument("attr-name", "airflow-direction"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlAirflowDirection() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x0000000B) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeAirflowDirectionWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl AirflowDirection write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeFanControlAirflowDirection : public SubscribeAttribute { -public: - SubscribeAttributeFanControlAirflowDirection() - : SubscribeAttribute("airflow-direction") - { - } - - ~SubscribeAttributeFanControlAirflowDirection() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000000B) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAirflowDirectionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AirflowDirection response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadFanControlGeneratedCommandList : public ReadAttribute { -public: - ReadFanControlGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadFanControlGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("FanControl GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeFanControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeFanControlGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadFanControlAcceptedCommandList : public ReadAttribute { -public: - ReadFanControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadFanControlAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("FanControl AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeFanControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeFanControlAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EventList - */ -class ReadFanControlEventList : public ReadAttribute { -public: - ReadFanControlEventList() - : ReadAttribute("event-list") - { - } - - ~ReadFanControlEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.EventList response %@", [value description]); - if (error != nil) { - LogNSError("FanControl EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlEventList : public SubscribeAttribute { -public: - SubscribeAttributeFanControlEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeFanControlEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AttributeList - */ -class ReadFanControlAttributeList : public ReadAttribute { -public: - ReadFanControlAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadFanControlAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("FanControl AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeFanControlAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeFanControlAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadFanControlFeatureMap : public ReadAttribute { -public: - ReadFanControlFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadFanControlFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("FanControl FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeFanControlFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeFanControlFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FeatureMap response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadFanControlClusterRevision : public ReadAttribute { -public: - ReadFanControlClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadFanControlClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("FanControl ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeFanControlClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeFanControlClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TemperatureDisplayMode | 0x0000 | -| * KeypadLockout | 0x0001 | -| * ScheduleProgrammingVisibility | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute TemperatureDisplayMode - */ -class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() - : ReadAttribute("temperature-display-mode") - { - } - - ~ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public WriteAttribute { -public: - WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() - : WriteAttribute("temperature-display-mode") - { - AddArgument("attr-name", "temperature-display-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeTemperatureDisplayModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration " - "TemperatureDisplayMode write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() - : SubscribeAttribute("temperature-display-mode") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeTemperatureDisplayModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute KeypadLockout - */ -class ReadThermostatUserInterfaceConfigurationKeypadLockout : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationKeypadLockout() - : ReadAttribute("keypad-lockout") - { - } - - ~ReadThermostatUserInterfaceConfigurationKeypadLockout() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttribute { -public: - WriteThermostatUserInterfaceConfigurationKeypadLockout() - : WriteAttribute("keypad-lockout") - { - AddArgument("attr-name", "keypad-lockout"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationKeypadLockout() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster - writeAttributeKeypadLockoutWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() - : SubscribeAttribute("keypad-lockout") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeKeypadLockoutWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ScheduleProgrammingVisibility - */ -class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - : ReadAttribute("schedule-programming-visibility") - { - } - - ~ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public WriteAttribute { -public: - WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - : WriteAttribute("schedule-programming-visibility") - { - AddArgument("attr-name", "schedule-programming-visibility"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeScheduleProgrammingVisibilityWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration " - "ScheduleProgrammingVisibility write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - : SubscribeAttribute("schedule-programming-visibility") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeScheduleProgrammingVisibilityWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadThermostatUserInterfaceConfigurationGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadThermostatUserInterfaceConfigurationAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EventList - */ -class ReadThermostatUserInterfaceConfigurationEventList : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationEventList() - : ReadAttribute("event-list") - { - } - - ~ReadThermostatUserInterfaceConfigurationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationEventList : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AttributeList - */ -class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadThermostatUserInterfaceConfigurationAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadThermostatUserInterfaceConfigurationFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadThermostatUserInterfaceConfigurationClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ColorControl | 0x0300 | -|------------------------------------------------------------------------------| -| Commands: | | -| * MoveToHue | 0x00 | -| * MoveHue | 0x01 | -| * StepHue | 0x02 | -| * MoveToSaturation | 0x03 | -| * MoveSaturation | 0x04 | -| * StepSaturation | 0x05 | -| * MoveToHueAndSaturation | 0x06 | -| * MoveToColor | 0x07 | -| * MoveColor | 0x08 | -| * StepColor | 0x09 | -| * MoveToColorTemperature | 0x0A | -| * EnhancedMoveToHue | 0x40 | -| * EnhancedMoveHue | 0x41 | -| * EnhancedStepHue | 0x42 | -| * EnhancedMoveToHueAndSaturation | 0x43 | -| * ColorLoopSet | 0x44 | -| * StopMoveStep | 0x47 | -| * MoveColorTemperature | 0x4B | -| * StepColorTemperature | 0x4C | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CurrentHue | 0x0000 | -| * CurrentSaturation | 0x0001 | -| * RemainingTime | 0x0002 | -| * CurrentX | 0x0003 | -| * CurrentY | 0x0004 | -| * DriftCompensation | 0x0005 | -| * CompensationText | 0x0006 | -| * ColorTemperatureMireds | 0x0007 | -| * ColorMode | 0x0008 | -| * Options | 0x000F | -| * NumberOfPrimaries | 0x0010 | -| * Primary1X | 0x0011 | -| * Primary1Y | 0x0012 | -| * Primary1Intensity | 0x0013 | -| * Primary2X | 0x0015 | -| * Primary2Y | 0x0016 | -| * Primary2Intensity | 0x0017 | -| * Primary3X | 0x0019 | -| * Primary3Y | 0x001A | -| * Primary3Intensity | 0x001B | -| * Primary4X | 0x0020 | -| * Primary4Y | 0x0021 | -| * Primary4Intensity | 0x0022 | -| * Primary5X | 0x0024 | -| * Primary5Y | 0x0025 | -| * Primary5Intensity | 0x0026 | -| * Primary6X | 0x0028 | -| * Primary6Y | 0x0029 | -| * Primary6Intensity | 0x002A | -| * WhitePointX | 0x0030 | -| * WhitePointY | 0x0031 | -| * ColorPointRX | 0x0032 | -| * ColorPointRY | 0x0033 | -| * ColorPointRIntensity | 0x0034 | -| * ColorPointGX | 0x0036 | -| * ColorPointGY | 0x0037 | -| * ColorPointGIntensity | 0x0038 | -| * ColorPointBX | 0x003A | -| * ColorPointBY | 0x003B | -| * ColorPointBIntensity | 0x003C | -| * EnhancedCurrentHue | 0x4000 | -| * EnhancedColorMode | 0x4001 | -| * ColorLoopActive | 0x4002 | -| * ColorLoopDirection | 0x4003 | -| * ColorLoopTime | 0x4004 | -| * ColorLoopStartEnhancedHue | 0x4005 | -| * ColorLoopStoredEnhancedHue | 0x4006 | -| * ColorCapabilities | 0x400A | -| * ColorTempPhysicalMinMireds | 0x400B | -| * ColorTempPhysicalMaxMireds | 0x400C | -| * CoupleColorTempToLevelMinMireds | 0x400D | -| * StartUpColorTemperatureMireds | 0x4010 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command MoveToHue - */ -class ColorControlMoveToHue : public ClusterCommand { -public: - ColorControlMoveToHue() - : ClusterCommand("move-to-hue") - { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type mRequest; -}; - -/* - * Command MoveHue - */ -class ColorControlMoveHue : public ClusterCommand { -public: - ColorControlMoveHue() - : ClusterCommand("move-hue") - { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveHue::Type mRequest; -}; - -/* - * Command StepHue - */ -class ColorControlStepHue : public ClusterCommand { -public: - ColorControlStepHue() - : ClusterCommand("step-hue") - { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::StepHue::Type mRequest; -}; - -/* - * Command MoveToSaturation - */ -class ColorControlMoveToSaturation : public ClusterCommand { -public: - ColorControlMoveToSaturation() - : ClusterCommand("move-to-saturation") - { - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type mRequest; -}; - -/* - * Command MoveSaturation - */ -class ColorControlMoveSaturation : public ClusterCommand { -public: - ColorControlMoveSaturation() - : ClusterCommand("move-saturation") - { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type mRequest; -}; - -/* - * Command StepSaturation - */ -class ColorControlStepSaturation : public ClusterCommand { -public: - ColorControlStepSaturation() - : ClusterCommand("step-saturation") - { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::StepSaturation::Type mRequest; -}; - -/* - * Command MoveToHueAndSaturation - */ -class ColorControlMoveToHueAndSaturation : public ClusterCommand { -public: - ColorControlMoveToHueAndSaturation() - : ClusterCommand("move-to-hue-and-saturation") - { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; - params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToHueAndSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; -}; - -/* - * Command MoveToColor - */ -class ColorControlMoveToColor : public ClusterCommand { -public: - ColorControlMoveToColor() - : ClusterCommand("move-to-color") - { - AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); - AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.colorX = [NSNumber numberWithUnsignedShort:mRequest.colorX]; - params.colorY = [NSNumber numberWithUnsignedShort:mRequest.colorY]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type mRequest; -}; - -/* - * Command MoveColor - */ -class ColorControlMoveColor : public ClusterCommand { -public: - ColorControlMoveColor() - : ClusterCommand("move-color") - { - AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); - AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.rateX = [NSNumber numberWithShort:mRequest.rateX]; - params.rateY = [NSNumber numberWithShort:mRequest.rateY]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveColor::Type mRequest; -}; - -/* - * Command StepColor - */ -class ColorControlStepColor : public ClusterCommand { -public: - ColorControlStepColor() - : ClusterCommand("step-color") - { - AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); - AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepX = [NSNumber numberWithShort:mRequest.stepX]; - params.stepY = [NSNumber numberWithShort:mRequest.stepY]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::StepColor::Type mRequest; -}; - -/* - * Command MoveToColorTemperature - */ -class ColorControlMoveToColorTemperature : public ClusterCommand { -public: - ColorControlMoveToColorTemperature() - : ClusterCommand("move-to-color-temperature") - { - AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.colorTemperatureMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMireds]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToColorTemperatureWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type mRequest; -}; - -/* - * Command EnhancedMoveToHue - */ -class ColorControlEnhancedMoveToHue : public ClusterCommand { -public: - ColorControlEnhancedMoveToHue() - : ClusterCommand("enhanced-move-to-hue") - { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedMoveToHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; -}; - -/* - * Command EnhancedMoveHue - */ -class ColorControlEnhancedMoveHue : public ClusterCommand { -public: - ColorControlEnhancedMoveHue() - : ClusterCommand("enhanced-move-hue") - { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedMoveHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type mRequest; -}; - -/* - * Command EnhancedStepHue - */ -class ColorControlEnhancedStepHue : public ClusterCommand { -public: - ColorControlEnhancedStepHue() - : ClusterCommand("enhanced-step-hue") - { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedStepHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type mRequest; -}; - -/* - * Command EnhancedMoveToHueAndSaturation - */ -class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { -public: - ColorControlEnhancedMoveToHueAndSaturation() - : ClusterCommand("enhanced-move-to-hue-and-saturation") - { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; - params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedMoveToHueAndSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; -}; - -/* - * Command ColorLoopSet - */ -class ColorControlColorLoopSet : public ClusterCommand { -public: - ColorControlColorLoopSet() - : ClusterCommand("color-loop-set") - { - AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); - AddArgument("Action", 0, UINT8_MAX, &mRequest.action); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("Time", 0, UINT16_MAX, &mRequest.time); - AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterColorLoopSetParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.updateFlags = [NSNumber numberWithUnsignedChar:mRequest.updateFlags.Raw()]; - params.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.action)]; - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - params.time = [NSNumber numberWithUnsignedShort:mRequest.time]; - params.startHue = [NSNumber numberWithUnsignedShort:mRequest.startHue]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster colorLoopSetWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type mRequest; -}; - -/* - * Command StopMoveStep - */ -class ColorControlStopMoveStep : public ClusterCommand { -public: - ColorControlStopMoveStep() - : ClusterCommand("stop-move-step") - { - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopMoveStepWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type mRequest; -}; - -/* - * Command MoveColorTemperature - */ -class ColorControlMoveColorTemperature : public ClusterCommand { -public: - ColorControlMoveColorTemperature() - : ClusterCommand("move-color-temperature") - { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveColorTemperatureWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type mRequest; -}; - -/* - * Command StepColorTemperature - */ -class ColorControlStepColorTemperature : public ClusterCommand { -public: - ColorControlStepColorTemperature() - : ClusterCommand("step-color-temperature") - { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepColorTemperatureWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type mRequest; -}; - -/* - * Attribute CurrentHue - */ -class ReadColorControlCurrentHue : public ReadAttribute { -public: - ReadColorControlCurrentHue() - : ReadAttribute("current-hue") - { - } - - ~ReadColorControlCurrentHue() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentHue response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl CurrentHue read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { -public: - SubscribeAttributeColorControlCurrentHue() - : SubscribeAttribute("current-hue") - { - } - - ~SubscribeAttributeColorControlCurrentHue() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentHueWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentHue response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CurrentSaturation - */ -class ReadColorControlCurrentSaturation : public ReadAttribute { -public: - ReadColorControlCurrentSaturation() - : ReadAttribute("current-saturation") - { - } - - ~ReadColorControlCurrentSaturation() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl CurrentSaturation read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribute { -public: - SubscribeAttributeColorControlCurrentSaturation() - : SubscribeAttribute("current-saturation") - { - } - - ~SubscribeAttributeColorControlCurrentSaturation() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentSaturationWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute RemainingTime - */ -class ReadColorControlRemainingTime : public ReadAttribute { -public: - ReadColorControlRemainingTime() - : ReadAttribute("remaining-time") - { - } - - ~ReadColorControlRemainingTime() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.RemainingTime response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl RemainingTime read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { -public: - SubscribeAttributeColorControlRemainingTime() - : SubscribeAttribute("remaining-time") - { - } - - ~SubscribeAttributeColorControlRemainingTime() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeRemainingTimeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.RemainingTime response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CurrentX - */ -class ReadColorControlCurrentX : public ReadAttribute { -public: - ReadColorControlCurrentX() - : ReadAttribute("current-x") - { - } - - ~ReadColorControlCurrentX() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentX response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl CurrentX read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { -public: - SubscribeAttributeColorControlCurrentX() - : SubscribeAttribute("current-x") - { - } - - ~SubscribeAttributeColorControlCurrentX() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000003) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentXWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentX response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CurrentY - */ -class ReadColorControlCurrentY : public ReadAttribute { -public: - ReadColorControlCurrentY() - : ReadAttribute("current-y") - { - } - - ~ReadColorControlCurrentY() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000004) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentY response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl CurrentY read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { -public: - SubscribeAttributeColorControlCurrentY() - : SubscribeAttribute("current-y") - { - } - - ~SubscribeAttributeColorControlCurrentY() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000004) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentYWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentY response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute DriftCompensation - */ -class ReadColorControlDriftCompensation : public ReadAttribute { -public: - ReadColorControlDriftCompensation() - : ReadAttribute("drift-compensation") - { - } - - ~ReadColorControlDriftCompensation() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000005) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.DriftCompensation response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl DriftCompensation read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribute { -public: - SubscribeAttributeColorControlDriftCompensation() - : SubscribeAttribute("drift-compensation") - { - } - - ~SubscribeAttributeColorControlDriftCompensation() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000005) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeDriftCompensationWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.DriftCompensation response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CompensationText - */ -class ReadColorControlCompensationText : public ReadAttribute { -public: - ReadColorControlCompensationText() - : ReadAttribute("compensation-text") - { - } - - ~ReadColorControlCompensationText() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000006) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CompensationText response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl CompensationText read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute { -public: - SubscribeAttributeColorControlCompensationText() - : SubscribeAttribute("compensation-text") - { - } - - ~SubscribeAttributeColorControlCompensationText() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000006) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCompensationTextWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CompensationText response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorTemperatureMireds - */ -class ReadColorControlColorTemperatureMireds : public ReadAttribute { -public: - ReadColorControlColorTemperatureMireds() - : ReadAttribute("color-temperature-mireds") - { - } - - ~ReadColorControlColorTemperatureMireds() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000007) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl ColorTemperatureMireds read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorTemperatureMireds() - : SubscribeAttribute("color-temperature-mireds") - { - } - - ~SubscribeAttributeColorControlColorTemperatureMireds() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000007) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorTemperatureMiredsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorMode - */ -class ReadColorControlColorMode : public ReadAttribute { -public: - ReadColorControlColorMode() - : ReadAttribute("color-mode") - { - } - - ~ReadColorControlColorMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000008) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorMode response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl ColorMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorMode() - : SubscribeAttribute("color-mode") - { - } - - ~SubscribeAttributeColorControlColorMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000008) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Options - */ -class ReadColorControlOptions : public ReadAttribute { -public: - ReadColorControlOptions() - : ReadAttribute("options") - { - } - - ~ReadColorControlOptions() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000000F) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Options response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Options read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlOptions : public WriteAttribute { -public: - WriteColorControlOptions() - : WriteAttribute("options") - { - AddArgument("attr-name", "options"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlOptions() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000000F) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOptionsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl Options write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeColorControlOptions : public SubscribeAttribute { -public: - SubscribeAttributeColorControlOptions() - : SubscribeAttribute("options") - { - } - - ~SubscribeAttributeColorControlOptions() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000000F) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOptionsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Options response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfPrimaries - */ -class ReadColorControlNumberOfPrimaries : public ReadAttribute { -public: - ReadColorControlNumberOfPrimaries() - : ReadAttribute("number-of-primaries") - { - } - - ~ReadColorControlNumberOfPrimaries() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000010) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl NumberOfPrimaries read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribute { -public: - SubscribeAttributeColorControlNumberOfPrimaries() - : SubscribeAttribute("number-of-primaries") - { - } - - ~SubscribeAttributeColorControlNumberOfPrimaries() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000010) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfPrimariesWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary1X - */ -class ReadColorControlPrimary1X : public ReadAttribute { -public: - ReadColorControlPrimary1X() - : ReadAttribute("primary1x") - { - } - - ~ReadColorControlPrimary1X() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000011) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1X response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary1X read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary1X() - : SubscribeAttribute("primary1x") - { - } - - ~SubscribeAttributeColorControlPrimary1X() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000011) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary1XWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1X response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary1Y - */ -class ReadColorControlPrimary1Y : public ReadAttribute { -public: - ReadColorControlPrimary1Y() - : ReadAttribute("primary1y") - { - } - - ~ReadColorControlPrimary1Y() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000012) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Y response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary1Y read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary1Y() - : SubscribeAttribute("primary1y") - { - } - - ~SubscribeAttributeColorControlPrimary1Y() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000012) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary1YWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Y response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary1Intensity - */ -class ReadColorControlPrimary1Intensity : public ReadAttribute { -public: - ReadColorControlPrimary1Intensity() - : ReadAttribute("primary1intensity") - { - } - - ~ReadColorControlPrimary1Intensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000013) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary1Intensity read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary1Intensity() - : SubscribeAttribute("primary1intensity") - { - } - - ~SubscribeAttributeColorControlPrimary1Intensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000013) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary1IntensityWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary2X - */ -class ReadColorControlPrimary2X : public ReadAttribute { -public: - ReadColorControlPrimary2X() - : ReadAttribute("primary2x") - { - } - - ~ReadColorControlPrimary2X() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000015) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2X response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary2X read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary2X() - : SubscribeAttribute("primary2x") - { - } - - ~SubscribeAttributeColorControlPrimary2X() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000015) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary2XWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2X response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary2Y - */ -class ReadColorControlPrimary2Y : public ReadAttribute { -public: - ReadColorControlPrimary2Y() - : ReadAttribute("primary2y") - { - } - - ~ReadColorControlPrimary2Y() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000016) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Y response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary2Y read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary2Y() - : SubscribeAttribute("primary2y") - { - } - - ~SubscribeAttributeColorControlPrimary2Y() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000016) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary2YWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Y response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary2Intensity - */ -class ReadColorControlPrimary2Intensity : public ReadAttribute { -public: - ReadColorControlPrimary2Intensity() - : ReadAttribute("primary2intensity") - { - } - - ~ReadColorControlPrimary2Intensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000017) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary2Intensity read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary2Intensity() - : SubscribeAttribute("primary2intensity") - { - } - - ~SubscribeAttributeColorControlPrimary2Intensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000017) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary2IntensityWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary3X - */ -class ReadColorControlPrimary3X : public ReadAttribute { -public: - ReadColorControlPrimary3X() - : ReadAttribute("primary3x") - { - } - - ~ReadColorControlPrimary3X() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000019) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3X response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary3X read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary3X() - : SubscribeAttribute("primary3x") - { - } - - ~SubscribeAttributeColorControlPrimary3X() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000019) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary3XWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3X response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary3Y - */ -class ReadColorControlPrimary3Y : public ReadAttribute { -public: - ReadColorControlPrimary3Y() - : ReadAttribute("primary3y") - { - } - - ~ReadColorControlPrimary3Y() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000001A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Y response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary3Y read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary3Y() - : SubscribeAttribute("primary3y") - { - } - - ~SubscribeAttributeColorControlPrimary3Y() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000001A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary3YWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Y response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary3Intensity - */ -class ReadColorControlPrimary3Intensity : public ReadAttribute { -public: - ReadColorControlPrimary3Intensity() - : ReadAttribute("primary3intensity") - { - } - - ~ReadColorControlPrimary3Intensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000001B) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary3Intensity read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary3Intensity() - : SubscribeAttribute("primary3intensity") - { - } - - ~SubscribeAttributeColorControlPrimary3Intensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000001B) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary3IntensityWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary4X - */ -class ReadColorControlPrimary4X : public ReadAttribute { -public: - ReadColorControlPrimary4X() - : ReadAttribute("primary4x") - { - } - - ~ReadColorControlPrimary4X() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000020) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4X response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary4X read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary4X() - : SubscribeAttribute("primary4x") - { - } - - ~SubscribeAttributeColorControlPrimary4X() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000020) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary4XWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4X response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary4Y - */ -class ReadColorControlPrimary4Y : public ReadAttribute { -public: - ReadColorControlPrimary4Y() - : ReadAttribute("primary4y") - { - } - - ~ReadColorControlPrimary4Y() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000021) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Y response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary4Y read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary4Y() - : SubscribeAttribute("primary4y") - { - } - - ~SubscribeAttributeColorControlPrimary4Y() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000021) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary4YWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Y response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary4Intensity - */ -class ReadColorControlPrimary4Intensity : public ReadAttribute { -public: - ReadColorControlPrimary4Intensity() - : ReadAttribute("primary4intensity") - { - } - - ~ReadColorControlPrimary4Intensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000022) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary4Intensity read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary4Intensity() - : SubscribeAttribute("primary4intensity") - { - } - - ~SubscribeAttributeColorControlPrimary4Intensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000022) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary4IntensityWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary5X - */ -class ReadColorControlPrimary5X : public ReadAttribute { -public: - ReadColorControlPrimary5X() - : ReadAttribute("primary5x") - { - } - - ~ReadColorControlPrimary5X() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000024) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5X response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary5X read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary5X() - : SubscribeAttribute("primary5x") - { - } - - ~SubscribeAttributeColorControlPrimary5X() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000024) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary5XWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5X response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary5Y - */ -class ReadColorControlPrimary5Y : public ReadAttribute { -public: - ReadColorControlPrimary5Y() - : ReadAttribute("primary5y") - { - } - - ~ReadColorControlPrimary5Y() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000025) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Y response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary5Y read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary5Y() - : SubscribeAttribute("primary5y") - { - } - - ~SubscribeAttributeColorControlPrimary5Y() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000025) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary5YWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Y response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary5Intensity - */ -class ReadColorControlPrimary5Intensity : public ReadAttribute { -public: - ReadColorControlPrimary5Intensity() - : ReadAttribute("primary5intensity") - { - } - - ~ReadColorControlPrimary5Intensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000026) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary5Intensity read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary5Intensity() - : SubscribeAttribute("primary5intensity") - { - } - - ~SubscribeAttributeColorControlPrimary5Intensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000026) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary5IntensityWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary6X - */ -class ReadColorControlPrimary6X : public ReadAttribute { -public: - ReadColorControlPrimary6X() - : ReadAttribute("primary6x") - { - } - - ~ReadColorControlPrimary6X() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000028) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6X response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary6X read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary6X() - : SubscribeAttribute("primary6x") - { - } - - ~SubscribeAttributeColorControlPrimary6X() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000028) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary6XWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6X response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary6Y - */ -class ReadColorControlPrimary6Y : public ReadAttribute { -public: - ReadColorControlPrimary6Y() - : ReadAttribute("primary6y") - { - } - - ~ReadColorControlPrimary6Y() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000029) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Y response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary6Y read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary6Y() - : SubscribeAttribute("primary6y") - { - } - - ~SubscribeAttributeColorControlPrimary6Y() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000029) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary6YWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Y response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary6Intensity - */ -class ReadColorControlPrimary6Intensity : public ReadAttribute { -public: - ReadColorControlPrimary6Intensity() - : ReadAttribute("primary6intensity") - { - } - - ~ReadColorControlPrimary6Intensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000002A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary6Intensity read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary6Intensity() - : SubscribeAttribute("primary6intensity") - { - } - - ~SubscribeAttributeColorControlPrimary6Intensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000002A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary6IntensityWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute WhitePointX - */ -class ReadColorControlWhitePointX : public ReadAttribute { -public: - ReadColorControlWhitePointX() - : ReadAttribute("white-point-x") - { - } - - ~ReadColorControlWhitePointX() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000030) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointX response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl WhitePointX read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlWhitePointX : public WriteAttribute { -public: - WriteColorControlWhitePointX() - : WriteAttribute("white-point-x") - { - AddArgument("attr-name", "white-point-x"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlWhitePointX() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000030) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeWhitePointXWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl WhitePointX write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { -public: - SubscribeAttributeColorControlWhitePointX() - : SubscribeAttribute("white-point-x") - { - } - - ~SubscribeAttributeColorControlWhitePointX() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000030) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeWhitePointXWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointX response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute WhitePointY - */ -class ReadColorControlWhitePointY : public ReadAttribute { -public: - ReadColorControlWhitePointY() - : ReadAttribute("white-point-y") - { - } - - ~ReadColorControlWhitePointY() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000031) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointY response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl WhitePointY read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlWhitePointY : public WriteAttribute { -public: - WriteColorControlWhitePointY() - : WriteAttribute("white-point-y") - { - AddArgument("attr-name", "white-point-y"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlWhitePointY() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000031) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeWhitePointYWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl WhitePointY write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { -public: - SubscribeAttributeColorControlWhitePointY() - : SubscribeAttribute("white-point-y") - { - } - - ~SubscribeAttributeColorControlWhitePointY() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000031) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeWhitePointYWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointY response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointRX - */ -class ReadColorControlColorPointRX : public ReadAttribute { -public: - ReadColorControlColorPointRX() - : ReadAttribute("color-point-rx") - { - } - - ~ReadColorControlColorPointRX() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000032) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRX response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl ColorPointRX read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointRX : public WriteAttribute { -public: - WriteColorControlColorPointRX() - : WriteAttribute("color-point-rx") - { - AddArgument("attr-name", "color-point-rx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointRX() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000032) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeColorPointRXWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRX write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointRX() - : SubscribeAttribute("color-point-rx") - { - } - - ~SubscribeAttributeColorControlColorPointRX() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000032) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorPointRXWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRX response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointRY - */ -class ReadColorControlColorPointRY : public ReadAttribute { -public: - ReadColorControlColorPointRY() - : ReadAttribute("color-point-ry") - { - } - - ~ReadColorControlColorPointRY() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000033) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRY response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl ColorPointRY read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointRY : public WriteAttribute { -public: - WriteColorControlColorPointRY() - : WriteAttribute("color-point-ry") - { - AddArgument("attr-name", "color-point-ry"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointRY() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000033) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeColorPointRYWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRY write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointRY() - : SubscribeAttribute("color-point-ry") - { - } - - ~SubscribeAttributeColorControlColorPointRY() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000033) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - 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 subscribeAttributeColorPointRYWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRY response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointRIntensity - */ -class ReadColorControlColorPointRIntensity : public ReadAttribute { -public: - ReadColorControlColorPointRIntensity() - : ReadAttribute("color-point-rintensity") - { - } - - ~ReadColorControlColorPointRIntensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000034) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl ColorPointRIntensity read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointRIntensity : public WriteAttribute { -public: - WriteColorControlColorPointRIntensity() - : WriteAttribute("color-point-rintensity") - { - AddArgument("attr-name", "color-point-rintensity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointRIntensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000034) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeColorPointRIntensityWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRIntensity write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointRIntensity() - : SubscribeAttribute("color-point-rintensity") - { - } - - ~SubscribeAttributeColorControlColorPointRIntensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000034) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - 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 subscribeAttributeColorPointRIntensityWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointGX - */ -class ReadColorControlColorPointGX : public ReadAttribute { -public: - ReadColorControlColorPointGX() - : ReadAttribute("color-point-gx") - { - } - - ~ReadColorControlColorPointGX() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000036) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGX response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl ColorPointGX read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointGX : public WriteAttribute { -public: - WriteColorControlColorPointGX() - : WriteAttribute("color-point-gx") - { - AddArgument("attr-name", "color-point-gx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointGX() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000036) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeColorPointGXWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGX write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointGX() - : SubscribeAttribute("color-point-gx") - { - } - - ~SubscribeAttributeColorControlColorPointGX() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000036) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - 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 subscribeAttributeColorPointGXWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGX response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointGY - */ -class ReadColorControlColorPointGY : public ReadAttribute { -public: - ReadColorControlColorPointGY() - : ReadAttribute("color-point-gy") - { - } - - ~ReadColorControlColorPointGY() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000037) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGY response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl ColorPointGY read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointGY : public WriteAttribute { -public: - WriteColorControlColorPointGY() - : WriteAttribute("color-point-gy") - { - AddArgument("attr-name", "color-point-gy"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointGY() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000037) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeColorPointGYWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGY write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointGY() - : SubscribeAttribute("color-point-gy") - { - } - - ~SubscribeAttributeColorControlColorPointGY() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000037) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - 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 subscribeAttributeColorPointGYWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGY response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointGIntensity - */ -class ReadColorControlColorPointGIntensity : public ReadAttribute { -public: - ReadColorControlColorPointGIntensity() - : ReadAttribute("color-point-gintensity") - { - } - - ~ReadColorControlColorPointGIntensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000038) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl ColorPointGIntensity read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointGIntensity : public WriteAttribute { -public: - WriteColorControlColorPointGIntensity() - : WriteAttribute("color-point-gintensity") - { - AddArgument("attr-name", "color-point-gintensity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointGIntensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000038) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeColorPointGIntensityWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGIntensity write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointGIntensity() - : SubscribeAttribute("color-point-gintensity") - { - } - - ~SubscribeAttributeColorControlColorPointGIntensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000038) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - 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 subscribeAttributeColorPointGIntensityWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointBX - */ -class ReadColorControlColorPointBX : public ReadAttribute { -public: - ReadColorControlColorPointBX() - : ReadAttribute("color-point-bx") - { - } - - ~ReadColorControlColorPointBX() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBX response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorPointBX read Error", error); + LogNSError("BarrierControl BarrierCloseEvents read Error", error); } SetCommandExitStatus(error); }]; @@ -69012,39 +45122,39 @@ class ReadColorControlColorPointBX : public ReadAttribute { } }; -class WriteColorControlColorPointBX : public WriteAttribute { +class WriteBarrierControlBarrierCloseEvents : public WriteAttribute { public: - WriteColorControlColorPointBX() - : WriteAttribute("color-point-bx") + WriteBarrierControlBarrierCloseEvents() + : WriteAttribute("barrier-close-events") { - AddArgument("attr-name", "color-point-bx"); + AddArgument("attr-name", "barrier-close-events"); AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointBX() {} + ~WriteBarrierControlBarrierCloseEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeColorPointBXWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBX write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeBarrierCloseEventsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCloseEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -69052,22 +45162,22 @@ class WriteColorControlColorPointBX : public WriteAttribute { uint16_t mValue; }; -class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointBX() - : SubscribeAttribute("color-point-bx") + SubscribeAttributeBarrierControlBarrierCloseEvents() + : SubscribeAttribute("barrier-close-events") { } - ~SubscribeAttributeColorControlColorPointBX() {} + ~SubscribeAttributeBarrierControlBarrierCloseEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69078,12 +45188,12 @@ class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointBXWithParams:params + [cluster subscribeAttributeBarrierCloseEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBX response %@", [value description]); + NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69092,29 +45202,29 @@ class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { }; /* - * Attribute ColorPointBY + * Attribute BarrierCommandOpenEvents */ -class ReadColorControlColorPointBY : public ReadAttribute { +class ReadBarrierControlBarrierCommandOpenEvents : public ReadAttribute { public: - ReadColorControlColorPointBY() - : ReadAttribute("color-point-by") + ReadBarrierControlBarrierCommandOpenEvents() + : ReadAttribute("barrier-command-open-events") { } - ~ReadColorControlColorPointBY() {} + ~ReadBarrierControlBarrierCommandOpenEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBY response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierCommandOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorPointBY read Error", error); + LogNSError("BarrierControl BarrierCommandOpenEvents read Error", error); } SetCommandExitStatus(error); }]; @@ -69122,39 +45232,40 @@ class ReadColorControlColorPointBY : public ReadAttribute { } }; -class WriteColorControlColorPointBY : public WriteAttribute { +class WriteBarrierControlBarrierCommandOpenEvents : public WriteAttribute { public: - WriteColorControlColorPointBY() - : WriteAttribute("color-point-by") + WriteBarrierControlBarrierCommandOpenEvents() + : WriteAttribute("barrier-command-open-events") { - AddArgument("attr-name", "color-point-by"); + AddArgument("attr-name", "barrier-command-open-events"); AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointBY() {} + ~WriteBarrierControlBarrierCommandOpenEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeColorPointBYWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBY write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeBarrierCommandOpenEventsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCommandOpenEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -69162,22 +45273,22 @@ class WriteColorControlColorPointBY : public WriteAttribute { uint16_t mValue; }; -class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointBY() - : SubscribeAttribute("color-point-by") + SubscribeAttributeBarrierControlBarrierCommandOpenEvents() + : SubscribeAttribute("barrier-command-open-events") { } - ~SubscribeAttributeColorControlColorPointBY() {} + ~SubscribeAttributeBarrierControlBarrierCommandOpenEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69188,12 +45299,12 @@ class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointBYWithParams:params + [cluster subscribeAttributeBarrierCommandOpenEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBY response %@", [value description]); + NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69202,29 +45313,29 @@ class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { }; /* - * Attribute ColorPointBIntensity + * Attribute BarrierCommandCloseEvents */ -class ReadColorControlColorPointBIntensity : public ReadAttribute { +class ReadBarrierControlBarrierCommandCloseEvents : public ReadAttribute { public: - ReadColorControlColorPointBIntensity() - : ReadAttribute("color-point-bintensity") + ReadBarrierControlBarrierCommandCloseEvents() + : ReadAttribute("barrier-command-close-events") { } - ~ReadColorControlColorPointBIntensity() {} + ~ReadBarrierControlBarrierCommandCloseEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierCommandCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorPointBIntensity read Error", error); + LogNSError("BarrierControl BarrierCommandCloseEvents read Error", error); } SetCommandExitStatus(error); }]; @@ -69232,36 +45343,37 @@ class ReadColorControlColorPointBIntensity : public ReadAttribute { } }; -class WriteColorControlColorPointBIntensity : public WriteAttribute { +class WriteBarrierControlBarrierCommandCloseEvents : public WriteAttribute { public: - WriteColorControlColorPointBIntensity() - : WriteAttribute("color-point-bintensity") + WriteBarrierControlBarrierCommandCloseEvents() + : WriteAttribute("barrier-command-close-events") { - AddArgument("attr-name", "color-point-bintensity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "barrier-command-close-events"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointBIntensity() {} + ~WriteBarrierControlBarrierCommandCloseEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeColorPointBIntensityWithValue:value + [cluster + writeAttributeBarrierCommandCloseEventsWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("ColorControl ColorPointBIntensity write Error", error); + LogNSError("BarrierControl BarrierCommandCloseEvents write Error", error); } SetCommandExitStatus(error); }]; @@ -69269,25 +45381,25 @@ class WriteColorControlColorPointBIntensity : public WriteAttribute { } private: - uint8_t mValue; + uint16_t mValue; }; -class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointBIntensity() - : SubscribeAttribute("color-point-bintensity") + SubscribeAttributeBarrierControlBarrierCommandCloseEvents() + : SubscribeAttribute("barrier-command-close-events") { } - ~SubscribeAttributeColorControlColorPointBIntensity() {} + ~SubscribeAttributeBarrierControlBarrierCommandCloseEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69298,12 +45410,12 @@ class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointBIntensityWithParams:params + [cluster subscribeAttributeBarrierCommandCloseEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); + NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69312,29 +45424,29 @@ class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttri }; /* - * Attribute EnhancedCurrentHue + * Attribute BarrierOpenPeriod */ -class ReadColorControlEnhancedCurrentHue : public ReadAttribute { +class ReadBarrierControlBarrierOpenPeriod : public ReadAttribute { public: - ReadColorControlEnhancedCurrentHue() - : ReadAttribute("enhanced-current-hue") + ReadBarrierControlBarrierOpenPeriod() + : ReadAttribute("barrier-open-period") { } - ~ReadColorControlEnhancedCurrentHue() {} + ~ReadBarrierControlBarrierOpenPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); if (error != nil) { - LogNSError("ColorControl EnhancedCurrentHue read Error", error); + LogNSError("BarrierControl BarrierOpenPeriod read Error", error); } SetCommandExitStatus(error); }]; @@ -69342,92 +45454,62 @@ class ReadColorControlEnhancedCurrentHue : public ReadAttribute { } }; -class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribute { +class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute { public: - SubscribeAttributeColorControlEnhancedCurrentHue() - : SubscribeAttribute("enhanced-current-hue") + WriteBarrierControlBarrierOpenPeriod() + : WriteAttribute("barrier-open-period") { + AddArgument("attr-name", "barrier-open-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlEnhancedCurrentHue() {} + ~WriteBarrierControlBarrierOpenPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEnhancedCurrentHueWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + [cluster writeAttributeBarrierOpenPeriodWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierOpenPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute EnhancedColorMode - */ -class ReadColorControlEnhancedColorMode : public ReadAttribute { -public: - ReadColorControlEnhancedColorMode() - : ReadAttribute("enhanced-color-mode") - { - } - - ~ReadColorControlEnhancedColorMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl EnhancedColorMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint16_t mValue; }; -class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttribute { public: - SubscribeAttributeColorControlEnhancedColorMode() - : SubscribeAttribute("enhanced-color-mode") + SubscribeAttributeBarrierControlBarrierOpenPeriod() + : SubscribeAttribute("barrier-open-period") { } - ~SubscribeAttributeColorControlEnhancedColorMode() {} + ~SubscribeAttributeBarrierControlBarrierOpenPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69438,12 +45520,12 @@ class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnhancedColorModeWithParams:params + [cluster subscribeAttributeBarrierOpenPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); + NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69452,29 +45534,29 @@ class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribut }; /* - * Attribute ColorLoopActive + * Attribute BarrierClosePeriod */ -class ReadColorControlColorLoopActive : public ReadAttribute { +class ReadBarrierControlBarrierClosePeriod : public ReadAttribute { public: - ReadColorControlColorLoopActive() - : ReadAttribute("color-loop-active") + ReadBarrierControlBarrierClosePeriod() + : ReadAttribute("barrier-close-period") { } - ~ReadColorControlColorLoopActive() {} + ~ReadBarrierControlBarrierClosePeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierClosePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorLoopActive read Error", error); + LogNSError("BarrierControl BarrierClosePeriod read Error", error); } SetCommandExitStatus(error); }]; @@ -69482,92 +45564,62 @@ class ReadColorControlColorLoopActive : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute { +class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { public: - SubscribeAttributeColorControlColorLoopActive() - : SubscribeAttribute("color-loop-active") + WriteBarrierControlBarrierClosePeriod() + : WriteAttribute("barrier-close-period") { + AddArgument("attr-name", "barrier-close-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlColorLoopActive() {} + ~WriteBarrierControlBarrierClosePeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorLoopActiveWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + [cluster writeAttributeBarrierClosePeriodWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierClosePeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute ColorLoopDirection - */ -class ReadColorControlColorLoopDirection : public ReadAttribute { -public: - ReadColorControlColorLoopDirection() - : ReadAttribute("color-loop-direction") - { - } - - ~ReadColorControlColorLoopDirection() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004003) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl ColorLoopDirection read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint16_t mValue; }; -class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorLoopDirection() - : SubscribeAttribute("color-loop-direction") + SubscribeAttributeBarrierControlBarrierClosePeriod() + : SubscribeAttribute("barrier-close-period") { } - ~SubscribeAttributeColorControlColorLoopDirection() {} + ~SubscribeAttributeBarrierControlBarrierClosePeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69578,12 +45630,12 @@ class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopDirectionWithParams:params + [cluster subscribeAttributeBarrierClosePeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); + NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69592,29 +45644,29 @@ class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribu }; /* - * Attribute ColorLoopTime + * Attribute BarrierPosition */ -class ReadColorControlColorLoopTime : public ReadAttribute { +class ReadBarrierControlBarrierPosition : public ReadAttribute { public: - ReadColorControlColorLoopTime() - : ReadAttribute("color-loop-time") + ReadBarrierControlBarrierPosition() + : ReadAttribute("barrier-position") { } - ~ReadColorControlColorLoopTime() {} + ~ReadBarrierControlBarrierPosition() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorLoopTime read Error", error); + LogNSError("BarrierControl BarrierPosition read Error", error); } SetCommandExitStatus(error); }]; @@ -69622,22 +45674,22 @@ class ReadColorControlColorLoopTime : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorLoopTime() - : SubscribeAttribute("color-loop-time") + SubscribeAttributeBarrierControlBarrierPosition() + : SubscribeAttribute("barrier-position") { } - ~SubscribeAttributeColorControlColorLoopTime() {} + ~SubscribeAttributeBarrierControlBarrierPosition() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69648,12 +45700,12 @@ class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopTimeWithParams:params + [cluster subscribeAttributeBarrierPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); + NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69662,29 +45714,29 @@ class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { }; /* - * Attribute ColorLoopStartEnhancedHue + * Attribute GeneratedCommandList */ -class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { +class ReadBarrierControlGeneratedCommandList : public ReadAttribute { public: - ReadColorControlColorLoopStartEnhancedHue() - : ReadAttribute("color-loop-start-enhanced-hue") + ReadBarrierControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadColorControlColorLoopStartEnhancedHue() {} + ~ReadBarrierControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorLoopStartEnhancedHue read Error", error); + LogNSError("BarrierControl GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -69692,22 +45744,22 @@ class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public SubscribeAttribute { +class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorLoopStartEnhancedHue() - : SubscribeAttribute("color-loop-start-enhanced-hue") + SubscribeAttributeBarrierControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeColorControlColorLoopStartEnhancedHue() {} + ~SubscribeAttributeBarrierControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69718,12 +45770,12 @@ class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopStartEnhancedHueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69732,29 +45784,29 @@ class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public Subscribe }; /* - * Attribute ColorLoopStoredEnhancedHue + * Attribute AcceptedCommandList */ -class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { +class ReadBarrierControlAcceptedCommandList : public ReadAttribute { public: - ReadColorControlColorLoopStoredEnhancedHue() - : ReadAttribute("color-loop-stored-enhanced-hue") + ReadBarrierControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadColorControlColorLoopStoredEnhancedHue() {} + ~ReadBarrierControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorLoopStoredEnhancedHue read Error", error); + LogNSError("BarrierControl AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -69762,22 +45814,22 @@ class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public SubscribeAttribute { +class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorLoopStoredEnhancedHue() - : SubscribeAttribute("color-loop-stored-enhanced-hue") + SubscribeAttributeBarrierControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeColorControlColorLoopStoredEnhancedHue() {} + ~SubscribeAttributeBarrierControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69788,12 +45840,12 @@ class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopStoredEnhancedHueWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69802,29 +45854,29 @@ class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public Subscrib }; /* - * Attribute ColorCapabilities + * Attribute AttributeList */ -class ReadColorControlColorCapabilities : public ReadAttribute { +class ReadBarrierControlAttributeList : public ReadAttribute { public: - ReadColorControlColorCapabilities() - : ReadAttribute("color-capabilities") + ReadBarrierControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadColorControlColorCapabilities() {} + ~ReadBarrierControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorCapabilities read Error", error); + LogNSError("BarrierControl AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -69832,22 +45884,22 @@ class ReadColorControlColorCapabilities : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribute { +class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorCapabilities() - : SubscribeAttribute("color-capabilities") + SubscribeAttributeBarrierControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeColorControlColorCapabilities() {} + ~SubscribeAttributeBarrierControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69858,12 +45910,12 @@ class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorCapabilitiesWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69872,29 +45924,29 @@ class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribut }; /* - * Attribute ColorTempPhysicalMinMireds + * Attribute FeatureMap */ -class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { +class ReadBarrierControlFeatureMap : public ReadAttribute { public: - ReadColorControlColorTempPhysicalMinMireds() - : ReadAttribute("color-temp-physical-min-mireds") + ReadBarrierControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadColorControlColorTempPhysicalMinMireds() {} + ~ReadBarrierControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorTempPhysicalMinMireds read Error", error); + LogNSError("BarrierControl FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -69902,22 +45954,22 @@ class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public SubscribeAttribute { +class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorTempPhysicalMinMireds() - : SubscribeAttribute("color-temp-physical-min-mireds") + SubscribeAttributeBarrierControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeColorControlColorTempPhysicalMinMireds() {} + ~SubscribeAttributeBarrierControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69928,12 +45980,12 @@ class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorTempPhysicalMinMiredsWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); + NSLog(@"BarrierControl.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69942,29 +45994,29 @@ class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public Subscrib }; /* - * Attribute ColorTempPhysicalMaxMireds + * Attribute ClusterRevision */ -class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { +class ReadBarrierControlClusterRevision : public ReadAttribute { public: - ReadColorControlColorTempPhysicalMaxMireds() - : ReadAttribute("color-temp-physical-max-mireds") + ReadBarrierControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadColorControlColorTempPhysicalMaxMireds() {} + ~ReadBarrierControlClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorTempPhysicalMaxMireds read Error", error); + LogNSError("BarrierControl ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -69972,22 +46024,22 @@ class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public SubscribeAttribute { +class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorTempPhysicalMaxMireds() - : SubscribeAttribute("color-temp-physical-max-mireds") + SubscribeAttributeBarrierControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeColorControlColorTempPhysicalMaxMireds() {} + ~SubscribeAttributeBarrierControlClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69998,12 +46050,12 @@ class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorTempPhysicalMaxMiredsWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); + NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70011,54 +46063,109 @@ class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public Subscrib } }; +/*----------------------------------------------------------------------------*\ +| Cluster PumpConfigurationAndControl | 0x0200 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MaxPressure | 0x0000 | +| * MaxSpeed | 0x0001 | +| * MaxFlow | 0x0002 | +| * MinConstPressure | 0x0003 | +| * MaxConstPressure | 0x0004 | +| * MinCompPressure | 0x0005 | +| * MaxCompPressure | 0x0006 | +| * MinConstSpeed | 0x0007 | +| * MaxConstSpeed | 0x0008 | +| * MinConstFlow | 0x0009 | +| * MaxConstFlow | 0x000A | +| * MinConstTemp | 0x000B | +| * MaxConstTemp | 0x000C | +| * PumpStatus | 0x0010 | +| * EffectiveOperationMode | 0x0011 | +| * EffectiveControlMode | 0x0012 | +| * Capacity | 0x0013 | +| * Speed | 0x0014 | +| * LifetimeRunningHours | 0x0015 | +| * Power | 0x0016 | +| * LifetimeEnergyConsumed | 0x0017 | +| * OperationMode | 0x0020 | +| * ControlMode | 0x0021 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * SupplyVoltageLow | 0x0000 | +| * SupplyVoltageHigh | 0x0001 | +| * PowerMissingPhase | 0x0002 | +| * SystemPressureLow | 0x0003 | +| * SystemPressureHigh | 0x0004 | +| * DryRunning | 0x0005 | +| * MotorTemperatureHigh | 0x0006 | +| * PumpMotorFatalFailure | 0x0007 | +| * ElectronicTemperatureHigh | 0x0008 | +| * PumpBlocked | 0x0009 | +| * SensorFailure | 0x000A | +| * ElectronicNonFatalFailure | 0x000B | +| * ElectronicFatalFailure | 0x000C | +| * GeneralFault | 0x000D | +| * Leakage | 0x000E | +| * AirDetection | 0x000F | +| * TurbineOperation | 0x0010 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute CoupleColorTempToLevelMinMireds + * Attribute MaxPressure */ -class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { public: - ReadColorControlCoupleColorTempToLevelMinMireds() - : ReadAttribute("couple-color-temp-to-level-min-mireds") + ReadPumpConfigurationAndControlMaxPressure() + : ReadAttribute("max-pressure") { } - ~ReadColorControlCoupleColorTempToLevelMinMireds() {} + ~ReadPumpConfigurationAndControlMaxPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl CoupleColorTempToLevelMinMireds read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); + if (error != nil) { + LogNSError("PumpConfigurationAndControl MaxPressure read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxPressure : public SubscribeAttribute { public: - SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() - : SubscribeAttribute("couple-color-temp-to-level-min-mireds") + SubscribeAttributePumpConfigurationAndControlMaxPressure() + : SubscribeAttribute("max-pressure") { } - ~SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() {} + ~SubscribeAttributePumpConfigurationAndControlMaxPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70069,12 +46176,12 @@ class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:params + [cluster subscribeAttributeMaxPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70083,29 +46190,29 @@ class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public Sub }; /* - * Attribute StartUpColorTemperatureMireds + * Attribute MaxSpeed */ -class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { public: - ReadColorControlStartUpColorTemperatureMireds() - : ReadAttribute("start-up-color-temperature-mireds") + ReadPumpConfigurationAndControlMaxSpeed() + : ReadAttribute("max-speed") { } - ~ReadColorControlStartUpColorTemperatureMireds() {} + ~ReadPumpConfigurationAndControlMaxSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); if (error != nil) { - LogNSError("ColorControl StartUpColorTemperatureMireds read Error", error); + LogNSError("PumpConfigurationAndControl MaxSpeed read Error", error); } SetCommandExitStatus(error); }]; @@ -70113,64 +46220,22 @@ class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { } }; -class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { -public: - WriteColorControlStartUpColorTemperatureMireds() - : WriteAttribute("start-up-color-temperature-mireds") - { - AddArgument("attr-name", "start-up-color-temperature-mireds"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlStartUpColorTemperatureMireds() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00004010) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributeStartUpColorTemperatureMiredsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ColorControl StartUpColorTemperatureMireds write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAttribute { public: - SubscribeAttributeColorControlStartUpColorTemperatureMireds() - : SubscribeAttribute("start-up-color-temperature-mireds") + SubscribeAttributePumpConfigurationAndControlMaxSpeed() + : SubscribeAttribute("max-speed") { } - ~SubscribeAttributeColorControlStartUpColorTemperatureMireds() {} + ~SubscribeAttributePumpConfigurationAndControlMaxSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70181,12 +46246,12 @@ class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpColorTemperatureMiredsWithParams:params + [cluster subscribeAttributeMaxSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70195,29 +46260,29 @@ class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public Subsc }; /* - * Attribute GeneratedCommandList + * Attribute MaxFlow */ -class ReadColorControlGeneratedCommandList : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { public: - ReadColorControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPumpConfigurationAndControlMaxFlow() + : ReadAttribute("max-flow") { } - ~ReadColorControlGeneratedCommandList() {} + ~ReadPumpConfigurationAndControlMaxFlow() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); if (error != nil) { - LogNSError("ColorControl GeneratedCommandList read Error", error); + LogNSError("PumpConfigurationAndControl MaxFlow read Error", error); } SetCommandExitStatus(error); }]; @@ -70225,22 +46290,22 @@ class ReadColorControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAttribute { public: - SubscribeAttributeColorControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePumpConfigurationAndControlMaxFlow() + : SubscribeAttribute("max-flow") { } - ~SubscribeAttributeColorControlGeneratedCommandList() {} + ~SubscribeAttributePumpConfigurationAndControlMaxFlow() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70251,12 +46316,12 @@ class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70265,29 +46330,29 @@ class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttri }; /* - * Attribute AcceptedCommandList + * Attribute MinConstPressure */ -class ReadColorControlAcceptedCommandList : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { public: - ReadColorControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPumpConfigurationAndControlMinConstPressure() + : ReadAttribute("min-const-pressure") { } - ~ReadColorControlAcceptedCommandList() {} + ~ReadPumpConfigurationAndControlMinConstPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000003) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); if (error != nil) { - LogNSError("ColorControl AcceptedCommandList read Error", error); + LogNSError("PumpConfigurationAndControl MinConstPressure read Error", error); } SetCommandExitStatus(error); }]; @@ -70295,22 +46360,22 @@ class ReadColorControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public SubscribeAttribute { public: - SubscribeAttributeColorControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePumpConfigurationAndControlMinConstPressure() + : SubscribeAttribute("min-const-pressure") { } - ~SubscribeAttributeColorControlAcceptedCommandList() {} + ~SubscribeAttributePumpConfigurationAndControlMinConstPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70321,12 +46386,12 @@ class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMinConstPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70335,29 +46400,29 @@ class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttrib }; /* - * Attribute EventList + * Attribute MaxConstPressure */ -class ReadColorControlEventList : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { public: - ReadColorControlEventList() - : ReadAttribute("event-list") + ReadPumpConfigurationAndControlMaxConstPressure() + : ReadAttribute("max-const-pressure") { } - ~ReadColorControlEventList() {} + ~ReadPumpConfigurationAndControlMaxConstPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); if (error != nil) { - LogNSError("ColorControl EventList read Error", error); + LogNSError("PumpConfigurationAndControl MaxConstPressure read Error", error); } SetCommandExitStatus(error); }]; @@ -70365,22 +46430,22 @@ class ReadColorControlEventList : public ReadAttribute { } }; -class SubscribeAttributeColorControlEventList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public SubscribeAttribute { public: - SubscribeAttributeColorControlEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePumpConfigurationAndControlMaxConstPressure() + : SubscribeAttribute("max-const-pressure") { } - ~SubscribeAttributeColorControlEventList() {} + ~SubscribeAttributePumpConfigurationAndControlMaxConstPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70391,12 +46456,12 @@ class SubscribeAttributeColorControlEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMaxConstPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70405,29 +46470,29 @@ class SubscribeAttributeColorControlEventList : public SubscribeAttribute { }; /* - * Attribute AttributeList + * Attribute MinCompPressure */ -class ReadColorControlAttributeList : public ReadAttribute { +class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { public: - ReadColorControlAttributeList() - : ReadAttribute("attribute-list") + ReadPumpConfigurationAndControlMinCompPressure() + : ReadAttribute("min-comp-pressure") { } - ~ReadColorControlAttributeList() {} + ~ReadPumpConfigurationAndControlMinCompPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); if (error != nil) { - LogNSError("ColorControl AttributeList read Error", error); + LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); } SetCommandExitStatus(error); }]; @@ -70435,22 +46500,22 @@ class ReadColorControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public SubscribeAttribute { public: - SubscribeAttributeColorControlAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePumpConfigurationAndControlMinCompPressure() + : SubscribeAttribute("min-comp-pressure") { } - ~SubscribeAttributeColorControlAttributeList() {} + ~SubscribeAttributePumpConfigurationAndControlMinCompPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70461,12 +46526,12 @@ class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeMinCompPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70475,29 +46540,29 @@ class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute MaxCompPressure */ -class ReadColorControlFeatureMap : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { public: - ReadColorControlFeatureMap() - : ReadAttribute("feature-map") + ReadPumpConfigurationAndControlMaxCompPressure() + : ReadAttribute("max-comp-pressure") { } - ~ReadColorControlFeatureMap() {} + ~ReadPumpConfigurationAndControlMaxCompPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); if (error != nil) { - LogNSError("ColorControl FeatureMap read Error", error); + LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); } SetCommandExitStatus(error); }]; @@ -70505,22 +46570,22 @@ class ReadColorControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public SubscribeAttribute { public: - SubscribeAttributeColorControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePumpConfigurationAndControlMaxCompPressure() + : SubscribeAttribute("max-comp-pressure") { } - ~SubscribeAttributeColorControlFeatureMap() {} + ~SubscribeAttributePumpConfigurationAndControlMaxCompPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70531,12 +46596,12 @@ class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeMaxCompPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.FeatureMap response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70545,29 +46610,29 @@ class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute MinConstSpeed */ -class ReadColorControlClusterRevision : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { public: - ReadColorControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadPumpConfigurationAndControlMinConstSpeed() + : ReadAttribute("min-const-speed") { } - ~ReadColorControlClusterRevision() {} + ~ReadPumpConfigurationAndControlMinConstSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ClusterRevision read Error", error); + LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); } SetCommandExitStatus(error); }]; @@ -70575,22 +46640,22 @@ class ReadColorControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public SubscribeAttribute { public: - SubscribeAttributeColorControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePumpConfigurationAndControlMinConstSpeed() + : SubscribeAttribute("min-const-speed") { } - ~SubscribeAttributeColorControlClusterRevision() {} + ~SubscribeAttributePumpConfigurationAndControlMinConstSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70601,12 +46666,12 @@ class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMinConstSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ClusterRevision response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70614,60 +46679,30 @@ class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute } }; -/*----------------------------------------------------------------------------*\ -| Cluster BallastConfiguration | 0x0301 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhysicalMinLevel | 0x0000 | -| * PhysicalMaxLevel | 0x0001 | -| * BallastStatus | 0x0002 | -| * MinLevel | 0x0010 | -| * MaxLevel | 0x0011 | -| * IntrinsicBallastFactor | 0x0014 | -| * BallastFactorAdjustment | 0x0015 | -| * LampQuantity | 0x0020 | -| * LampType | 0x0030 | -| * LampManufacturer | 0x0031 | -| * LampRatedHours | 0x0032 | -| * LampBurnHours | 0x0033 | -| * LampAlarmMode | 0x0034 | -| * LampBurnHoursTripPoint | 0x0035 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute PhysicalMinLevel + * Attribute MaxConstSpeed */ -class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { public: - ReadBallastConfigurationPhysicalMinLevel() - : ReadAttribute("physical-min-level") + ReadPumpConfigurationAndControlMaxConstSpeed() + : ReadAttribute("max-const-speed") { } - ~ReadBallastConfigurationPhysicalMinLevel() {} + ~ReadPumpConfigurationAndControlMaxConstSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration PhysicalMinLevel read Error", error); + LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); } SetCommandExitStatus(error); }]; @@ -70675,22 +46710,22 @@ class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationPhysicalMinLevel() - : SubscribeAttribute("physical-min-level") + SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() + : SubscribeAttribute("max-const-speed") { } - ~SubscribeAttributeBallastConfigurationPhysicalMinLevel() {} + ~SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70701,12 +46736,12 @@ class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalMinLevelWithParams:params + [cluster subscribeAttributeMaxConstSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70715,29 +46750,29 @@ class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeA }; /* - * Attribute PhysicalMaxLevel + * Attribute MinConstFlow */ -class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { public: - ReadBallastConfigurationPhysicalMaxLevel() - : ReadAttribute("physical-max-level") + ReadPumpConfigurationAndControlMinConstFlow() + : ReadAttribute("min-const-flow") { } - ~ReadBallastConfigurationPhysicalMaxLevel() {} + ~ReadPumpConfigurationAndControlMinConstFlow() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration PhysicalMaxLevel read Error", error); + LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); } SetCommandExitStatus(error); }]; @@ -70745,22 +46780,22 @@ class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationPhysicalMaxLevel() - : SubscribeAttribute("physical-max-level") + SubscribeAttributePumpConfigurationAndControlMinConstFlow() + : SubscribeAttribute("min-const-flow") { } - ~SubscribeAttributeBallastConfigurationPhysicalMaxLevel() {} + ~SubscribeAttributePumpConfigurationAndControlMinConstFlow() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70771,12 +46806,12 @@ class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalMaxLevelWithParams:params + [cluster subscribeAttributeMinConstFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70785,29 +46820,29 @@ class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeA }; /* - * Attribute BallastStatus + * Attribute MaxConstFlow */ -class ReadBallastConfigurationBallastStatus : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { public: - ReadBallastConfigurationBallastStatus() - : ReadAttribute("ballast-status") + ReadPumpConfigurationAndControlMaxConstFlow() + : ReadAttribute("max-const-flow") { } - ~ReadBallastConfigurationBallastStatus() {} + ~ReadPumpConfigurationAndControlMaxConstFlow() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration BallastStatus read Error", error); + LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); } SetCommandExitStatus(error); }]; @@ -70815,22 +46850,22 @@ class ReadBallastConfigurationBallastStatus : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationBallastStatus() - : SubscribeAttribute("ballast-status") + SubscribeAttributePumpConfigurationAndControlMaxConstFlow() + : SubscribeAttribute("max-const-flow") { } - ~SubscribeAttributeBallastConfigurationBallastStatus() {} + ~SubscribeAttributePumpConfigurationAndControlMaxConstFlow() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70841,12 +46876,12 @@ class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBallastStatusWithParams:params + [cluster subscribeAttributeMaxConstFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70855,29 +46890,29 @@ class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttr }; /* - * Attribute MinLevel + * Attribute MinConstTemp */ -class ReadBallastConfigurationMinLevel : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { public: - ReadBallastConfigurationMinLevel() - : ReadAttribute("min-level") + ReadPumpConfigurationAndControlMinConstTemp() + : ReadAttribute("min-const-temp") { } - ~ReadBallastConfigurationMinLevel() {} + ~ReadPumpConfigurationAndControlMinConstTemp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration MinLevel read Error", error); + LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); } SetCommandExitStatus(error); }]; @@ -70885,62 +46920,22 @@ class ReadBallastConfigurationMinLevel : public ReadAttribute { } }; -class WriteBallastConfigurationMinLevel : public WriteAttribute { -public: - WriteBallastConfigurationMinLevel() - : WriteAttribute("min-level") - { - AddArgument("attr-name", "min-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationMinLevel() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000010) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeMinLevelWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration MinLevel write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationMinLevel() - : SubscribeAttribute("min-level") + SubscribeAttributePumpConfigurationAndControlMinConstTemp() + : SubscribeAttribute("min-const-temp") { } - ~SubscribeAttributeBallastConfigurationMinLevel() {} + ~SubscribeAttributePumpConfigurationAndControlMinConstTemp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70951,12 +46946,12 @@ class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinLevelWithParams:params + [cluster subscribeAttributeMinConstTempWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70965,29 +46960,29 @@ class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute }; /* - * Attribute MaxLevel + * Attribute MaxConstTemp */ -class ReadBallastConfigurationMaxLevel : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { public: - ReadBallastConfigurationMaxLevel() - : ReadAttribute("max-level") + ReadPumpConfigurationAndControlMaxConstTemp() + : ReadAttribute("max-const-temp") { } - ~ReadBallastConfigurationMaxLevel() {} + ~ReadPumpConfigurationAndControlMaxConstTemp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration MaxLevel read Error", error); + LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); } SetCommandExitStatus(error); }]; @@ -70995,62 +46990,22 @@ class ReadBallastConfigurationMaxLevel : public ReadAttribute { } }; -class WriteBallastConfigurationMaxLevel : public WriteAttribute { -public: - WriteBallastConfigurationMaxLevel() - : WriteAttribute("max-level") - { - AddArgument("attr-name", "max-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationMaxLevel() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000011) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeMaxLevelWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration MaxLevel write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationMaxLevel() - : SubscribeAttribute("max-level") + SubscribeAttributePumpConfigurationAndControlMaxConstTemp() + : SubscribeAttribute("max-const-temp") { } - ~SubscribeAttributeBallastConfigurationMaxLevel() {} + ~SubscribeAttributePumpConfigurationAndControlMaxConstTemp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71061,12 +47016,12 @@ class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxLevelWithParams:params + [cluster subscribeAttributeMaxConstTempWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71075,29 +47030,29 @@ class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute }; /* - * Attribute IntrinsicBallastFactor + * Attribute PumpStatus */ -class ReadBallastConfigurationIntrinsicBallastFactor : public ReadAttribute { +class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { public: - ReadBallastConfigurationIntrinsicBallastFactor() - : ReadAttribute("intrinsic-ballast-factor") + ReadPumpConfigurationAndControlPumpStatus() + : ReadAttribute("pump-status") { } - ~ReadBallastConfigurationIntrinsicBallastFactor() {} + ~ReadPumpConfigurationAndControlPumpStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeIntrinsicBallastFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration IntrinsicBallastFactor read Error", error); + LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); } SetCommandExitStatus(error); }]; @@ -71105,63 +47060,22 @@ class ReadBallastConfigurationIntrinsicBallastFactor : public ReadAttribute { } }; -class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { -public: - WriteBallastConfigurationIntrinsicBallastFactor() - : WriteAttribute("intrinsic-ballast-factor") - { - AddArgument("attr-name", "intrinsic-ballast-factor"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationIntrinsicBallastFactor() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000014) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster - writeAttributeIntrinsicBallastFactorWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration IntrinsicBallastFactor write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlPumpStatus : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() - : SubscribeAttribute("intrinsic-ballast-factor") + SubscribeAttributePumpConfigurationAndControlPumpStatus() + : SubscribeAttribute("pump-status") { } - ~SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() {} + ~SubscribeAttributePumpConfigurationAndControlPumpStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71172,12 +47086,12 @@ class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeIntrinsicBallastFactorWithParams:params + [cluster subscribeAttributePumpStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71186,29 +47100,29 @@ class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public Subs }; /* - * Attribute BallastFactorAdjustment + * Attribute EffectiveOperationMode */ -class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { +class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribute { public: - ReadBallastConfigurationBallastFactorAdjustment() - : ReadAttribute("ballast-factor-adjustment") + ReadPumpConfigurationAndControlEffectiveOperationMode() + : ReadAttribute("effective-operation-mode") { } - ~ReadBallastConfigurationBallastFactorAdjustment() {} + ~ReadPumpConfigurationAndControlEffectiveOperationMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000015) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBallastFactorAdjustmentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration BallastFactorAdjustment read Error", error); + LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); } SetCommandExitStatus(error); }]; @@ -71216,63 +47130,22 @@ class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { } }; -class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { -public: - WriteBallastConfigurationBallastFactorAdjustment() - : WriteAttribute("ballast-factor-adjustment") - { - AddArgument("attr-name", "ballast-factor-adjustment"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationBallastFactorAdjustment() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000015) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeBallastFactorAdjustmentWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "BallastConfiguration BallastFactorAdjustment write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationBallastFactorAdjustment() - : SubscribeAttribute("ballast-factor-adjustment") + SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() + : SubscribeAttribute("effective-operation-mode") { } - ~SubscribeAttributeBallastConfigurationBallastFactorAdjustment() {} + ~SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000015) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71283,12 +47156,12 @@ class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBallastFactorAdjustmentWithParams:params + [cluster subscribeAttributeEffectiveOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71297,29 +47170,29 @@ class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public Sub }; /* - * Attribute LampQuantity + * Attribute EffectiveControlMode */ -class ReadBallastConfigurationLampQuantity : public ReadAttribute { +class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute { public: - ReadBallastConfigurationLampQuantity() - : ReadAttribute("lamp-quantity") + ReadPumpConfigurationAndControlEffectiveControlMode() + : ReadAttribute("effective-control-mode") { } - ~ReadBallastConfigurationLampQuantity() {} + ~ReadPumpConfigurationAndControlEffectiveControlMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampQuantity read Error", error); + LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); } SetCommandExitStatus(error); }]; @@ -71327,22 +47200,22 @@ class ReadBallastConfigurationLampQuantity : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampQuantity() - : SubscribeAttribute("lamp-quantity") + SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() + : SubscribeAttribute("effective-control-mode") { } - ~SubscribeAttributeBallastConfigurationLampQuantity() {} + ~SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71353,12 +47226,12 @@ class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampQuantityWithParams:params + [cluster subscribeAttributeEffectiveControlModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71367,29 +47240,29 @@ class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttri }; /* - * Attribute LampType + * Attribute Capacity */ -class ReadBallastConfigurationLampType : public ReadAttribute { +class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { public: - ReadBallastConfigurationLampType() - : ReadAttribute("lamp-type") + ReadPumpConfigurationAndControlCapacity() + : ReadAttribute("capacity") { } - ~ReadBallastConfigurationLampType() {} + ~ReadPumpConfigurationAndControlCapacity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampType read Error", error); + LogNSError("PumpConfigurationAndControl Capacity read Error", error); } SetCommandExitStatus(error); }]; @@ -71397,64 +47270,92 @@ class ReadBallastConfigurationLampType : public ReadAttribute { } }; -class WriteBallastConfigurationLampType : public WriteAttribute { +class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAttribute { public: - WriteBallastConfigurationLampType() - : WriteAttribute("lamp-type") + SubscribeAttributePumpConfigurationAndControlCapacity() + : SubscribeAttribute("capacity") { - AddArgument("attr-name", "lamp-type"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); } - ~WriteBallastConfigurationLampType() {} + ~SubscribeAttributePumpConfigurationAndControlCapacity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() - length:mValue.size() - encoding:NSUTF8StringEncoding]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeCapacityWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); + SetCommandExitStatus(error); + }]; - [cluster writeAttributeLampTypeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampType write Error", error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } +}; + +/* + * Attribute Speed + */ +class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { +public: + ReadPumpConfigurationAndControlSpeed() + : ReadAttribute("speed") + { + } -private: - chip::ByteSpan mValue; + ~ReadPumpConfigurationAndControlSpeed() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000014) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); + if (error != nil) { + LogNSError("PumpConfigurationAndControl Speed read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } }; -class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampType() - : SubscribeAttribute("lamp-type") + SubscribeAttributePumpConfigurationAndControlSpeed() + : SubscribeAttribute("speed") { } - ~SubscribeAttributeBallastConfigurationLampType() {} + ~SubscribeAttributePumpConfigurationAndControlSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71465,12 +47366,12 @@ class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampTypeWithParams:params + [cluster subscribeAttributeSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampType response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71479,29 +47380,29 @@ class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute }; /* - * Attribute LampManufacturer + * Attribute LifetimeRunningHours */ -class ReadBallastConfigurationLampManufacturer : public ReadAttribute { +class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute { public: - ReadBallastConfigurationLampManufacturer() - : ReadAttribute("lamp-manufacturer") + ReadPumpConfigurationAndControlLifetimeRunningHours() + : ReadAttribute("lifetime-running-hours") { } - ~ReadBallastConfigurationLampManufacturer() {} + ~ReadPumpConfigurationAndControlLifetimeRunningHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampManufacturer read Error", error); + LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); } SetCommandExitStatus(error); }]; @@ -71509,64 +47410,63 @@ class ReadBallastConfigurationLampManufacturer : public ReadAttribute { } }; -class WriteBallastConfigurationLampManufacturer : public WriteAttribute { +class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribute { public: - WriteBallastConfigurationLampManufacturer() - : WriteAttribute("lamp-manufacturer") + WritePumpConfigurationAndControlLifetimeRunningHours() + : WriteAttribute("lifetime-running-hours") { - AddArgument("attr-name", "lamp-manufacturer"); - AddArgument("attr-value", &mValue); + AddArgument("attr-name", "lifetime-running-hours"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteBallastConfigurationLampManufacturer() {} + ~WritePumpConfigurationAndControlLifetimeRunningHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() - length:mValue.size() - encoding:NSUTF8StringEncoding]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - [cluster writeAttributeLampManufacturerWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampManufacturer write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeLifetimeRunningHoursWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::ByteSpan mValue; + uint32_t mValue; }; -class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampManufacturer() - : SubscribeAttribute("lamp-manufacturer") + SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() + : SubscribeAttribute("lifetime-running-hours") { } - ~SubscribeAttributeBallastConfigurationLampManufacturer() {} + ~SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71577,12 +47477,12 @@ class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampManufacturerWithParams:params + [cluster subscribeAttributeLifetimeRunningHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71591,92 +47491,52 @@ class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeA }; /* - * Attribute LampRatedHours + * Attribute Power */ -class ReadBallastConfigurationLampRatedHours : public ReadAttribute { +class ReadPumpConfigurationAndControlPower : public ReadAttribute { public: - ReadBallastConfigurationLampRatedHours() - : ReadAttribute("lamp-rated-hours") + ReadPumpConfigurationAndControlPower() + : ReadAttribute("power") { } - ~ReadBallastConfigurationLampRatedHours() {} + ~ReadPumpConfigurationAndControlPower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampRatedHours read Error", error); + LogNSError("PumpConfigurationAndControl Power read Error", error); } SetCommandExitStatus(error); }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationLampRatedHours : public WriteAttribute { -public: - WriteBallastConfigurationLampRatedHours() - : WriteAttribute("lamp-rated-hours") - { - AddArgument("attr-name", "lamp-rated-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampRatedHours() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000032) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeLampRatedHoursWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampRatedHours write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; + return CHIP_NO_ERROR; + } }; -class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampRatedHours() - : SubscribeAttribute("lamp-rated-hours") + SubscribeAttributePumpConfigurationAndControlPower() + : SubscribeAttribute("power") { } - ~SubscribeAttributeBallastConfigurationLampRatedHours() {} + ~SubscribeAttributePumpConfigurationAndControlPower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71687,12 +47547,12 @@ class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampRatedHoursWithParams:params + [cluster subscribeAttributePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71701,29 +47561,29 @@ class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAtt }; /* - * Attribute LampBurnHours + * Attribute LifetimeEnergyConsumed */ -class ReadBallastConfigurationLampBurnHours : public ReadAttribute { +class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribute { public: - ReadBallastConfigurationLampBurnHours() - : ReadAttribute("lamp-burn-hours") + ReadPumpConfigurationAndControlLifetimeEnergyConsumed() + : ReadAttribute("lifetime-energy-consumed") { } - ~ReadBallastConfigurationLampBurnHours() {} + ~ReadPumpConfigurationAndControlLifetimeEnergyConsumed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000033) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampBurnHours read Error", error); + LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); } SetCommandExitStatus(error); }]; @@ -71731,39 +47591,41 @@ class ReadBallastConfigurationLampBurnHours : public ReadAttribute { } }; -class WriteBallastConfigurationLampBurnHours : public WriteAttribute { +class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttribute { public: - WriteBallastConfigurationLampBurnHours() - : WriteAttribute("lamp-burn-hours") + WritePumpConfigurationAndControlLifetimeEnergyConsumed() + : WriteAttribute("lifetime-energy-consumed") { - AddArgument("attr-name", "lamp-burn-hours"); + AddArgument("attr-name", "lifetime-energy-consumed"); AddArgument("attr-value", 0, UINT32_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteBallastConfigurationLampBurnHours() {} + ~WritePumpConfigurationAndControlLifetimeEnergyConsumed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000033) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - [cluster writeAttributeLampBurnHoursWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampBurnHours write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeLifetimeEnergyConsumedWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -71771,22 +47633,22 @@ class WriteBallastConfigurationLampBurnHours : public WriteAttribute { uint32_t mValue; }; -class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampBurnHours() - : SubscribeAttribute("lamp-burn-hours") + SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() + : SubscribeAttribute("lifetime-energy-consumed") { } - ~SubscribeAttributeBallastConfigurationLampBurnHours() {} + ~SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000033) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71797,12 +47659,12 @@ class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampBurnHoursWithParams:params + [cluster subscribeAttributeLifetimeEnergyConsumedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71811,29 +47673,29 @@ class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttr }; /* - * Attribute LampAlarmMode + * Attribute OperationMode */ -class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { +class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { public: - ReadBallastConfigurationLampAlarmMode() - : ReadAttribute("lamp-alarm-mode") + ReadPumpConfigurationAndControlOperationMode() + : ReadAttribute("operation-mode") { } - ~ReadBallastConfigurationLampAlarmMode() {} + ~ReadPumpConfigurationAndControlOperationMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000034) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampAlarmMode read Error", error); + LogNSError("PumpConfigurationAndControl OperationMode read Error", error); } SetCommandExitStatus(error); }]; @@ -71841,36 +47703,36 @@ class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { } }; -class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { +class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { public: - WriteBallastConfigurationLampAlarmMode() - : WriteAttribute("lamp-alarm-mode") + WritePumpConfigurationAndControlOperationMode() + : WriteAttribute("operation-mode") { - AddArgument("attr-name", "lamp-alarm-mode"); + AddArgument("attr-name", "operation-mode"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteBallastConfigurationLampAlarmMode() {} + ~WritePumpConfigurationAndControlOperationMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000034) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeLampAlarmModeWithValue:value + [cluster writeAttributeOperationModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("BallastConfiguration LampAlarmMode write Error", error); + LogNSError("PumpConfigurationAndControl OperationMode write Error", error); } SetCommandExitStatus(error); }]; @@ -71881,22 +47743,22 @@ class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlOperationMode : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampAlarmMode() - : SubscribeAttribute("lamp-alarm-mode") + SubscribeAttributePumpConfigurationAndControlOperationMode() + : SubscribeAttribute("operation-mode") { } - ~SubscribeAttributeBallastConfigurationLampAlarmMode() {} + ~SubscribeAttributePumpConfigurationAndControlOperationMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000034) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71907,12 +47769,12 @@ class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampAlarmModeWithParams:params + [cluster subscribeAttributeOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71921,29 +47783,29 @@ class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttr }; /* - * Attribute LampBurnHoursTripPoint + * Attribute ControlMode */ -class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { +class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { public: - ReadBallastConfigurationLampBurnHoursTripPoint() - : ReadAttribute("lamp-burn-hours-trip-point") + ReadPumpConfigurationAndControlControlMode() + : ReadAttribute("control-mode") { } - ~ReadBallastConfigurationLampBurnHoursTripPoint() {} + ~ReadPumpConfigurationAndControlControlMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000035) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampBurnHoursTripPoint read Error", error); + LogNSError("PumpConfigurationAndControl ControlMode read Error", error); } SetCommandExitStatus(error); }]; @@ -71951,63 +47813,62 @@ class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { } }; -class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { +class WritePumpConfigurationAndControlControlMode : public WriteAttribute { public: - WriteBallastConfigurationLampBurnHoursTripPoint() - : WriteAttribute("lamp-burn-hours-trip-point") + WritePumpConfigurationAndControlControlMode() + : WriteAttribute("control-mode") { - AddArgument("attr-name", "lamp-burn-hours-trip-point"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); + AddArgument("attr-name", "control-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteBallastConfigurationLampBurnHoursTripPoint() {} + ~WritePumpConfigurationAndControlControlMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000035) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster - writeAttributeLampBurnHoursTripPointWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeControlModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl ControlMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint32_t mValue; + uint8_t mValue; }; -class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlControlMode : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() - : SubscribeAttribute("lamp-burn-hours-trip-point") + SubscribeAttributePumpConfigurationAndControlControlMode() + : SubscribeAttribute("control-mode") { } - ~SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() {} + ~SubscribeAttributePumpConfigurationAndControlControlMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000035) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72018,12 +47879,12 @@ class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampBurnHoursTripPointWithParams:params + [cluster subscribeAttributeControlModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72034,27 +47895,27 @@ class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public Subs /* * Attribute GeneratedCommandList */ -class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { +class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute { public: - ReadBallastConfigurationGeneratedCommandList() + ReadPumpConfigurationAndControlGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadBallastConfigurationGeneratedCommandList() {} + ~ReadPumpConfigurationAndControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration GeneratedCommandList read Error", error); + LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -72062,22 +47923,22 @@ class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationGeneratedCommandList() + SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBallastConfigurationGeneratedCommandList() {} + ~SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72093,7 +47954,7 @@ class SubscribeAttributeBallastConfigurationGeneratedCommandList : public Subscr mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72104,27 +47965,27 @@ class SubscribeAttributeBallastConfigurationGeneratedCommandList : public Subscr /* * Attribute AcceptedCommandList */ -class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { +class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute { public: - ReadBallastConfigurationAcceptedCommandList() + ReadPumpConfigurationAndControlAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadBallastConfigurationAcceptedCommandList() {} + ~ReadPumpConfigurationAndControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration AcceptedCommandList read Error", error); + LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -72132,22 +47993,22 @@ class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationAcceptedCommandList() + SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBallastConfigurationAcceptedCommandList() {} + ~SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72163,7 +48024,7 @@ class SubscribeAttributeBallastConfigurationAcceptedCommandList : public Subscri mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72172,29 +48033,29 @@ class SubscribeAttributeBallastConfigurationAcceptedCommandList : public Subscri }; /* - * Attribute EventList + * Attribute AttributeList */ -class ReadBallastConfigurationEventList : public ReadAttribute { +class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { public: - ReadBallastConfigurationEventList() - : ReadAttribute("event-list") + ReadPumpConfigurationAndControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadBallastConfigurationEventList() {} + ~ReadPumpConfigurationAndControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration EventList read Error", error); + LogNSError("PumpConfigurationAndControl AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -72202,22 +48063,22 @@ class ReadBallastConfigurationEventList : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationEventList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePumpConfigurationAndControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBallastConfigurationEventList() {} + ~SubscribeAttributePumpConfigurationAndControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72228,12 +48089,12 @@ class SubscribeAttributeBallastConfigurationEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.EventList response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72242,29 +48103,29 @@ class SubscribeAttributeBallastConfigurationEventList : public SubscribeAttribut }; /* - * Attribute AttributeList + * Attribute FeatureMap */ -class ReadBallastConfigurationAttributeList : public ReadAttribute { +class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { public: - ReadBallastConfigurationAttributeList() - : ReadAttribute("attribute-list") + ReadPumpConfigurationAndControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBallastConfigurationAttributeList() {} + ~ReadPumpConfigurationAndControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration AttributeList read Error", error); + LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -72272,22 +48133,22 @@ class ReadBallastConfigurationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePumpConfigurationAndControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBallastConfigurationAttributeList() {} + ~SubscribeAttributePumpConfigurationAndControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72298,12 +48159,82 @@ class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ClusterRevision + */ +class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { +public: + ReadPumpConfigurationAndControlClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadPumpConfigurationAndControlClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); + if (error != nil) { + LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePumpConfigurationAndControlClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributePumpConfigurationAndControlClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72311,191 +48242,315 @@ class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttr } }; +/*----------------------------------------------------------------------------*\ +| Cluster Thermostat | 0x0201 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetpointRaiseLower | 0x00 | +| * SetWeeklySchedule | 0x01 | +| * GetWeeklySchedule | 0x02 | +| * ClearWeeklySchedule | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LocalTemperature | 0x0000 | +| * OutdoorTemperature | 0x0001 | +| * Occupancy | 0x0002 | +| * AbsMinHeatSetpointLimit | 0x0003 | +| * AbsMaxHeatSetpointLimit | 0x0004 | +| * AbsMinCoolSetpointLimit | 0x0005 | +| * AbsMaxCoolSetpointLimit | 0x0006 | +| * PICoolingDemand | 0x0007 | +| * PIHeatingDemand | 0x0008 | +| * HVACSystemTypeConfiguration | 0x0009 | +| * LocalTemperatureCalibration | 0x0010 | +| * OccupiedCoolingSetpoint | 0x0011 | +| * OccupiedHeatingSetpoint | 0x0012 | +| * UnoccupiedCoolingSetpoint | 0x0013 | +| * UnoccupiedHeatingSetpoint | 0x0014 | +| * MinHeatSetpointLimit | 0x0015 | +| * MaxHeatSetpointLimit | 0x0016 | +| * MinCoolSetpointLimit | 0x0017 | +| * MaxCoolSetpointLimit | 0x0018 | +| * MinSetpointDeadBand | 0x0019 | +| * RemoteSensing | 0x001A | +| * ControlSequenceOfOperation | 0x001B | +| * SystemMode | 0x001C | +| * ThermostatRunningMode | 0x001E | +| * StartOfWeek | 0x0020 | +| * NumberOfWeeklyTransitions | 0x0021 | +| * NumberOfDailyTransitions | 0x0022 | +| * TemperatureSetpointHold | 0x0023 | +| * TemperatureSetpointHoldDuration | 0x0024 | +| * ThermostatProgrammingOperationMode | 0x0025 | +| * ThermostatRunningState | 0x0029 | +| * SetpointChangeSource | 0x0030 | +| * SetpointChangeAmount | 0x0031 | +| * SetpointChangeSourceTimestamp | 0x0032 | +| * OccupiedSetback | 0x0034 | +| * OccupiedSetbackMin | 0x0035 | +| * OccupiedSetbackMax | 0x0036 | +| * UnoccupiedSetback | 0x0037 | +| * UnoccupiedSetbackMin | 0x0038 | +| * UnoccupiedSetbackMax | 0x0039 | +| * EmergencyHeatDelta | 0x003A | +| * ACType | 0x0040 | +| * ACCapacity | 0x0041 | +| * ACRefrigerantType | 0x0042 | +| * ACCompressorType | 0x0043 | +| * ACErrorCode | 0x0044 | +| * ACLouverPosition | 0x0045 | +| * ACCoilTemperature | 0x0046 | +| * ACCapacityformat | 0x0047 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute FeatureMap + * Command SetpointRaiseLower */ -class ReadBallastConfigurationFeatureMap : public ReadAttribute { +class ThermostatSetpointRaiseLower : public ClusterCommand { public: - ReadBallastConfigurationFeatureMap() - : ReadAttribute("feature-map") + ThermostatSetpointRaiseLower() + : ClusterCommand("setpoint-raise-lower") { + AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); + AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); + ClusterCommand::AddArguments(); } - ~ReadBallastConfigurationFeatureMap() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("BallastConfiguration FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.mode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.mode)]; + params.amount = [NSNumber numberWithChar:mRequest.amount]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setpointRaiseLowerWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type mRequest; }; -class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribute { +/* + * Command SetWeeklySchedule + */ +class ThermostatSetWeeklySchedule : public ClusterCommand { public: - SubscribeAttributeBallastConfigurationFeatureMap() - : SubscribeAttribute("feature-map") + ThermostatSetWeeklySchedule() + : ClusterCommand("set-weekly-schedule") + , mComplex_Transitions(&mRequest.transitions) { + AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); + AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); + AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); + AddArgument("Transitions", &mComplex_Transitions); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeBallastConfigurationFeatureMap() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:mRequest.numberOfTransitionsForSequence]; + params.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekForSequence.Raw()]; + params.modeForSequence = [NSNumber numberWithUnsignedChar:mRequest.modeForSequence.Raw()]; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.transitions) { + MTRThermostatClusterThermostatScheduleTransition * newElement_0; + newElement_0 = [MTRThermostatClusterThermostatScheduleTransition new]; + newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; + if (entry_0.heatSetpoint.IsNull()) { + newElement_0.heatSetpoint = nil; + } else { + newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; + } + if (entry_0.coolSetpoint.IsNull()) { + newElement_0.coolSetpoint = nil; + } else { + newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; + } + [array_0 addObject:newElement_0]; + } + params.transitions = array_0; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setWeeklyScheduleWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; + TypedComplexArgument< + chip::app::DataModel::List> + mComplex_Transitions; }; /* - * Attribute ClusterRevision + * Command GetWeeklySchedule */ -class ReadBallastConfigurationClusterRevision : public ReadAttribute { +class ThermostatGetWeeklySchedule : public ClusterCommand { public: - ReadBallastConfigurationClusterRevision() - : ReadAttribute("cluster-revision") + ThermostatGetWeeklySchedule() + : ClusterCommand("get-weekly-schedule") { + AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); + AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); + ClusterCommand::AddArguments(); } - ~ReadBallastConfigurationClusterRevision() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("BallastConfiguration ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.daysToReturn = [NSNumber numberWithUnsignedChar:mRequest.daysToReturn.Raw()]; + params.modeToReturn = [NSNumber numberWithUnsignedChar:mRequest.modeToReturn.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getWeeklyScheduleWithParams:params + completion:^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; }; -class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAttribute { +/* + * Command ClearWeeklySchedule + */ +class ThermostatClearWeeklySchedule : public ClusterCommand { public: - SubscribeAttributeBallastConfigurationClusterRevision() - : SubscribeAttribute("cluster-revision") + ThermostatClearWeeklySchedule() + : ClusterCommand("clear-weekly-schedule") { + ClusterCommand::AddArguments(); } - ~SubscribeAttributeBallastConfigurationClusterRevision() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearWeeklyScheduleWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } -}; -/*----------------------------------------------------------------------------*\ -| Cluster IlluminanceMeasurement | 0x0400 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * LightSensorType | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +private: +}; /* - * Attribute MeasuredValue + * Attribute LocalTemperature */ -class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { +class ReadThermostatLocalTemperature : public ReadAttribute { public: - ReadIlluminanceMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadThermostatLocalTemperature() + : ReadAttribute("local-temperature") { } - ~ReadIlluminanceMeasurementMeasuredValue() {} + ~ReadThermostatLocalTemperature() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.LocalTemperature response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement MeasuredValue read Error", error); + LogNSError("Thermostat LocalTemperature read Error", error); } SetCommandExitStatus(error); }]; @@ -72503,22 +48558,22 @@ class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeThermostatLocalTemperature() + : SubscribeAttribute("local-temperature") { } - ~SubscribeAttributeIlluminanceMeasurementMeasuredValue() {} + ~SubscribeAttributeThermostatLocalTemperature() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72529,12 +48584,12 @@ class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeLocalTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"Thermostat.LocalTemperature response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72543,29 +48598,29 @@ class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAt }; /* - * Attribute MinMeasuredValue + * Attribute OutdoorTemperature */ -class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { +class ReadThermostatOutdoorTemperature : public ReadAttribute { public: - ReadIlluminanceMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadThermostatOutdoorTemperature() + : ReadAttribute("outdoor-temperature") { } - ~ReadIlluminanceMeasurementMinMeasuredValue() {} + ~ReadThermostatOutdoorTemperature() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement MinMeasuredValue read Error", error); + LogNSError("Thermostat OutdoorTemperature read Error", error); } SetCommandExitStatus(error); }]; @@ -72573,22 +48628,22 @@ class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeThermostatOutdoorTemperature() + : SubscribeAttribute("outdoor-temperature") { } - ~SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() {} + ~SubscribeAttributeThermostatOutdoorTemperature() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72599,12 +48654,12 @@ class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeOutdoorTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72613,29 +48668,29 @@ class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public Subscrib }; /* - * Attribute MaxMeasuredValue + * Attribute Occupancy */ -class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadThermostatOccupancy : public ReadAttribute { public: - ReadIlluminanceMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadThermostatOccupancy() + : ReadAttribute("occupancy") { } - ~ReadIlluminanceMeasurementMaxMeasuredValue() {} + ~ReadThermostatOccupancy() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Occupancy response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement MaxMeasuredValue read Error", error); + LogNSError("Thermostat Occupancy read Error", error); } SetCommandExitStatus(error); }]; @@ -72643,22 +48698,22 @@ class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeThermostatOccupancy() + : SubscribeAttribute("occupancy") { } - ~SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() {} + ~SubscribeAttributeThermostatOccupancy() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72669,12 +48724,12 @@ class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeOccupancyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"Thermostat.Occupancy response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72683,29 +48738,29 @@ class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public Subscrib }; /* - * Attribute Tolerance + * Attribute AbsMinHeatSetpointLimit */ -class ReadIlluminanceMeasurementTolerance : public ReadAttribute { +class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { public: - ReadIlluminanceMeasurementTolerance() - : ReadAttribute("tolerance") + ReadThermostatAbsMinHeatSetpointLimit() + : ReadAttribute("abs-min-heat-setpoint-limit") { } - ~ReadIlluminanceMeasurementTolerance() {} + ~ReadThermostatAbsMinHeatSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement Tolerance read Error", error); + LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -72713,22 +48768,22 @@ class ReadIlluminanceMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementTolerance() - : SubscribeAttribute("tolerance") + SubscribeAttributeThermostatAbsMinHeatSetpointLimit() + : SubscribeAttribute("abs-min-heat-setpoint-limit") { } - ~SubscribeAttributeIlluminanceMeasurementTolerance() {} + ~SubscribeAttributeThermostatAbsMinHeatSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72739,12 +48794,12 @@ class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeToleranceWithParams:params + [cluster subscribeAttributeAbsMinHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); + NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72753,29 +48808,29 @@ class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttrib }; /* - * Attribute LightSensorType + * Attribute AbsMaxHeatSetpointLimit */ -class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { +class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { public: - ReadIlluminanceMeasurementLightSensorType() - : ReadAttribute("light-sensor-type") + ReadThermostatAbsMaxHeatSetpointLimit() + : ReadAttribute("abs-max-heat-setpoint-limit") { } - ~ReadIlluminanceMeasurementLightSensorType() {} + ~ReadThermostatAbsMaxHeatSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement LightSensorType read Error", error); + LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -72783,22 +48838,22 @@ class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementLightSensorType : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementLightSensorType() - : SubscribeAttribute("light-sensor-type") + SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() + : SubscribeAttribute("abs-max-heat-setpoint-limit") { } - ~SubscribeAttributeIlluminanceMeasurementLightSensorType() {} + ~SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72809,12 +48864,12 @@ class SubscribeAttributeIlluminanceMeasurementLightSensorType : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLightSensorTypeWithParams:params + [cluster subscribeAttributeAbsMaxHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); + NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72823,29 +48878,29 @@ class SubscribeAttributeIlluminanceMeasurementLightSensorType : public Subscribe }; /* - * Attribute GeneratedCommandList + * Attribute AbsMinCoolSetpointLimit */ -class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { +class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { public: - ReadIlluminanceMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThermostatAbsMinCoolSetpointLimit() + : ReadAttribute("abs-min-cool-setpoint-limit") { } - ~ReadIlluminanceMeasurementGeneratedCommandList() {} + ~ReadThermostatAbsMinCoolSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement GeneratedCommandList read Error", error); + LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -72853,22 +48908,22 @@ class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeThermostatAbsMinCoolSetpointLimit() + : SubscribeAttribute("abs-min-cool-setpoint-limit") { } - ~SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() {} + ~SubscribeAttributeThermostatAbsMinCoolSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72879,12 +48934,12 @@ class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAbsMinCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72893,29 +48948,29 @@ class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public Subs }; /* - * Attribute AcceptedCommandList + * Attribute AbsMaxCoolSetpointLimit */ -class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { +class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { public: - ReadIlluminanceMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThermostatAbsMaxCoolSetpointLimit() + : ReadAttribute("abs-max-cool-setpoint-limit") { } - ~ReadIlluminanceMeasurementAcceptedCommandList() {} + ~ReadThermostatAbsMaxCoolSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement AcceptedCommandList read Error", error); + LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -72923,22 +48978,22 @@ class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() + : SubscribeAttribute("abs-max-cool-setpoint-limit") { } - ~SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() {} + ~SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72949,12 +49004,12 @@ class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAbsMaxCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72963,29 +49018,29 @@ class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public Subsc }; /* - * Attribute EventList + * Attribute PICoolingDemand */ -class ReadIlluminanceMeasurementEventList : public ReadAttribute { +class ReadThermostatPICoolingDemand : public ReadAttribute { public: - ReadIlluminanceMeasurementEventList() - : ReadAttribute("event-list") + ReadThermostatPICoolingDemand() + : ReadAttribute("picooling-demand") { } - ~ReadIlluminanceMeasurementEventList() {} + ~ReadThermostatPICoolingDemand() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement EventList read Error", error); + LogNSError("Thermostat PICoolingDemand read Error", error); } SetCommandExitStatus(error); }]; @@ -72993,22 +49048,22 @@ class ReadIlluminanceMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeThermostatPICoolingDemand() + : SubscribeAttribute("picooling-demand") { } - ~SubscribeAttributeIlluminanceMeasurementEventList() {} + ~SubscribeAttributeThermostatPICoolingDemand() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73019,12 +49074,12 @@ class SubscribeAttributeIlluminanceMeasurementEventList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePICoolingDemandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73033,29 +49088,29 @@ class SubscribeAttributeIlluminanceMeasurementEventList : public SubscribeAttrib }; /* - * Attribute AttributeList + * Attribute PIHeatingDemand */ -class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { +class ReadThermostatPIHeatingDemand : public ReadAttribute { public: - ReadIlluminanceMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadThermostatPIHeatingDemand() + : ReadAttribute("piheating-demand") { } - ~ReadIlluminanceMeasurementAttributeList() {} + ~ReadThermostatPIHeatingDemand() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement AttributeList read Error", error); + LogNSError("Thermostat PIHeatingDemand read Error", error); } SetCommandExitStatus(error); }]; @@ -73063,22 +49118,22 @@ class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeThermostatPIHeatingDemand() + : SubscribeAttribute("piheating-demand") { } - ~SubscribeAttributeIlluminanceMeasurementAttributeList() {} + ~SubscribeAttributeThermostatPIHeatingDemand() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73089,12 +49144,12 @@ class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePIHeatingDemandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73103,29 +49158,29 @@ class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAt }; /* - * Attribute FeatureMap + * Attribute HVACSystemTypeConfiguration */ -class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { +class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { public: - ReadIlluminanceMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadThermostatHVACSystemTypeConfiguration() + : ReadAttribute("hvacsystem-type-configuration") { } - ~ReadIlluminanceMeasurementFeatureMap() {} + ~ReadThermostatHVACSystemTypeConfiguration() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement FeatureMap read Error", error); + LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); } SetCommandExitStatus(error); }]; @@ -73133,22 +49188,63 @@ class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttribute { +class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { public: - SubscribeAttributeIlluminanceMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + WriteThermostatHVACSystemTypeConfiguration() + : WriteAttribute("hvacsystem-type-configuration") { + AddArgument("attr-name", "hvacsystem-type-configuration"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeIlluminanceMeasurementFeatureMap() {} + ~WriteThermostatHVACSystemTypeConfiguration() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster + writeAttributeHVACSystemTypeConfigurationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public SubscribeAttribute { +public: + SubscribeAttributeThermostatHVACSystemTypeConfiguration() + : SubscribeAttribute("hvacsystem-type-configuration") + { + } + + ~SubscribeAttributeThermostatHVACSystemTypeConfiguration() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000009) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73159,12 +49255,12 @@ class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeHVACSystemTypeConfigurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); + NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73173,29 +49269,29 @@ class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttri }; /* - * Attribute ClusterRevision + * Attribute LocalTemperatureCalibration */ -class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { +class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { public: - ReadIlluminanceMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadThermostatLocalTemperatureCalibration() + : ReadAttribute("local-temperature-calibration") { } - ~ReadIlluminanceMeasurementClusterRevision() {} + ~ReadThermostatLocalTemperatureCalibration() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement ClusterRevision read Error", error); + LogNSError("Thermostat LocalTemperatureCalibration read Error", error); } SetCommandExitStatus(error); }]; @@ -73203,22 +49299,63 @@ class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementClusterRevision : public SubscribeAttribute { +class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { public: - SubscribeAttributeIlluminanceMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteThermostatLocalTemperatureCalibration() + : WriteAttribute("local-temperature-calibration") { + AddArgument("attr-name", "local-temperature-calibration"); + AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeIlluminanceMeasurementClusterRevision() {} + ~WriteThermostatLocalTemperatureCalibration() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; + + [cluster + writeAttributeLocalTemperatureCalibrationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat LocalTemperatureCalibration write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int8_t mValue; +}; + +class SubscribeAttributeThermostatLocalTemperatureCalibration : public SubscribeAttribute { +public: + SubscribeAttributeThermostatLocalTemperatureCalibration() + : SubscribeAttribute("local-temperature-calibration") + { + } + + ~SubscribeAttributeThermostatLocalTemperatureCalibration() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000010) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73229,12 +49366,12 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeLocalTemperatureCalibrationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73242,50 +49379,30 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public Subscribe } }; -/*----------------------------------------------------------------------------*\ -| Cluster TemperatureMeasurement | 0x0402 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute OccupiedCoolingSetpoint */ -class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { +class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { public: - ReadTemperatureMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadThermostatOccupiedCoolingSetpoint() + : ReadAttribute("occupied-cooling-setpoint") { } - ~ReadTemperatureMeasurementMeasuredValue() {} + ~ReadThermostatOccupiedCoolingSetpoint() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement MeasuredValue read Error", error); + LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); } SetCommandExitStatus(error); }]; @@ -73293,22 +49410,62 @@ class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAttribute { +class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { public: - SubscribeAttributeTemperatureMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + WriteThermostatOccupiedCoolingSetpoint() + : WriteAttribute("occupied-cooling-setpoint") { + AddArgument("attr-name", "occupied-cooling-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureMeasurementMeasuredValue() {} + ~WriteThermostatOccupiedCoolingSetpoint() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeOccupiedCoolingSetpointWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeThermostatOccupiedCoolingSetpoint() + : SubscribeAttribute("occupied-cooling-setpoint") + { + } + + ~SubscribeAttributeThermostatOccupiedCoolingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000011) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73319,12 +49476,12 @@ class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeOccupiedCoolingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73333,29 +49490,29 @@ class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAt }; /* - * Attribute MinMeasuredValue + * Attribute OccupiedHeatingSetpoint */ -class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { +class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { public: - ReadTemperatureMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadThermostatOccupiedHeatingSetpoint() + : ReadAttribute("occupied-heating-setpoint") { } - ~ReadTemperatureMeasurementMinMeasuredValue() {} + ~ReadThermostatOccupiedHeatingSetpoint() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement MinMeasuredValue read Error", error); + LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); } SetCommandExitStatus(error); }]; @@ -73363,22 +49520,62 @@ class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public SubscribeAttribute { +class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { public: - SubscribeAttributeTemperatureMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + WriteThermostatOccupiedHeatingSetpoint() + : WriteAttribute("occupied-heating-setpoint") + { + AddArgument("attr-name", "occupied-heating-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatOccupiedHeatingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000012) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeOccupiedHeatingSetpointWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeThermostatOccupiedHeatingSetpoint() + : SubscribeAttribute("occupied-heating-setpoint") { } - ~SubscribeAttributeTemperatureMeasurementMinMeasuredValue() {} + ~SubscribeAttributeThermostatOccupiedHeatingSetpoint() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73389,12 +49586,12 @@ class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeOccupiedHeatingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73403,29 +49600,29 @@ class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public Subscrib }; /* - * Attribute MaxMeasuredValue + * Attribute UnoccupiedCoolingSetpoint */ -class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { public: - ReadTemperatureMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadThermostatUnoccupiedCoolingSetpoint() + : ReadAttribute("unoccupied-cooling-setpoint") { } - ~ReadTemperatureMeasurementMaxMeasuredValue() {} + ~ReadThermostatUnoccupiedCoolingSetpoint() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement MaxMeasuredValue read Error", error); + LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); } SetCommandExitStatus(error); }]; @@ -73433,22 +49630,63 @@ class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public SubscribeAttribute { +class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { public: - SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + WriteThermostatUnoccupiedCoolingSetpoint() + : WriteAttribute("unoccupied-cooling-setpoint") { + AddArgument("attr-name", "unoccupied-cooling-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() {} + ~WriteThermostatUnoccupiedCoolingSetpoint() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster + writeAttributeUnoccupiedCoolingSetpointWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() + : SubscribeAttribute("unoccupied-cooling-setpoint") + { + } + + ~SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000013) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73459,12 +49697,12 @@ class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeUnoccupiedCoolingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73473,29 +49711,29 @@ class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public Subscrib }; /* - * Attribute Tolerance + * Attribute UnoccupiedHeatingSetpoint */ -class ReadTemperatureMeasurementTolerance : public ReadAttribute { +class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { public: - ReadTemperatureMeasurementTolerance() - : ReadAttribute("tolerance") + ReadThermostatUnoccupiedHeatingSetpoint() + : ReadAttribute("unoccupied-heating-setpoint") { } - ~ReadTemperatureMeasurementTolerance() {} + ~ReadThermostatUnoccupiedHeatingSetpoint() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement Tolerance read Error", error); + LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); } SetCommandExitStatus(error); }]; @@ -73503,22 +49741,63 @@ class ReadTemperatureMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttribute { +class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { public: - SubscribeAttributeTemperatureMeasurementTolerance() - : SubscribeAttribute("tolerance") + WriteThermostatUnoccupiedHeatingSetpoint() + : WriteAttribute("unoccupied-heating-setpoint") { + AddArgument("attr-name", "unoccupied-heating-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureMeasurementTolerance() {} + ~WriteThermostatUnoccupiedHeatingSetpoint() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster + writeAttributeUnoccupiedHeatingSetpointWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() + : SubscribeAttribute("unoccupied-heating-setpoint") + { + } + + ~SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000014) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73529,12 +49808,12 @@ class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeToleranceWithParams:params + [cluster subscribeAttributeUnoccupiedHeatingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73543,29 +49822,29 @@ class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttrib }; /* - * Attribute GeneratedCommandList + * Attribute MinHeatSetpointLimit */ -class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { +class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { public: - ReadTemperatureMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThermostatMinHeatSetpointLimit() + : ReadAttribute("min-heat-setpoint-limit") { } - ~ReadTemperatureMeasurementGeneratedCommandList() {} + ~ReadThermostatMinHeatSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement GeneratedCommandList read Error", error); + LogNSError("Thermostat MinHeatSetpointLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -73573,22 +49852,62 @@ class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public SubscribeAttribute { +class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { public: - SubscribeAttributeTemperatureMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteThermostatMinHeatSetpointLimit() + : WriteAttribute("min-heat-setpoint-limit") { + AddArgument("attr-name", "min-heat-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureMeasurementGeneratedCommandList() {} + ~WriteThermostatMinHeatSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeMinHeatSetpointLimitWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinHeatSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMinHeatSetpointLimit() + : SubscribeAttribute("min-heat-setpoint-limit") + { + } + + ~SubscribeAttributeThermostatMinHeatSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000015) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73599,12 +49918,12 @@ class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMinHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73613,29 +49932,29 @@ class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public Subs }; /* - * Attribute AcceptedCommandList + * Attribute MaxHeatSetpointLimit */ -class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { +class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { public: - ReadTemperatureMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThermostatMaxHeatSetpointLimit() + : ReadAttribute("max-heat-setpoint-limit") { } - ~ReadTemperatureMeasurementAcceptedCommandList() {} + ~ReadThermostatMaxHeatSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement AcceptedCommandList read Error", error); + LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -73643,22 +49962,62 @@ class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public SubscribeAttribute { +class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { public: - SubscribeAttributeTemperatureMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteThermostatMaxHeatSetpointLimit() + : WriteAttribute("max-heat-setpoint-limit") { + AddArgument("attr-name", "max-heat-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureMeasurementAcceptedCommandList() {} + ~WriteThermostatMaxHeatSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeMaxHeatSetpointLimitWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMaxHeatSetpointLimit() + : SubscribeAttribute("max-heat-setpoint-limit") + { + } + + ~SubscribeAttributeThermostatMaxHeatSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000016) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73669,12 +50028,12 @@ class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMaxHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73683,29 +50042,29 @@ class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public Subsc }; /* - * Attribute EventList + * Attribute MinCoolSetpointLimit */ -class ReadTemperatureMeasurementEventList : public ReadAttribute { +class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { public: - ReadTemperatureMeasurementEventList() - : ReadAttribute("event-list") + ReadThermostatMinCoolSetpointLimit() + : ReadAttribute("min-cool-setpoint-limit") { } - ~ReadTemperatureMeasurementEventList() {} + ~ReadThermostatMinCoolSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement EventList read Error", error); + LogNSError("Thermostat MinCoolSetpointLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -73713,22 +50072,62 @@ class ReadTemperatureMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementEventList : public SubscribeAttribute { +class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { public: - SubscribeAttributeTemperatureMeasurementEventList() - : SubscribeAttribute("event-list") + WriteThermostatMinCoolSetpointLimit() + : WriteAttribute("min-cool-setpoint-limit") { + AddArgument("attr-name", "min-cool-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureMeasurementEventList() {} + ~WriteThermostatMinCoolSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeMinCoolSetpointLimitWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinCoolSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMinCoolSetpointLimit() + : SubscribeAttribute("min-cool-setpoint-limit") + { + } + + ~SubscribeAttributeThermostatMinCoolSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000017) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73739,12 +50138,12 @@ class SubscribeAttributeTemperatureMeasurementEventList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMinCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73753,29 +50152,29 @@ class SubscribeAttributeTemperatureMeasurementEventList : public SubscribeAttrib }; /* - * Attribute AttributeList + * Attribute MaxCoolSetpointLimit */ -class ReadTemperatureMeasurementAttributeList : public ReadAttribute { +class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { public: - ReadTemperatureMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadThermostatMaxCoolSetpointLimit() + : ReadAttribute("max-cool-setpoint-limit") { } - ~ReadTemperatureMeasurementAttributeList() {} + ~ReadThermostatMaxCoolSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement AttributeList read Error", error); + LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -73783,92 +50182,62 @@ class ReadTemperatureMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAttribute { +class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { public: - SubscribeAttributeTemperatureMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + WriteThermostatMaxCoolSetpointLimit() + : WriteAttribute("max-cool-setpoint-limit") { + AddArgument("attr-name", "max-cool-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureMeasurementAttributeList() {} + ~WriteThermostatMaxCoolSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { -public: - ReadTemperatureMeasurementFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadTemperatureMeasurementFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("TemperatureMeasurement FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeMaxCoolSetpointLimitWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } + +private: + int16_t mValue; }; -class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThermostatMaxCoolSetpointLimit() + : SubscribeAttribute("max-cool-setpoint-limit") { } - ~SubscribeAttributeTemperatureMeasurementFeatureMap() {} + ~SubscribeAttributeThermostatMaxCoolSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73879,12 +50248,12 @@ class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeMaxCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); + NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73893,29 +50262,29 @@ class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttri }; /* - * Attribute ClusterRevision + * Attribute MinSetpointDeadBand */ -class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { +class ReadThermostatMinSetpointDeadBand : public ReadAttribute { public: - ReadTemperatureMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadThermostatMinSetpointDeadBand() + : ReadAttribute("min-setpoint-dead-band") { } - ~ReadTemperatureMeasurementClusterRevision() {} + ~ReadThermostatMinSetpointDeadBand() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement ClusterRevision read Error", error); + LogNSError("Thermostat MinSetpointDeadBand read Error", error); } SetCommandExitStatus(error); }]; @@ -73923,22 +50292,62 @@ class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementClusterRevision : public SubscribeAttribute { +class WriteThermostatMinSetpointDeadBand : public WriteAttribute { public: - SubscribeAttributeTemperatureMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteThermostatMinSetpointDeadBand() + : WriteAttribute("min-setpoint-dead-band") { + AddArgument("attr-name", "min-setpoint-dead-band"); + AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureMeasurementClusterRevision() {} + ~WriteThermostatMinSetpointDeadBand() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; + + [cluster writeAttributeMinSetpointDeadBandWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinSetpointDeadBand write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int8_t mValue; +}; + +class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMinSetpointDeadBand() + : SubscribeAttribute("min-setpoint-dead-band") + { + } + + ~SubscribeAttributeThermostatMinSetpointDeadBand() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000019) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73949,12 +50358,12 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMinSetpointDeadBandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73962,55 +50371,30 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe } }; -/*----------------------------------------------------------------------------*\ -| Cluster PressureMeasurement | 0x0403 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * ScaledValue | 0x0010 | -| * MinScaledValue | 0x0011 | -| * MaxScaledValue | 0x0012 | -| * ScaledTolerance | 0x0013 | -| * Scale | 0x0014 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute RemoteSensing */ -class ReadPressureMeasurementMeasuredValue : public ReadAttribute { +class ReadThermostatRemoteSensing : public ReadAttribute { public: - ReadPressureMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadThermostatRemoteSensing() + : ReadAttribute("remote-sensing") { } - ~ReadPressureMeasurementMeasuredValue() {} + ~ReadThermostatRemoteSensing() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.RemoteSensing response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement MeasuredValue read Error", error); + LogNSError("Thermostat RemoteSensing read Error", error); } SetCommandExitStatus(error); }]; @@ -74018,22 +50402,62 @@ class ReadPressureMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttribute { +class WriteThermostatRemoteSensing : public WriteAttribute { public: - SubscribeAttributePressureMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + WriteThermostatRemoteSensing() + : WriteAttribute("remote-sensing") { + AddArgument("attr-name", "remote-sensing"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementMeasuredValue() {} + ~WriteThermostatRemoteSensing() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeRemoteSensingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat RemoteSensing write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { +public: + SubscribeAttributeThermostatRemoteSensing() + : SubscribeAttribute("remote-sensing") + { + } + + ~SubscribeAttributeThermostatRemoteSensing() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74044,12 +50468,12 @@ class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeRemoteSensingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"Thermostat.RemoteSensing response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74058,29 +50482,29 @@ class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttri }; /* - * Attribute MinMeasuredValue + * Attribute ControlSequenceOfOperation */ -class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { +class ReadThermostatControlSequenceOfOperation : public ReadAttribute { public: - ReadPressureMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadThermostatControlSequenceOfOperation() + : ReadAttribute("control-sequence-of-operation") { } - ~ReadPressureMeasurementMinMeasuredValue() {} + ~ReadThermostatControlSequenceOfOperation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement MinMeasuredValue read Error", error); + LogNSError("Thermostat ControlSequenceOfOperation read Error", error); } SetCommandExitStatus(error); }]; @@ -74088,22 +50512,63 @@ class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAttribute { +class WriteThermostatControlSequenceOfOperation : public WriteAttribute { public: - SubscribeAttributePressureMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + WriteThermostatControlSequenceOfOperation() + : WriteAttribute("control-sequence-of-operation") { + AddArgument("attr-name", "control-sequence-of-operation"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementMinMeasuredValue() {} + ~WriteThermostatControlSequenceOfOperation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster + writeAttributeControlSequenceOfOperationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ControlSequenceOfOperation write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeAttribute { +public: + SubscribeAttributeThermostatControlSequenceOfOperation() + : SubscribeAttribute("control-sequence-of-operation") + { + } + + ~SubscribeAttributeThermostatControlSequenceOfOperation() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001B) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74114,12 +50579,12 @@ class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeControlSequenceOfOperationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74128,29 +50593,29 @@ class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAt }; /* - * Attribute MaxMeasuredValue + * Attribute SystemMode */ -class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadThermostatSystemMode : public ReadAttribute { public: - ReadPressureMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadThermostatSystemMode() + : ReadAttribute("system-mode") { } - ~ReadPressureMeasurementMaxMeasuredValue() {} + ~ReadThermostatSystemMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SystemMode response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement MaxMeasuredValue read Error", error); + LogNSError("Thermostat SystemMode read Error", error); } SetCommandExitStatus(error); }]; @@ -74158,22 +50623,62 @@ class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAttribute { +class WriteThermostatSystemMode : public WriteAttribute { public: - SubscribeAttributePressureMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + WriteThermostatSystemMode() + : WriteAttribute("system-mode") { + AddArgument("attr-name", "system-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementMaxMeasuredValue() {} + ~WriteThermostatSystemMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSystemModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat SystemMode write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { +public: + SubscribeAttributeThermostatSystemMode() + : SubscribeAttribute("system-mode") + { + } + + ~SubscribeAttributeThermostatSystemMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001C) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74184,12 +50689,12 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeSystemModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"Thermostat.SystemMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74198,29 +50703,29 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAt }; /* - * Attribute Tolerance + * Attribute ThermostatRunningMode */ -class ReadPressureMeasurementTolerance : public ReadAttribute { +class ReadThermostatThermostatRunningMode : public ReadAttribute { public: - ReadPressureMeasurementTolerance() - : ReadAttribute("tolerance") + ReadThermostatThermostatRunningMode() + : ReadAttribute("thermostat-running-mode") { } - ~ReadPressureMeasurementTolerance() {} + ~ReadThermostatThermostatRunningMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement Tolerance read Error", error); + LogNSError("Thermostat ThermostatRunningMode read Error", error); } SetCommandExitStatus(error); }]; @@ -74228,22 +50733,22 @@ class ReadPressureMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute { +class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementTolerance() - : SubscribeAttribute("tolerance") + SubscribeAttributeThermostatThermostatRunningMode() + : SubscribeAttribute("thermostat-running-mode") { } - ~SubscribeAttributePressureMeasurementTolerance() {} + ~SubscribeAttributeThermostatThermostatRunningMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74254,12 +50759,12 @@ class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeToleranceWithParams:params + [cluster subscribeAttributeThermostatRunningModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); + NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74268,29 +50773,29 @@ class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute }; /* - * Attribute ScaledValue + * Attribute StartOfWeek */ -class ReadPressureMeasurementScaledValue : public ReadAttribute { +class ReadThermostatStartOfWeek : public ReadAttribute { public: - ReadPressureMeasurementScaledValue() - : ReadAttribute("scaled-value") + ReadThermostatStartOfWeek() + : ReadAttribute("start-of-week") { } - ~ReadPressureMeasurementScaledValue() {} + ~ReadThermostatStartOfWeek() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.StartOfWeek response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement ScaledValue read Error", error); + LogNSError("Thermostat StartOfWeek read Error", error); } SetCommandExitStatus(error); }]; @@ -74298,22 +50803,22 @@ class ReadPressureMeasurementScaledValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribute { +class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementScaledValue() - : SubscribeAttribute("scaled-value") + SubscribeAttributeThermostatStartOfWeek() + : SubscribeAttribute("start-of-week") { } - ~SubscribeAttributePressureMeasurementScaledValue() {} + ~SubscribeAttributeThermostatStartOfWeek() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74324,12 +50829,12 @@ class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScaledValueWithParams:params + [cluster subscribeAttributeStartOfWeekWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); + NSLog(@"Thermostat.StartOfWeek response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74338,29 +50843,29 @@ class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribu }; /* - * Attribute MinScaledValue + * Attribute NumberOfWeeklyTransitions */ -class ReadPressureMeasurementMinScaledValue : public ReadAttribute { +class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { public: - ReadPressureMeasurementMinScaledValue() - : ReadAttribute("min-scaled-value") + ReadThermostatNumberOfWeeklyTransitions() + : ReadAttribute("number-of-weekly-transitions") { } - ~ReadPressureMeasurementMinScaledValue() {} + ~ReadThermostatNumberOfWeeklyTransitions() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000011) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000021) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement MinScaledValue read Error", error); + LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); } SetCommandExitStatus(error); }]; @@ -74368,22 +50873,22 @@ class ReadPressureMeasurementMinScaledValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementMinScaledValue() - : SubscribeAttribute("min-scaled-value") + SubscribeAttributeThermostatNumberOfWeeklyTransitions() + : SubscribeAttribute("number-of-weekly-transitions") { } - ~SubscribeAttributePressureMeasurementMinScaledValue() {} + ~SubscribeAttributeThermostatNumberOfWeeklyTransitions() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74394,12 +50899,12 @@ class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinScaledValueWithParams:params + [cluster subscribeAttributeNumberOfWeeklyTransitionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); + NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74408,29 +50913,29 @@ class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttr }; /* - * Attribute MaxScaledValue + * Attribute NumberOfDailyTransitions */ -class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { +class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { public: - ReadPressureMeasurementMaxScaledValue() - : ReadAttribute("max-scaled-value") + ReadThermostatNumberOfDailyTransitions() + : ReadAttribute("number-of-daily-transitions") { } - ~ReadPressureMeasurementMaxScaledValue() {} + ~ReadThermostatNumberOfDailyTransitions() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement MaxScaledValue read Error", error); + LogNSError("Thermostat NumberOfDailyTransitions read Error", error); } SetCommandExitStatus(error); }]; @@ -74438,22 +50943,22 @@ class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementMaxScaledValue() - : SubscribeAttribute("max-scaled-value") + SubscribeAttributeThermostatNumberOfDailyTransitions() + : SubscribeAttribute("number-of-daily-transitions") { } - ~SubscribeAttributePressureMeasurementMaxScaledValue() {} + ~SubscribeAttributeThermostatNumberOfDailyTransitions() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74464,12 +50969,12 @@ class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxScaledValueWithParams:params + [cluster subscribeAttributeNumberOfDailyTransitionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); + NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74478,29 +50983,29 @@ class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttr }; /* - * Attribute ScaledTolerance + * Attribute TemperatureSetpointHold */ -class ReadPressureMeasurementScaledTolerance : public ReadAttribute { +class ReadThermostatTemperatureSetpointHold : public ReadAttribute { public: - ReadPressureMeasurementScaledTolerance() - : ReadAttribute("scaled-tolerance") + ReadThermostatTemperatureSetpointHold() + : ReadAttribute("temperature-setpoint-hold") { } - ~ReadPressureMeasurementScaledTolerance() {} + ~ReadThermostatTemperatureSetpointHold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement ScaledTolerance read Error", error); + LogNSError("Thermostat TemperatureSetpointHold read Error", error); } SetCommandExitStatus(error); }]; @@ -74508,22 +51013,62 @@ class ReadPressureMeasurementScaledTolerance : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAttribute { +class WriteThermostatTemperatureSetpointHold : public WriteAttribute { public: - SubscribeAttributePressureMeasurementScaledTolerance() - : SubscribeAttribute("scaled-tolerance") + WriteThermostatTemperatureSetpointHold() + : WriteAttribute("temperature-setpoint-hold") { + AddArgument("attr-name", "temperature-setpoint-hold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementScaledTolerance() {} + ~WriteThermostatTemperatureSetpointHold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeTemperatureSetpointHoldWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHold write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttribute { +public: + SubscribeAttributeThermostatTemperatureSetpointHold() + : SubscribeAttribute("temperature-setpoint-hold") + { + } + + ~SubscribeAttributeThermostatTemperatureSetpointHold() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000023) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74534,12 +51079,12 @@ class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScaledToleranceWithParams:params + [cluster subscribeAttributeTemperatureSetpointHoldWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); + NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74548,52 +51093,95 @@ class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAtt }; /* - * Attribute Scale + * Attribute TemperatureSetpointHoldDuration */ -class ReadPressureMeasurementScale : public ReadAttribute { +class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { public: - ReadPressureMeasurementScale() - : ReadAttribute("scale") + ReadThermostatTemperatureSetpointHoldDuration() + : ReadAttribute("temperature-setpoint-hold-duration") { } - ~ReadPressureMeasurementScale() {} + ~ReadThermostatTemperatureSetpointHoldDuration() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Scale response %@", [value description]); - if (error != nil) { - LogNSError("PressureMeasurement Scale read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { +class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { public: - SubscribeAttributePressureMeasurementScale() - : SubscribeAttribute("scale") + WriteThermostatTemperatureSetpointHoldDuration() + : WriteAttribute("temperature-setpoint-hold-duration") { + AddArgument("attr-name", "temperature-setpoint-hold-duration"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementScale() {} + ~WriteThermostatTemperatureSetpointHoldDuration() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributeTemperatureSetpointHoldDurationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public SubscribeAttribute { +public: + SubscribeAttributeThermostatTemperatureSetpointHoldDuration() + : SubscribeAttribute("temperature-setpoint-hold-duration") + { + } + + ~SubscribeAttributeThermostatTemperatureSetpointHoldDuration() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000024) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74604,12 +51192,12 @@ class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScaleWithParams:params + [cluster subscribeAttributeTemperatureSetpointHoldDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Scale response %@", [value description]); + NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74618,52 +51206,96 @@ class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute ThermostatProgrammingOperationMode */ -class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { +class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { public: - ReadPressureMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThermostatThermostatProgrammingOperationMode() + : ReadAttribute("thermostat-programming-operation-mode") { } - ~ReadPressureMeasurementGeneratedCommandList() {} + ~ReadThermostatThermostatProgrammingOperationMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("PressureMeasurement GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributePressureMeasurementGeneratedCommandList : public SubscribeAttribute { +class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute { public: - SubscribeAttributePressureMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteThermostatThermostatProgrammingOperationMode() + : WriteAttribute("thermostat-programming-operation-mode") { + AddArgument("attr-name", "thermostat-programming-operation-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementGeneratedCommandList() {} + ~WriteThermostatThermostatProgrammingOperationMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster + writeAttributeThermostatProgrammingOperationModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "Thermostat ThermostatProgrammingOperationMode write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public SubscribeAttribute { +public: + SubscribeAttributeThermostatThermostatProgrammingOperationMode() + : SubscribeAttribute("thermostat-programming-operation-mode") + { + } + + ~SubscribeAttributeThermostatThermostatProgrammingOperationMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000025) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74674,12 +51306,12 @@ class SubscribeAttributePressureMeasurementGeneratedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeThermostatProgrammingOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74688,29 +51320,29 @@ class SubscribeAttributePressureMeasurementGeneratedCommandList : public Subscri }; /* - * Attribute AcceptedCommandList + * Attribute ThermostatRunningState */ -class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { +class ReadThermostatThermostatRunningState : public ReadAttribute { public: - ReadPressureMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThermostatThermostatRunningState() + : ReadAttribute("thermostat-running-state") { } - ~ReadPressureMeasurementAcceptedCommandList() {} + ~ReadThermostatThermostatRunningState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement AcceptedCommandList read Error", error); + LogNSError("Thermostat ThermostatRunningState read Error", error); } SetCommandExitStatus(error); }]; @@ -74718,22 +51350,22 @@ class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeThermostatThermostatRunningState() + : SubscribeAttribute("thermostat-running-state") { } - ~SubscribeAttributePressureMeasurementAcceptedCommandList() {} + ~SubscribeAttributeThermostatThermostatRunningState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74744,12 +51376,12 @@ class SubscribeAttributePressureMeasurementAcceptedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeThermostatRunningStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74758,29 +51390,29 @@ class SubscribeAttributePressureMeasurementAcceptedCommandList : public Subscrib }; /* - * Attribute EventList + * Attribute SetpointChangeSource */ -class ReadPressureMeasurementEventList : public ReadAttribute { +class ReadThermostatSetpointChangeSource : public ReadAttribute { public: - ReadPressureMeasurementEventList() - : ReadAttribute("event-list") + ReadThermostatSetpointChangeSource() + : ReadAttribute("setpoint-change-source") { } - ~ReadPressureMeasurementEventList() {} + ~ReadThermostatSetpointChangeSource() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement EventList read Error", error); + LogNSError("Thermostat SetpointChangeSource read Error", error); } SetCommandExitStatus(error); }]; @@ -74788,22 +51420,22 @@ class ReadPressureMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeThermostatSetpointChangeSource() + : SubscribeAttribute("setpoint-change-source") { } - ~SubscribeAttributePressureMeasurementEventList() {} + ~SubscribeAttributeThermostatSetpointChangeSource() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74814,12 +51446,12 @@ class SubscribeAttributePressureMeasurementEventList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeSetpointChangeSourceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74828,29 +51460,29 @@ class SubscribeAttributePressureMeasurementEventList : public SubscribeAttribute }; /* - * Attribute AttributeList + * Attribute SetpointChangeAmount */ -class ReadPressureMeasurementAttributeList : public ReadAttribute { +class ReadThermostatSetpointChangeAmount : public ReadAttribute { public: - ReadPressureMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadThermostatSetpointChangeAmount() + : ReadAttribute("setpoint-change-amount") { } - ~ReadPressureMeasurementAttributeList() {} + ~ReadThermostatSetpointChangeAmount() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement AttributeList read Error", error); + LogNSError("Thermostat SetpointChangeAmount read Error", error); } SetCommandExitStatus(error); }]; @@ -74858,22 +51490,22 @@ class ReadPressureMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeThermostatSetpointChangeAmount() + : SubscribeAttribute("setpoint-change-amount") { } - ~SubscribeAttributePressureMeasurementAttributeList() {} + ~SubscribeAttributeThermostatSetpointChangeAmount() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74884,12 +51516,12 @@ class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeSetpointChangeAmountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74898,29 +51530,29 @@ class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttri }; /* - * Attribute FeatureMap + * Attribute SetpointChangeSourceTimestamp */ -class ReadPressureMeasurementFeatureMap : public ReadAttribute { +class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { public: - ReadPressureMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadThermostatSetpointChangeSourceTimestamp() + : ReadAttribute("setpoint-change-source-timestamp") { } - ~ReadPressureMeasurementFeatureMap() {} + ~ReadThermostatSetpointChangeSourceTimestamp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement FeatureMap read Error", error); + LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); } SetCommandExitStatus(error); }]; @@ -74928,22 +51560,22 @@ class ReadPressureMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThermostatSetpointChangeSourceTimestamp() + : SubscribeAttribute("setpoint-change-source-timestamp") { } - ~SubscribeAttributePressureMeasurementFeatureMap() {} + ~SubscribeAttributeThermostatSetpointChangeSourceTimestamp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000032) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74954,12 +51586,12 @@ class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeSetpointChangeSourceTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); + NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74968,29 +51600,29 @@ class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribut }; /* - * Attribute ClusterRevision + * Attribute OccupiedSetback */ -class ReadPressureMeasurementClusterRevision : public ReadAttribute { +class ReadThermostatOccupiedSetback : public ReadAttribute { public: - ReadPressureMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadThermostatOccupiedSetback() + : ReadAttribute("occupied-setback") { } - ~ReadPressureMeasurementClusterRevision() {} + ~ReadThermostatOccupiedSetback() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement ClusterRevision read Error", error); + LogNSError("Thermostat OccupiedSetback read Error", error); } SetCommandExitStatus(error); }]; @@ -74998,22 +51630,62 @@ class ReadPressureMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAttribute { +class WriteThermostatOccupiedSetback : public WriteAttribute { public: - SubscribeAttributePressureMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteThermostatOccupiedSetback() + : WriteAttribute("occupied-setback") { + AddArgument("attr-name", "occupied-setback"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementClusterRevision() {} + ~WriteThermostatOccupiedSetback() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeOccupiedSetbackWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedSetback write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { +public: + SubscribeAttributeThermostatOccupiedSetback() + : SubscribeAttribute("occupied-setback") + { + } + + ~SubscribeAttributeThermostatOccupiedSetback() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000034) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75024,12 +51696,12 @@ class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeOccupiedSetbackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75037,50 +51709,30 @@ class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAtt } }; -/*----------------------------------------------------------------------------*\ -| Cluster FlowMeasurement | 0x0404 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute OccupiedSetbackMin */ -class ReadFlowMeasurementMeasuredValue : public ReadAttribute { +class ReadThermostatOccupiedSetbackMin : public ReadAttribute { public: - ReadFlowMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadThermostatOccupiedSetbackMin() + : ReadAttribute("occupied-setback-min") { } - ~ReadFlowMeasurementMeasuredValue() {} + ~ReadThermostatOccupiedSetbackMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement MeasuredValue read Error", error); + LogNSError("Thermostat OccupiedSetbackMin read Error", error); } SetCommandExitStatus(error); }]; @@ -75088,22 +51740,22 @@ class ReadFlowMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeThermostatOccupiedSetbackMin() + : SubscribeAttribute("occupied-setback-min") { } - ~SubscribeAttributeFlowMeasurementMeasuredValue() {} + ~SubscribeAttributeThermostatOccupiedSetbackMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75114,12 +51766,12 @@ class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeOccupiedSetbackMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75128,29 +51780,29 @@ class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute }; /* - * Attribute MinMeasuredValue + * Attribute OccupiedSetbackMax */ -class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { +class ReadThermostatOccupiedSetbackMax : public ReadAttribute { public: - ReadFlowMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadThermostatOccupiedSetbackMax() + : ReadAttribute("occupied-setback-max") { } - ~ReadFlowMeasurementMinMeasuredValue() {} + ~ReadThermostatOccupiedSetbackMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000036) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement MinMeasuredValue read Error", error); + LogNSError("Thermostat OccupiedSetbackMax read Error", error); } SetCommandExitStatus(error); }]; @@ -75158,22 +51810,22 @@ class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeThermostatOccupiedSetbackMax() + : SubscribeAttribute("occupied-setback-max") { } - ~SubscribeAttributeFlowMeasurementMinMeasuredValue() {} + ~SubscribeAttributeThermostatOccupiedSetbackMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000036) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75184,12 +51836,12 @@ class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeOccupiedSetbackMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75198,29 +51850,29 @@ class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttrib }; /* - * Attribute MaxMeasuredValue + * Attribute UnoccupiedSetback */ -class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadThermostatUnoccupiedSetback : public ReadAttribute { public: - ReadFlowMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadThermostatUnoccupiedSetback() + : ReadAttribute("unoccupied-setback") { } - ~ReadFlowMeasurementMaxMeasuredValue() {} + ~ReadThermostatUnoccupiedSetback() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement MaxMeasuredValue read Error", error); + LogNSError("Thermostat UnoccupiedSetback read Error", error); } SetCommandExitStatus(error); }]; @@ -75228,22 +51880,62 @@ class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttribute { +class WriteThermostatUnoccupiedSetback : public WriteAttribute { public: - SubscribeAttributeFlowMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + WriteThermostatUnoccupiedSetback() + : WriteAttribute("unoccupied-setback") { + AddArgument("attr-name", "unoccupied-setback"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFlowMeasurementMaxMeasuredValue() {} + ~WriteThermostatUnoccupiedSetback() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeUnoccupiedSetbackWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedSetback write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUnoccupiedSetback() + : SubscribeAttribute("unoccupied-setback") + { + } + + ~SubscribeAttributeThermostatUnoccupiedSetback() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000037) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75254,12 +51946,12 @@ class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeUnoccupiedSetbackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75268,29 +51960,29 @@ class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttrib }; /* - * Attribute Tolerance + * Attribute UnoccupiedSetbackMin */ -class ReadFlowMeasurementTolerance : public ReadAttribute { +class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { public: - ReadFlowMeasurementTolerance() - : ReadAttribute("tolerance") + ReadThermostatUnoccupiedSetbackMin() + : ReadAttribute("unoccupied-setback-min") { } - ~ReadFlowMeasurementTolerance() {} + ~ReadThermostatUnoccupiedSetbackMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000038) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement Tolerance read Error", error); + LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); } SetCommandExitStatus(error); }]; @@ -75298,22 +51990,22 @@ class ReadFlowMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { +class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementTolerance() - : SubscribeAttribute("tolerance") + SubscribeAttributeThermostatUnoccupiedSetbackMin() + : SubscribeAttribute("unoccupied-setback-min") { } - ~SubscribeAttributeFlowMeasurementTolerance() {} + ~SubscribeAttributeThermostatUnoccupiedSetbackMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000038) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75324,12 +52016,12 @@ class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeToleranceWithParams:params + [cluster subscribeAttributeUnoccupiedSetbackMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75338,29 +52030,29 @@ class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute UnoccupiedSetbackMax */ -class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { +class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { public: - ReadFlowMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThermostatUnoccupiedSetbackMax() + : ReadAttribute("unoccupied-setback-max") { } - ~ReadFlowMeasurementGeneratedCommandList() {} + ~ReadThermostatUnoccupiedSetbackMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000039) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement GeneratedCommandList read Error", error); + LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); } SetCommandExitStatus(error); }]; @@ -75368,22 +52060,22 @@ class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeThermostatUnoccupiedSetbackMax() + : SubscribeAttribute("unoccupied-setback-max") { } - ~SubscribeAttributeFlowMeasurementGeneratedCommandList() {} + ~SubscribeAttributeThermostatUnoccupiedSetbackMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000039) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75394,12 +52086,12 @@ class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeUnoccupiedSetbackMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75408,29 +52100,29 @@ class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAt }; /* - * Attribute AcceptedCommandList + * Attribute EmergencyHeatDelta */ -class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { +class ReadThermostatEmergencyHeatDelta : public ReadAttribute { public: - ReadFlowMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThermostatEmergencyHeatDelta() + : ReadAttribute("emergency-heat-delta") { } - ~ReadFlowMeasurementAcceptedCommandList() {} + ~ReadThermostatEmergencyHeatDelta() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement AcceptedCommandList read Error", error); + LogNSError("Thermostat EmergencyHeatDelta read Error", error); } SetCommandExitStatus(error); }]; @@ -75438,22 +52130,62 @@ class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAttribute { +class WriteThermostatEmergencyHeatDelta : public WriteAttribute { public: - SubscribeAttributeFlowMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteThermostatEmergencyHeatDelta() + : WriteAttribute("emergency-heat-delta") { + AddArgument("attr-name", "emergency-heat-delta"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFlowMeasurementAcceptedCommandList() {} + ~WriteThermostatEmergencyHeatDelta() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeEmergencyHeatDeltaWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat EmergencyHeatDelta write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute { +public: + SubscribeAttributeThermostatEmergencyHeatDelta() + : SubscribeAttribute("emergency-heat-delta") + { + } + + ~SubscribeAttributeThermostatEmergencyHeatDelta() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000003A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75464,12 +52196,12 @@ class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEmergencyHeatDeltaWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75478,29 +52210,29 @@ class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAtt }; /* - * Attribute EventList + * Attribute ACType */ -class ReadFlowMeasurementEventList : public ReadAttribute { +class ReadThermostatACType : public ReadAttribute { public: - ReadFlowMeasurementEventList() - : ReadAttribute("event-list") + ReadThermostatACType() + : ReadAttribute("actype") { } - ~ReadFlowMeasurementEventList() {} + ~ReadThermostatACType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000040) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACType response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement EventList read Error", error); + LogNSError("Thermostat ACType read Error", error); } SetCommandExitStatus(error); }]; @@ -75508,22 +52240,62 @@ class ReadFlowMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementEventList : public SubscribeAttribute { +class WriteThermostatACType : public WriteAttribute { +public: + WriteThermostatACType() + : WriteAttribute("actype") + { + AddArgument("attr-name", "actype"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatACType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000040) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeACTypeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACType write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatACType : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeThermostatACType() + : SubscribeAttribute("actype") { } - ~SubscribeAttributeFlowMeasurementEventList() {} + ~SubscribeAttributeThermostatACType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000040) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75534,12 +52306,12 @@ class SubscribeAttributeFlowMeasurementEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeACTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75548,29 +52320,29 @@ class SubscribeAttributeFlowMeasurementEventList : public SubscribeAttribute { }; /* - * Attribute AttributeList + * Attribute ACCapacity */ -class ReadFlowMeasurementAttributeList : public ReadAttribute { +class ReadThermostatACCapacity : public ReadAttribute { public: - ReadFlowMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadThermostatACCapacity() + : ReadAttribute("accapacity") { } - ~ReadFlowMeasurementAttributeList() {} + ~ReadThermostatACCapacity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000041) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCapacity response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement AttributeList read Error", error); + LogNSError("Thermostat ACCapacity read Error", error); } SetCommandExitStatus(error); }]; @@ -75578,92 +52350,62 @@ class ReadFlowMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute { +class WriteThermostatACCapacity : public WriteAttribute { public: - SubscribeAttributeFlowMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + WriteThermostatACCapacity() + : WriteAttribute("accapacity") { + AddArgument("attr-name", "accapacity"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFlowMeasurementAttributeList() {} + ~WriteThermostatACCapacity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000041) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement 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(@"FlowMeasurement.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + [cluster writeAttributeACCapacityWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACCapacity write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute FeatureMap - */ -class ReadFlowMeasurementFeatureMap : public ReadAttribute { -public: - ReadFlowMeasurementFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadFlowMeasurementFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("FlowMeasurement FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint16_t mValue; }; -class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThermostatACCapacity() + : SubscribeAttribute("accapacity") { } - ~SubscribeAttributeFlowMeasurementFeatureMap() {} + ~SubscribeAttributeThermostatACCapacity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000041) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75674,12 +52416,12 @@ class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeACCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); + NSLog(@"Thermostat.ACCapacity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75688,29 +52430,29 @@ class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute ACRefrigerantType */ -class ReadFlowMeasurementClusterRevision : public ReadAttribute { +class ReadThermostatACRefrigerantType : public ReadAttribute { public: - ReadFlowMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadThermostatACRefrigerantType() + : ReadAttribute("acrefrigerant-type") { } - ~ReadFlowMeasurementClusterRevision() {} + ~ReadThermostatACRefrigerantType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000042) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement ClusterRevision read Error", error); + LogNSError("Thermostat ACRefrigerantType read Error", error); } SetCommandExitStatus(error); }]; @@ -75718,22 +52460,62 @@ class ReadFlowMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribute { +class WriteThermostatACRefrigerantType : public WriteAttribute { public: - SubscribeAttributeFlowMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteThermostatACRefrigerantType() + : WriteAttribute("acrefrigerant-type") { + AddArgument("attr-name", "acrefrigerant-type"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFlowMeasurementClusterRevision() {} + ~WriteThermostatACRefrigerantType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000042) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeACRefrigerantTypeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACRefrigerantType write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACRefrigerantType() + : SubscribeAttribute("acrefrigerant-type") + { + } + + ~SubscribeAttributeThermostatACRefrigerantType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000042) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75744,12 +52526,12 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeACRefrigerantTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75757,50 +52539,30 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribu } }; -/*----------------------------------------------------------------------------*\ -| Cluster RelativeHumidityMeasurement | 0x0405 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute ACCompressorType */ -class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { +class ReadThermostatACCompressorType : public ReadAttribute { public: - ReadRelativeHumidityMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadThermostatACCompressorType() + : ReadAttribute("accompressor-type") { } - ~ReadRelativeHumidityMeasurementMeasuredValue() {} + ~ReadThermostatACCompressorType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000043) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCompressorType response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement MeasuredValue read Error", error); + LogNSError("Thermostat ACCompressorType read Error", error); } SetCommandExitStatus(error); }]; @@ -75808,22 +52570,62 @@ class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public SubscribeAttribute { +class WriteThermostatACCompressorType : public WriteAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + WriteThermostatACCompressorType() + : WriteAttribute("accompressor-type") { + AddArgument("attr-name", "accompressor-type"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() {} + ~WriteThermostatACCompressorType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000043) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeACCompressorTypeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACCompressorType write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACCompressorType() + : SubscribeAttribute("accompressor-type") + { + } + + ~SubscribeAttributeThermostatACCompressorType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000043) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75834,12 +52636,12 @@ class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeACCompressorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"Thermostat.ACCompressorType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75848,29 +52650,29 @@ class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public Subscr }; /* - * Attribute MinMeasuredValue + * Attribute ACErrorCode */ -class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { +class ReadThermostatACErrorCode : public ReadAttribute { public: - ReadRelativeHumidityMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadThermostatACErrorCode() + : ReadAttribute("acerror-code") { } - ~ReadRelativeHumidityMeasurementMinMeasuredValue() {} + ~ReadThermostatACErrorCode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000044) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACErrorCode response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement MinMeasuredValue read Error", error); + LogNSError("Thermostat ACErrorCode read Error", error); } SetCommandExitStatus(error); }]; @@ -75878,22 +52680,62 @@ class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public SubscribeAttribute { +class WriteThermostatACErrorCode : public WriteAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + WriteThermostatACErrorCode() + : WriteAttribute("acerror-code") { + AddArgument("attr-name", "acerror-code"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() {} + ~WriteThermostatACErrorCode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000044) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeACErrorCodeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACErrorCode write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACErrorCode() + : SubscribeAttribute("acerror-code") + { + } + + ~SubscribeAttributeThermostatACErrorCode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000044) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75904,12 +52746,12 @@ class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeACErrorCodeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"Thermostat.ACErrorCode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75918,29 +52760,29 @@ class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public Sub }; /* - * Attribute MaxMeasuredValue + * Attribute ACLouverPosition */ -class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadThermostatACLouverPosition : public ReadAttribute { public: - ReadRelativeHumidityMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadThermostatACLouverPosition() + : ReadAttribute("aclouver-position") { } - ~ReadRelativeHumidityMeasurementMaxMeasuredValue() {} + ~ReadThermostatACLouverPosition() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000045) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement MaxMeasuredValue read Error", error); + LogNSError("Thermostat ACLouverPosition read Error", error); } SetCommandExitStatus(error); }]; @@ -75948,22 +52790,62 @@ class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public SubscribeAttribute { +class WriteThermostatACLouverPosition : public WriteAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + WriteThermostatACLouverPosition() + : WriteAttribute("aclouver-position") + { + AddArgument("attr-name", "aclouver-position"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatACLouverPosition() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000045) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeACLouverPositionWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACLouverPosition write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - ~SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() {} +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACLouverPosition() + : SubscribeAttribute("aclouver-position") + { + } + + ~SubscribeAttributeThermostatACLouverPosition() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000045) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75974,12 +52856,12 @@ class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeACLouverPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75988,29 +52870,29 @@ class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public Sub }; /* - * Attribute Tolerance + * Attribute ACCoilTemperature */ -class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { +class ReadThermostatACCoilTemperature : public ReadAttribute { public: - ReadRelativeHumidityMeasurementTolerance() - : ReadAttribute("tolerance") + ReadThermostatACCoilTemperature() + : ReadAttribute("accoil-temperature") { } - ~ReadRelativeHumidityMeasurementTolerance() {} + ~ReadThermostatACCoilTemperature() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000046) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement Tolerance read Error", error); + LogNSError("Thermostat ACCoilTemperature read Error", error); } SetCommandExitStatus(error); }]; @@ -76018,22 +52900,22 @@ class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeAttribute { +class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementTolerance() - : SubscribeAttribute("tolerance") + SubscribeAttributeThermostatACCoilTemperature() + : SubscribeAttribute("accoil-temperature") { } - ~SubscribeAttributeRelativeHumidityMeasurementTolerance() {} + ~SubscribeAttributeThermostatACCoilTemperature() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000046) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76044,12 +52926,12 @@ class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeToleranceWithParams:params + [cluster subscribeAttributeACCoilTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); + NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76058,29 +52940,29 @@ class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeA }; /* - * Attribute GeneratedCommandList + * Attribute ACCapacityformat */ -class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute { +class ReadThermostatACCapacityformat : public ReadAttribute { public: - ReadRelativeHumidityMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThermostatACCapacityformat() + : ReadAttribute("accapacityformat") { } - ~ReadRelativeHumidityMeasurementGeneratedCommandList() {} + ~ReadThermostatACCapacityformat() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000047) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement GeneratedCommandList read Error", error); + LogNSError("Thermostat ACCapacityformat read Error", error); } SetCommandExitStatus(error); }]; @@ -76088,22 +52970,62 @@ class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public SubscribeAttribute { +class WriteThermostatACCapacityformat : public WriteAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteThermostatACCapacityformat() + : WriteAttribute("accapacityformat") + { + AddArgument("attr-name", "accapacityformat"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatACCapacityformat() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000047) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeACCapacityformatWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACCapacityformat write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - ~SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() {} +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACCapacityformat() + : SubscribeAttribute("accapacityformat") + { + } + + ~SubscribeAttributeThermostatACCapacityformat() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000047) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76114,12 +53036,12 @@ class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeACCapacityformatWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76128,29 +53050,29 @@ class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public }; /* - * Attribute AcceptedCommandList + * Attribute GeneratedCommandList */ -class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute { +class ReadThermostatGeneratedCommandList : public ReadAttribute { public: - ReadRelativeHumidityMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThermostatGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadRelativeHumidityMeasurementAcceptedCommandList() {} + ~ReadThermostatGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement AcceptedCommandList read Error", error); + LogNSError("Thermostat GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -76158,22 +53080,22 @@ class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeThermostatGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() {} + ~SubscribeAttributeThermostatGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76184,12 +53106,12 @@ class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76198,29 +53120,29 @@ class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public }; /* - * Attribute EventList + * Attribute AcceptedCommandList */ -class ReadRelativeHumidityMeasurementEventList : public ReadAttribute { +class ReadThermostatAcceptedCommandList : public ReadAttribute { public: - ReadRelativeHumidityMeasurementEventList() - : ReadAttribute("event-list") + ReadThermostatAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadRelativeHumidityMeasurementEventList() {} + ~ReadThermostatAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement EventList read Error", error); + LogNSError("Thermostat AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -76228,22 +53150,22 @@ class ReadRelativeHumidityMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeThermostatAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRelativeHumidityMeasurementEventList() {} + ~SubscribeAttributeThermostatAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76254,12 +53176,12 @@ class SubscribeAttributeRelativeHumidityMeasurementEventList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); + NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76270,27 +53192,27 @@ class SubscribeAttributeRelativeHumidityMeasurementEventList : public SubscribeA /* * Attribute AttributeList */ -class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { +class ReadThermostatAttributeList : public ReadAttribute { public: - ReadRelativeHumidityMeasurementAttributeList() + ReadThermostatAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRelativeHumidityMeasurementAttributeList() {} + ~ReadThermostatAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); + NSLog(@"Thermostat.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement AttributeList read Error", error); + LogNSError("Thermostat AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -76298,22 +53220,22 @@ class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementAttributeList() + SubscribeAttributeThermostatAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRelativeHumidityMeasurementAttributeList() {} + ~SubscribeAttributeThermostatAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76329,7 +53251,7 @@ class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public Subscr mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); + NSLog(@"Thermostat.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76340,27 +53262,27 @@ class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public Subscr /* * Attribute FeatureMap */ -class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { +class ReadThermostatFeatureMap : public ReadAttribute { public: - ReadRelativeHumidityMeasurementFeatureMap() + ReadThermostatFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRelativeHumidityMeasurementFeatureMap() {} + ~ReadThermostatFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); + NSLog(@"Thermostat.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement FeatureMap read Error", error); + LogNSError("Thermostat FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -76368,22 +53290,22 @@ class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementFeatureMap() + SubscribeAttributeThermostatFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRelativeHumidityMeasurementFeatureMap() {} + ~SubscribeAttributeThermostatFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76399,7 +53321,7 @@ class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public Subscribe mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); + NSLog(@"Thermostat.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76410,27 +53332,27 @@ class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public Subscribe /* * Attribute ClusterRevision */ -class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { +class ReadThermostatClusterRevision : public ReadAttribute { public: - ReadRelativeHumidityMeasurementClusterRevision() + ReadThermostatClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRelativeHumidityMeasurementClusterRevision() {} + ~ReadThermostatClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"Thermostat.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement ClusterRevision read Error", error); + LogNSError("Thermostat ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -76438,22 +53360,22 @@ class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementClusterRevision() + SubscribeAttributeThermostatClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRelativeHumidityMeasurementClusterRevision() {} + ~SubscribeAttributeThermostatClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76469,7 +53391,7 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"Thermostat.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76478,23 +53400,24 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs }; /*----------------------------------------------------------------------------*\ -| Cluster OccupancySensing | 0x0406 | +| Cluster FanControl | 0x0202 | |------------------------------------------------------------------------------| | Commands: | | +| * Step | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * Occupancy | 0x0000 | -| * OccupancySensorType | 0x0001 | -| * OccupancySensorTypeBitmap | 0x0002 | -| * PIROccupiedToUnoccupiedDelay | 0x0010 | -| * PIRUnoccupiedToOccupiedDelay | 0x0011 | -| * PIRUnoccupiedToOccupiedThreshold | 0x0012 | -| * UltrasonicOccupiedToUnoccupiedDelay | 0x0020 | -| * UltrasonicUnoccupiedToOccupiedDelay | 0x0021 | -| * UltrasonicUnoccupiedToOccupiedThreshold | 0x0022 | -| * PhysicalContactOccupiedToUnoccupiedDelay | 0x0030 | -| * PhysicalContactUnoccupiedToOccupiedDelay | 0x0031 | -| * PhysicalContactUnoccupiedToOccupiedThreshold | 0x0032 | +| * FanMode | 0x0000 | +| * FanModeSequence | 0x0001 | +| * PercentSetting | 0x0002 | +| * PercentCurrent | 0x0003 | +| * SpeedMax | 0x0004 | +| * SpeedSetting | 0x0005 | +| * SpeedCurrent | 0x0006 | +| * RockSupport | 0x0007 | +| * RockSetting | 0x0008 | +| * WindSupport | 0x0009 | +| * WindSetting | 0x000A | +| * AirflowDirection | 0x000B | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -76506,99 +53429,29 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs \*----------------------------------------------------------------------------*/ /* - * Attribute Occupancy - */ -class ReadOccupancySensingOccupancy : public ReadAttribute { -public: - ReadOccupancySensingOccupancy() - : ReadAttribute("occupancy") - { - } - - ~ReadOccupancySensingOccupancy() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.Occupancy response %@", [value description]); - if (error != nil) { - LogNSError("OccupancySensing Occupancy read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingOccupancy() - : SubscribeAttribute("occupancy") - { - } - - ~SubscribeAttributeOccupancySensingOccupancy() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOccupancyWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.Occupancy response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OccupancySensorType + * Attribute FanMode */ -class ReadOccupancySensingOccupancySensorType : public ReadAttribute { +class ReadFanControlFanMode : public ReadAttribute { public: - ReadOccupancySensingOccupancySensorType() - : ReadAttribute("occupancy-sensor-type") + ReadFanControlFanMode() + : ReadAttribute("fan-mode") { } - ~ReadOccupancySensingOccupancySensorType() {} + ~ReadFanControlFanMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FanMode response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing OccupancySensorType read Error", error); + LogNSError("FanControl FanMode read Error", error); } SetCommandExitStatus(error); }]; @@ -76606,92 +53459,62 @@ class ReadOccupancySensingOccupancySensorType : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAttribute { +class WriteFanControlFanMode : public WriteAttribute { public: - SubscribeAttributeOccupancySensingOccupancySensorType() - : SubscribeAttribute("occupancy-sensor-type") + WriteFanControlFanMode() + : WriteAttribute("fan-mode") { + AddArgument("attr-name", "fan-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOccupancySensingOccupancySensorType() {} + ~WriteFanControlFanMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOccupancySensorTypeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + [cluster writeAttributeFanModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl FanMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute OccupancySensorTypeBitmap - */ -class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { -public: - ReadOccupancySensingOccupancySensorTypeBitmap() - : ReadAttribute("occupancy-sensor-type-bitmap") - { - } - - ~ReadOccupancySensingOccupancySensorTypeBitmap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); - if (error != nil) { - LogNSError("OccupancySensing OccupancySensorTypeBitmap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint8_t mValue; }; -class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public SubscribeAttribute { +class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() - : SubscribeAttribute("occupancy-sensor-type-bitmap") + SubscribeAttributeFanControlFanMode() + : SubscribeAttribute("fan-mode") { } - ~SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() {} + ~SubscribeAttributeFanControlFanMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76702,12 +53525,12 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupancySensorTypeBitmapWithParams:params + [cluster subscribeAttributeFanModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); + NSLog(@"FanControl.FanMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76716,29 +53539,29 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Subsc }; /* - * Attribute PIROccupiedToUnoccupiedDelay + * Attribute FanModeSequence */ -class ReadOccupancySensingPIROccupiedToUnoccupiedDelay : public ReadAttribute { +class ReadFanControlFanModeSequence : public ReadAttribute { public: - ReadOccupancySensingPIROccupiedToUnoccupiedDelay() - : ReadAttribute("piroccupied-to-unoccupied-delay") + ReadFanControlFanModeSequence() + : ReadAttribute("fan-mode-sequence") { } - ~ReadOccupancySensingPIROccupiedToUnoccupiedDelay() {} + ~ReadFanControlFanModeSequence() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FanModeSequence response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay read Error", error); + LogNSError("FanControl FanModeSequence read Error", error); } SetCommandExitStatus(error); }]; @@ -76746,64 +53569,62 @@ class ReadOccupancySensingPIROccupiedToUnoccupiedDelay : public ReadAttribute { } }; -class WriteOccupancySensingPIROccupiedToUnoccupiedDelay : public WriteAttribute { +class WriteFanControlFanModeSequence : public WriteAttribute { public: - WriteOccupancySensingPIROccupiedToUnoccupiedDelay() - : WriteAttribute("piroccupied-to-unoccupied-delay") + WriteFanControlFanModeSequence() + : WriteAttribute("fan-mode-sequence") { - AddArgument("attr-name", "piroccupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "fan-mode-sequence"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteOccupancySensingPIROccupiedToUnoccupiedDelay() {} + ~WriteFanControlFanModeSequence() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster - writeAttributePIROccupiedToUnoccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeFanModeSequenceWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl FanModeSequence write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() - : SubscribeAttribute("piroccupied-to-unoccupied-delay") + SubscribeAttributeFanControlFanModeSequence() + : SubscribeAttribute("fan-mode-sequence") { } - ~SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() {} + ~SubscribeAttributeFanControlFanModeSequence() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76814,12 +53635,12 @@ class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:params + [cluster subscribeAttributeFanModeSequenceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); + NSLog(@"FanControl.FanModeSequence response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76828,29 +53649,29 @@ class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public Su }; /* - * Attribute PIRUnoccupiedToOccupiedDelay + * Attribute PercentSetting */ -class ReadOccupancySensingPIRUnoccupiedToOccupiedDelay : public ReadAttribute { +class ReadFanControlPercentSetting : public ReadAttribute { public: - ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() - : ReadAttribute("pirunoccupied-to-occupied-delay") + ReadFanControlPercentSetting() + : ReadAttribute("percent-setting") { } - ~ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() {} + ~ReadFanControlPercentSetting() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.PercentSetting response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay read Error", error); + LogNSError("FanControl PercentSetting read Error", error); } SetCommandExitStatus(error); }]; @@ -76858,64 +53679,62 @@ class ReadOccupancySensingPIRUnoccupiedToOccupiedDelay : public ReadAttribute { } }; -class WriteOccupancySensingPIRUnoccupiedToOccupiedDelay : public WriteAttribute { +class WriteFanControlPercentSetting : public WriteAttribute { public: - WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() - : WriteAttribute("pirunoccupied-to-occupied-delay") + WriteFanControlPercentSetting() + : WriteAttribute("percent-setting") { - AddArgument("attr-name", "pirunoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "percent-setting"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() {} + ~WriteFanControlPercentSetting() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster - writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributePercentSettingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl PercentSetting write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + chip::Percent mValue; }; -class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() - : SubscribeAttribute("pirunoccupied-to-occupied-delay") + SubscribeAttributeFanControlPercentSetting() + : SubscribeAttribute("percent-setting") { } - ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() {} + ~SubscribeAttributeFanControlPercentSetting() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76926,12 +53745,12 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:params + [cluster subscribeAttributePercentSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); + NSLog(@"FanControl.PercentSetting response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76940,95 +53759,52 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public Su }; /* - * Attribute PIRUnoccupiedToOccupiedThreshold + * Attribute PercentCurrent */ -class ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold : public ReadAttribute { +class ReadFanControlPercentCurrent : public ReadAttribute { public: - ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() - : ReadAttribute("pirunoccupied-to-occupied-threshold") + ReadFanControlPercentCurrent() + : ReadAttribute("percent-current") { } - ~ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() {} + ~ReadFanControlPercentCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000012) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error != nil) { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold : public WriteAttribute { -public: - WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() - : WriteAttribute("pirunoccupied-to-occupied-threshold") - { - AddArgument("attr-name", "pirunoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000003) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " - "PIRUnoccupiedToOccupiedThreshold write Error", - error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.PercentCurrent response %@", [value description]); + if (error != nil) { + LogNSError("FanControl PercentCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() - : SubscribeAttribute("pirunoccupied-to-occupied-threshold") + SubscribeAttributeFanControlPercentCurrent() + : SubscribeAttribute("percent-current") { } - ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() {} + ~SubscribeAttributeFanControlPercentCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77039,12 +53815,12 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:params + [cluster subscribeAttributePercentCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); + NSLog(@"FanControl.PercentCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77053,30 +53829,29 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : publi }; /* - * Attribute UltrasonicOccupiedToUnoccupiedDelay + * Attribute SpeedMax */ -class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttribute { +class ReadFanControlSpeedMax : public ReadAttribute { public: - ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - : ReadAttribute("ultrasonic-occupied-to-unoccupied-delay") + ReadFanControlSpeedMax() + : ReadAttribute("speed-max") { } - ~ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() {} + ~ReadFanControlSpeedMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedMax response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay read Error", error); + LogNSError("FanControl SpeedMax read Error", error); } SetCommandExitStatus(error); }]; @@ -77084,65 +53859,22 @@ class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttri } }; -class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - : WriteAttribute("ultrasonic-occupied-to-unoccupied-delay") - { - AddArgument("attr-name", "ultrasonic-occupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000020) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " - "UltrasonicOccupiedToUnoccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - : SubscribeAttribute("ultrasonic-occupied-to-unoccupied-delay") + SubscribeAttributeFanControlSpeedMax() + : SubscribeAttribute("speed-max") { } - ~SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() {} + ~SubscribeAttributeFanControlSpeedMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77153,12 +53885,12 @@ class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:params + [cluster subscribeAttributeSpeedMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); + NSLog(@"FanControl.SpeedMax response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77167,30 +53899,29 @@ class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : pu }; /* - * Attribute UltrasonicUnoccupiedToOccupiedDelay + * Attribute SpeedSetting */ -class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttribute { +class ReadFanControlSpeedSetting : public ReadAttribute { public: - ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - : ReadAttribute("ultrasonic-unoccupied-to-occupied-delay") + ReadFanControlSpeedSetting() + : ReadAttribute("speed-setting") { } - ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() {} + ~ReadFanControlSpeedSetting() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedSetting response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay read Error", error); + LogNSError("FanControl SpeedSetting read Error", error); } SetCommandExitStatus(error); }]; @@ -77198,65 +53929,62 @@ class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttri } }; -class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAttribute { +class WriteFanControlSpeedSetting : public WriteAttribute { public: - WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - : WriteAttribute("ultrasonic-unoccupied-to-occupied-delay") + WriteFanControlSpeedSetting() + : WriteAttribute("speed-setting") { - AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "speed-setting"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() {} + ~WriteFanControlSpeedSetting() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster - writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " - "UltrasonicUnoccupiedToOccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeSpeedSettingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl SpeedSetting write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-delay") + SubscribeAttributeFanControlSpeedSetting() + : SubscribeAttribute("speed-setting") { } - ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() {} + ~SubscribeAttributeFanControlSpeedSetting() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77267,12 +53995,12 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:params + [cluster subscribeAttributeSpeedSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); + NSLog(@"FanControl.SpeedSetting response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77281,97 +54009,52 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : pu }; /* - * Attribute UltrasonicUnoccupiedToOccupiedThreshold + * Attribute SpeedCurrent */ -class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadAttribute { -public: - ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - : ReadAttribute("ultrasonic-unoccupied-to-occupied-threshold") - { - } - - ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000022) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error != nil) { - LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public WriteAttribute { +class ReadFanControlSpeedCurrent : public ReadAttribute { public: - WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - : WriteAttribute("ultrasonic-unoccupied-to-occupied-threshold") + ReadFanControlSpeedCurrent() + : ReadAttribute("speed-current") { - AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() {} + ~ReadFanControlSpeedCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000022) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster - writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing " - "UltrasonicUnoccupiedToOccupiedThreshold write Error", - error); - } - SetCommandExitStatus(error); - }]; + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000006) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedCurrent response %@", [value description]); + if (error != nil) { + LogNSError("FanControl SpeedCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-threshold") + SubscribeAttributeFanControlSpeedCurrent() + : SubscribeAttribute("speed-current") { } - ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() {} + ~SubscribeAttributeFanControlSpeedCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000022) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77382,12 +54065,12 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:params + [cluster subscribeAttributeSpeedCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); + NSLog(@"FanControl.SpeedCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77396,30 +54079,29 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold }; /* - * Attribute PhysicalContactOccupiedToUnoccupiedDelay + * Attribute RockSupport */ -class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public ReadAttribute { +class ReadFanControlRockSupport : public ReadAttribute { public: - ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - : ReadAttribute("physical-contact-occupied-to-unoccupied-delay") + ReadFanControlRockSupport() + : ReadAttribute("rock-support") { } - ~ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() {} + ~ReadFanControlRockSupport() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.RockSupport response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay read Error", error); + LogNSError("FanControl RockSupport read Error", error); } SetCommandExitStatus(error); }]; @@ -77427,66 +54109,22 @@ class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public Read } }; -class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - : WriteAttribute("physical-contact-occupied-to-unoccupied-delay") - { - AddArgument("attr-name", "physical-contact-occupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000030) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing " - "PhysicalContactOccupiedToUnoccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - : SubscribeAttribute("physical-contact-occupied-to-unoccupied-delay") + SubscribeAttributeFanControlRockSupport() + : SubscribeAttribute("rock-support") { } - ~SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() {} + ~SubscribeAttributeFanControlRockSupport() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77497,12 +54135,12 @@ class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:params + [cluster subscribeAttributeRockSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); + NSLog(@"FanControl.RockSupport response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77511,30 +54149,29 @@ class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay }; /* - * Attribute PhysicalContactUnoccupiedToOccupiedDelay + * Attribute RockSetting */ -class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public ReadAttribute { +class ReadFanControlRockSetting : public ReadAttribute { public: - ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - : ReadAttribute("physical-contact-unoccupied-to-occupied-delay") + ReadFanControlRockSetting() + : ReadAttribute("rock-setting") { } - ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() {} + ~ReadFanControlRockSetting() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.RockSetting response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay read Error", error); + LogNSError("FanControl RockSetting read Error", error); } SetCommandExitStatus(error); }]; @@ -77542,66 +54179,62 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public Read } }; -class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public WriteAttribute { +class WriteFanControlRockSetting : public WriteAttribute { public: - WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - : WriteAttribute("physical-contact-unoccupied-to-occupied-delay") + WriteFanControlRockSetting() + : WriteAttribute("rock-setting") { - AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "rock-setting"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() {} + ~WriteFanControlRockSetting() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster - writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing " - "PhysicalContactUnoccupiedToOccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeRockSettingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl RockSetting write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - : SubscribeAttribute("physical-contact-unoccupied-to-occupied-delay") + SubscribeAttributeFanControlRockSetting() + : SubscribeAttribute("rock-setting") { } - ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() {} + ~SubscribeAttributeFanControlRockSetting() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77612,12 +54245,12 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:params + [cluster subscribeAttributeRockSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); + NSLog(@"FanControl.RockSetting response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77626,30 +54259,29 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay }; /* - * Attribute PhysicalContactUnoccupiedToOccupiedThreshold + * Attribute WindSupport */ -class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public ReadAttribute { +class ReadFanControlWindSupport : public ReadAttribute { public: - ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - : ReadAttribute("physical-contact-unoccupied-to-occupied-threshold") + ReadFanControlWindSupport() + : ReadAttribute("wind-support") { } - ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() {} + ~ReadFanControlWindSupport() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.WindSupport response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold read Error", error); + LogNSError("FanControl WindSupport read Error", error); } SetCommandExitStatus(error); }]; @@ -77657,65 +54289,22 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public } }; -class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public WriteAttribute { -public: - WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - : WriteAttribute("physical-contact-unoccupied-to-occupied-threshold") - { - AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000032) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " - "PhysicalContactUnoccupiedToOccupiedTh" - "reshold write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - : SubscribeAttribute("physical-contact-unoccupied-to-occupied-threshold") + SubscribeAttributeFanControlWindSupport() + : SubscribeAttribute("wind-support") { } - ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() {} + ~SubscribeAttributeFanControlWindSupport() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77726,12 +54315,12 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThres if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:params + [cluster subscribeAttributeWindSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); + NSLog(@"FanControl.WindSupport response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77740,29 +54329,29 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThres }; /* - * Attribute GeneratedCommandList + * Attribute WindSetting */ -class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { +class ReadFanControlWindSetting : public ReadAttribute { public: - ReadOccupancySensingGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadFanControlWindSetting() + : ReadAttribute("wind-setting") { } - ~ReadOccupancySensingGeneratedCommandList() {} + ~ReadFanControlWindSetting() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.WindSetting response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing GeneratedCommandList read Error", error); + LogNSError("FanControl WindSetting read Error", error); } SetCommandExitStatus(error); }]; @@ -77770,22 +54359,62 @@ class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeAttribute { +class WriteFanControlWindSetting : public WriteAttribute { public: - SubscribeAttributeOccupancySensingGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteFanControlWindSetting() + : WriteAttribute("wind-setting") { + AddArgument("attr-name", "wind-setting"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOccupancySensingGeneratedCommandList() {} + ~WriteFanControlWindSetting() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeWindSettingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl WindSetting write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { +public: + SubscribeAttributeFanControlWindSetting() + : SubscribeAttribute("wind-setting") + { + } + + ~SubscribeAttributeFanControlWindSetting() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77796,12 +54425,12 @@ class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeWindSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.WindSetting response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77810,29 +54439,29 @@ class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeA }; /* - * Attribute AcceptedCommandList + * Attribute GeneratedCommandList */ -class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { +class ReadFanControlGeneratedCommandList : public ReadAttribute { public: - ReadOccupancySensingAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadFanControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOccupancySensingAcceptedCommandList() {} + ~ReadFanControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing AcceptedCommandList read Error", error); + LogNSError("FanControl GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -77840,22 +54469,22 @@ class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeFanControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOccupancySensingAcceptedCommandList() {} + ~SubscribeAttributeFanControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77866,12 +54495,12 @@ class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); + NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77880,29 +54509,29 @@ class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAt }; /* - * Attribute EventList + * Attribute AcceptedCommandList */ -class ReadOccupancySensingEventList : public ReadAttribute { +class ReadFanControlAcceptedCommandList : public ReadAttribute { public: - ReadOccupancySensingEventList() - : ReadAttribute("event-list") + ReadFanControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOccupancySensingEventList() {} + ~ReadFanControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing EventList read Error", error); + LogNSError("FanControl AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -77910,22 +54539,22 @@ class ReadOccupancySensingEventList : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingEventList : public SubscribeAttribute { +class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeFanControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOccupancySensingEventList() {} + ~SubscribeAttributeFanControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77936,12 +54565,12 @@ class SubscribeAttributeOccupancySensingEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.EventList response %@", [value description]); + NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77952,27 +54581,27 @@ class SubscribeAttributeOccupancySensingEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadOccupancySensingAttributeList : public ReadAttribute { +class ReadFanControlAttributeList : public ReadAttribute { public: - ReadOccupancySensingAttributeList() + ReadFanControlAttributeList() : ReadAttribute("attribute-list") { } - ~ReadOccupancySensingAttributeList() {} + ~ReadFanControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AttributeList response %@", [value description]); + NSLog(@"FanControl.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing AttributeList read Error", error); + LogNSError("FanControl AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -77980,22 +54609,22 @@ class ReadOccupancySensingAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribute { +class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingAttributeList() + SubscribeAttributeFanControlAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOccupancySensingAttributeList() {} + ~SubscribeAttributeFanControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78011,7 +54640,7 @@ class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribut mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AttributeList response %@", [value description]); + NSLog(@"FanControl.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78022,27 +54651,27 @@ class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribut /* * Attribute FeatureMap */ -class ReadOccupancySensingFeatureMap : public ReadAttribute { +class ReadFanControlFeatureMap : public ReadAttribute { public: - ReadOccupancySensingFeatureMap() + ReadFanControlFeatureMap() : ReadAttribute("feature-map") { } - ~ReadOccupancySensingFeatureMap() {} + ~ReadFanControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); + NSLog(@"FanControl.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing FeatureMap read Error", error); + LogNSError("FanControl FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -78050,22 +54679,22 @@ class ReadOccupancySensingFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { +class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingFeatureMap() + SubscribeAttributeFanControlFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOccupancySensingFeatureMap() {} + ~SubscribeAttributeFanControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78081,7 +54710,7 @@ class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); + NSLog(@"FanControl.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78092,27 +54721,27 @@ class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadOccupancySensingClusterRevision : public ReadAttribute { +class ReadFanControlClusterRevision : public ReadAttribute { public: - ReadOccupancySensingClusterRevision() + ReadFanControlClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadOccupancySensingClusterRevision() {} + ~ReadFanControlClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); + NSLog(@"FanControl.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing ClusterRevision read Error", error); + LogNSError("FanControl ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -78120,22 +54749,22 @@ class ReadOccupancySensingClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttribute { +class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingClusterRevision() + SubscribeAttributeFanControlClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOccupancySensingClusterRevision() {} + ~SubscribeAttributeFanControlClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78151,7 +54780,7 @@ class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttrib mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); + NSLog(@"FanControl.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78160,22 +54789,14 @@ class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttrib }; /*----------------------------------------------------------------------------*\ -| Cluster CarbonMonoxideConcentrationMeasurement | 0x040C | +| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | +| * TemperatureDisplayMode | 0x0000 | +| * KeypadLockout | 0x0001 | +| * ScheduleProgrammingVisibility | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -78187,29 +54808,29 @@ class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttrib \*----------------------------------------------------------------------------*/ /* - * Attribute MeasuredValue + * Attribute TemperatureDisplayMode */ -class ReadCarbonMonoxideConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() + : ReadAttribute("temperature-display-mode") { } - ~ReadCarbonMonoxideConcentrationMeasurementMeasuredValue() {} + ~ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode read Error", error); } SetCommandExitStatus(error); }]; @@ -78217,92 +54838,64 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasuredValue : public ReadAttri } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public WriteAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() + : WriteAttribute("temperature-display-mode") { + AddArgument("attr-name", "temperature-display-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue() {} + ~WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement 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 subscribeAttributeMeasuredValueWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + [cluster writeAttributeTemperatureDisplayModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration " + "TemperatureDisplayMode write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute MinMeasuredValue - */ -class ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { -public: - ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") - { - } - - ~ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement MinMeasuredValue read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint8_t mValue; }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() + : SubscribeAttribute("temperature-display-mode") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue() {} + ~SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78313,12 +54906,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeTemperatureDisplayModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78327,29 +54920,29 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : }; /* - * Attribute MaxMeasuredValue + * Attribute KeypadLockout */ -class ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationKeypadLockout : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadThermostatUserInterfaceConfigurationKeypadLockout() + : ReadAttribute("keypad-lockout") { } - ~ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() {} + ~ReadThermostatUserInterfaceConfigurationKeypadLockout() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout read Error", error); } SetCommandExitStatus(error); }]; @@ -78357,92 +54950,63 @@ class ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public ReadAt } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + WriteThermostatUserInterfaceConfigurationKeypadLockout() + : WriteAttribute("keypad-lockout") { + AddArgument("attr-name", "keypad-lockout"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() {} + ~WriteThermostatUserInterfaceConfigurationKeypadLockout() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement 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 subscribeAttributeMaxMeasuredValueWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + [cluster + writeAttributeKeypadLockoutWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute PeakMeasuredValue - */ -class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { -public: - ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") - { - } - - ~ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValue read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint8_t mValue; }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() + : SubscribeAttribute("keypad-lockout") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() {} + ~SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78453,12 +55017,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeKeypadLockoutWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78467,29 +55031,29 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue }; /* - * Attribute PeakMeasuredValueWindow + * Attribute ScheduleProgrammingVisibility */ -class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + : ReadAttribute("schedule-programming-visibility") { } - ~ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() {} + ~ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility read Error", error); } SetCommandExitStatus(error); }]; @@ -78497,22 +55061,64 @@ class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public WriteAttribute { +public: + WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + : WriteAttribute("schedule-programming-visibility") + { + AddArgument("attr-name", "schedule-programming-visibility"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000002) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeScheduleProgrammingVisibilityWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration " + "ScheduleProgrammingVisibility write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + : SubscribeAttribute("schedule-programming-visibility") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() {} + ~SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78523,12 +55129,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueW if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeScheduleProgrammingVisibilityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78537,29 +55143,29 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueW }; /* - * Attribute AverageMeasuredValue + * Attribute GeneratedCommandList */ -class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadThermostatUserInterfaceConfigurationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() {} + ~ReadThermostatUserInterfaceConfigurationGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -78567,22 +55173,22 @@ class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public Re } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() {} + ~SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78593,12 +55199,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78607,29 +55213,29 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal }; /* - * Attribute AverageMeasuredValueWindow + * Attribute AcceptedCommandList */ -class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadThermostatUserInterfaceConfigurationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() {} + ~ReadThermostatUserInterfaceConfigurationAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -78637,22 +55243,22 @@ class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : pub } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() {} + ~SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78663,12 +55269,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78677,29 +55283,29 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal }; /* - * Attribute Uncertainty + * Attribute AttributeList */ -class ReadCarbonMonoxideConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadThermostatUserInterfaceConfigurationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadCarbonMonoxideConcentrationMeasurementUncertainty() {} + ~ReadThermostatUserInterfaceConfigurationAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement Uncertainty read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -78707,22 +55313,22 @@ class ReadCarbonMonoxideConcentrationMeasurementUncertainty : public ReadAttribu } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty() {} + ~SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78733,12 +55339,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78747,29 +55353,29 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty : publ }; /* - * Attribute MeasurementUnit + * Attribute FeatureMap */ -class ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadThermostatUserInterfaceConfigurationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit() {} + ~ReadThermostatUserInterfaceConfigurationFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -78777,22 +55383,22 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit : public ReadAtt } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit() {} + ~SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78803,12 +55409,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78817,29 +55423,29 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : }; /* - * Attribute MeasurementMedium + * Attribute ClusterRevision */ -class ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadThermostatUserInterfaceConfigurationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium() {} + ~ReadThermostatUserInterfaceConfigurationClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -78847,22 +55453,22 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium : public ReadA } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium() {} + ~SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78873,12 +55479,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78886,757 +55492,1135 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium } }; +/*----------------------------------------------------------------------------*\ +| Cluster ColorControl | 0x0300 | +|------------------------------------------------------------------------------| +| Commands: | | +| * MoveToHue | 0x00 | +| * MoveHue | 0x01 | +| * StepHue | 0x02 | +| * MoveToSaturation | 0x03 | +| * MoveSaturation | 0x04 | +| * StepSaturation | 0x05 | +| * MoveToHueAndSaturation | 0x06 | +| * MoveToColor | 0x07 | +| * MoveColor | 0x08 | +| * StepColor | 0x09 | +| * MoveToColorTemperature | 0x0A | +| * EnhancedMoveToHue | 0x40 | +| * EnhancedMoveHue | 0x41 | +| * EnhancedStepHue | 0x42 | +| * EnhancedMoveToHueAndSaturation | 0x43 | +| * ColorLoopSet | 0x44 | +| * StopMoveStep | 0x47 | +| * MoveColorTemperature | 0x4B | +| * StepColorTemperature | 0x4C | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CurrentHue | 0x0000 | +| * CurrentSaturation | 0x0001 | +| * RemainingTime | 0x0002 | +| * CurrentX | 0x0003 | +| * CurrentY | 0x0004 | +| * DriftCompensation | 0x0005 | +| * CompensationText | 0x0006 | +| * ColorTemperatureMireds | 0x0007 | +| * ColorMode | 0x0008 | +| * Options | 0x000F | +| * NumberOfPrimaries | 0x0010 | +| * Primary1X | 0x0011 | +| * Primary1Y | 0x0012 | +| * Primary1Intensity | 0x0013 | +| * Primary2X | 0x0015 | +| * Primary2Y | 0x0016 | +| * Primary2Intensity | 0x0017 | +| * Primary3X | 0x0019 | +| * Primary3Y | 0x001A | +| * Primary3Intensity | 0x001B | +| * Primary4X | 0x0020 | +| * Primary4Y | 0x0021 | +| * Primary4Intensity | 0x0022 | +| * Primary5X | 0x0024 | +| * Primary5Y | 0x0025 | +| * Primary5Intensity | 0x0026 | +| * Primary6X | 0x0028 | +| * Primary6Y | 0x0029 | +| * Primary6Intensity | 0x002A | +| * WhitePointX | 0x0030 | +| * WhitePointY | 0x0031 | +| * ColorPointRX | 0x0032 | +| * ColorPointRY | 0x0033 | +| * ColorPointRIntensity | 0x0034 | +| * ColorPointGX | 0x0036 | +| * ColorPointGY | 0x0037 | +| * ColorPointGIntensity | 0x0038 | +| * ColorPointBX | 0x003A | +| * ColorPointBY | 0x003B | +| * ColorPointBIntensity | 0x003C | +| * EnhancedCurrentHue | 0x4000 | +| * EnhancedColorMode | 0x4001 | +| * ColorLoopActive | 0x4002 | +| * ColorLoopDirection | 0x4003 | +| * ColorLoopTime | 0x4004 | +| * ColorLoopStartEnhancedHue | 0x4005 | +| * ColorLoopStoredEnhancedHue | 0x4006 | +| * ColorCapabilities | 0x400A | +| * ColorTempPhysicalMinMireds | 0x400B | +| * ColorTempPhysicalMaxMireds | 0x400C | +| * CoupleColorTempToLevelMinMireds | 0x400D | +| * StartUpColorTemperatureMireds | 0x4010 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute LevelValue + * Command MoveToHue */ -class ReadCarbonMonoxideConcentrationMeasurementLevelValue : public ReadAttribute { +class ColorControlMoveToHue : public ClusterCommand { public: - ReadCarbonMonoxideConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ColorControlMoveToHue() + : ClusterCommand("move-to-hue") { + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~ReadCarbonMonoxideConcentrationMeasurementLevelValue() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement LevelValue read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; + params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToHueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type mRequest; }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue : public SubscribeAttribute { +/* + * Command MoveHue + */ +class ColorControlMoveHue : public ClusterCommand { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + ColorControlMoveHue() + : ClusterCommand("move-hue") { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveHueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeLevelValueWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveHue::Type mRequest; }; /* - * Attribute GeneratedCommandList + * Command StepHue */ -class ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ColorControlStepHue : public ClusterCommand { public: - ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ColorControlStepHue() + : ClusterCommand("step-hue") { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepHueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::StepHue::Type mRequest; }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +/* + * Command MoveToSaturation + */ +class ColorControlMoveToSaturation : public ClusterCommand { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + ColorControlMoveToSaturation() + : ClusterCommand("move-to-saturation") { + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToSaturationWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type mRequest; }; /* - * Attribute AcceptedCommandList + * Command MoveSaturation */ -class ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ColorControlMoveSaturation : public ClusterCommand { public: - ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ColorControlMoveSaturation() + : ClusterCommand("move-saturation") { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveSaturationWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type mRequest; }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +/* + * Command StepSaturation + */ +class ColorControlStepSaturation : public ClusterCommand { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + ColorControlStepSaturation() + : ClusterCommand("step-saturation") { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepSaturationWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::StepSaturation::Type mRequest; }; /* - * Attribute EventList + * Command MoveToHueAndSaturation */ -class ReadCarbonMonoxideConcentrationMeasurementEventList : public ReadAttribute { +class ColorControlMoveToHueAndSaturation : public ClusterCommand { public: - ReadCarbonMonoxideConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ColorControlMoveToHueAndSaturation() + : ClusterCommand("move-to-hue-and-saturation") { + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~ReadCarbonMonoxideConcentrationMeasurementEventList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement EventList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; + params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToHueAndSaturationWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList : public SubscribeAttribute { +/* + * Command MoveToColor + */ +class ColorControlMoveToColor : public ClusterCommand { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + ColorControlMoveToColor() + : ClusterCommand("move-to-color") { + AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); + AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.colorX = [NSNumber numberWithUnsignedShort:mRequest.colorX]; + params.colorY = [NSNumber numberWithUnsignedShort:mRequest.colorY]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToColorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveToColor::Type mRequest; }; /* - * Attribute AttributeList + * Command MoveColor */ -class ReadCarbonMonoxideConcentrationMeasurementAttributeList : public ReadAttribute { +class ColorControlMoveColor : public ClusterCommand { public: - ReadCarbonMonoxideConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ColorControlMoveColor() + : ClusterCommand("move-color") { + AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); + AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~ReadCarbonMonoxideConcentrationMeasurementAttributeList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.rateX = [NSNumber numberWithShort:mRequest.rateX]; + params.rateY = [NSNumber numberWithShort:mRequest.rateY]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveColorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveColor::Type mRequest; }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList : public SubscribeAttribute { +/* + * Command StepColor + */ +class ColorControlStepColor : public ClusterCommand { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + ColorControlStepColor() + : ClusterCommand("step-color") { + AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); + AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement 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(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepX = [NSNumber numberWithShort:mRequest.stepX]; + params.stepY = [NSNumber numberWithShort:mRequest.stepY]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepColorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::StepColor::Type mRequest; }; /* - * Attribute FeatureMap + * Command MoveToColorTemperature */ -class ReadCarbonMonoxideConcentrationMeasurementFeatureMap : public ReadAttribute { +class ColorControlMoveToColorTemperature : public ClusterCommand { public: - ReadCarbonMonoxideConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ColorControlMoveToColorTemperature() + : ClusterCommand("move-to-color-temperature") { + AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~ReadCarbonMonoxideConcentrationMeasurementFeatureMap() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.colorTemperatureMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMireds]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToColorTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type mRequest; }; /* - * Attribute ClusterRevision + * Command EnhancedMoveToHue */ -class ReadCarbonMonoxideConcentrationMeasurementClusterRevision : public ReadAttribute { +class ColorControlEnhancedMoveToHue : public ClusterCommand { public: - ReadCarbonMonoxideConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ColorControlEnhancedMoveToHue() + : ClusterCommand("enhanced-move-to-hue") { + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~ReadCarbonMonoxideConcentrationMeasurementClusterRevision() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("CarbonMonoxideConcentrationMeasurement ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; + params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedMoveToHueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { +/* + * Command EnhancedMoveHue + */ +class ColorControlEnhancedMoveHue : public ClusterCommand { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + ColorControlEnhancedMoveHue() + : ClusterCommand("enhanced-move-hue") { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedMoveHueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } -}; -/*----------------------------------------------------------------------------*\ -| Cluster CarbonDioxideConcentrationMeasurement | 0x040D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +private: + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type mRequest; +}; /* - * Attribute MeasuredValue + * Command EnhancedStepHue */ -class ReadCarbonDioxideConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ColorControlEnhancedStepHue : public ClusterCommand { public: - ReadCarbonDioxideConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ColorControlEnhancedStepHue() + : ClusterCommand("enhanced-step-hue") { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~ReadCarbonDioxideConcentrationMeasurementMeasuredValue() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement MeasuredValue read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedStepHueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type mRequest; }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +/* + * Command EnhancedMoveToHueAndSaturation + */ +class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + ColorControlEnhancedMoveToHueAndSaturation() + : ClusterCommand("enhanced-move-to-hue-and-saturation") { + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; + params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedMoveToHueAndSaturationWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeMeasuredValueWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; }; /* - * Attribute MinMeasuredValue + * Command ColorLoopSet */ -class ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ColorControlColorLoopSet : public ClusterCommand { public: - ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ColorControlColorLoopSet() + : ClusterCommand("color-loop-set") { + AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); + AddArgument("Action", 0, UINT8_MAX, &mRequest.action); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("Time", 0, UINT16_MAX, &mRequest.time); + AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement MinMeasuredValue read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterColorLoopSetParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.updateFlags = [NSNumber numberWithUnsignedChar:mRequest.updateFlags.Raw()]; + params.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.action)]; + params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; + params.time = [NSNumber numberWithUnsignedShort:mRequest.time]; + params.startHue = [NSNumber numberWithUnsignedShort:mRequest.startHue]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster colorLoopSetWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type mRequest; }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +/* + * Command StopMoveStep + */ +class ColorControlStopMoveStep : public ClusterCommand { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + ColorControlStopMoveStep() + : ClusterCommand("stop-move-step") { + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopMoveStepWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeMinMeasuredValueWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type mRequest; }; /* - * Attribute MaxMeasuredValue + * Command MoveColorTemperature */ -class ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ColorControlMoveColorTemperature : public ClusterCommand { public: - ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ColorControlMoveColorTemperature() + : ClusterCommand("move-color-temperature") { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; + params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; + params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveColorTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type mRequest; }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +/* + * Command StepColorTemperature + */ +class ColorControlStepColorTemperature : public ClusterCommand { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + ColorControlStepColorTemperature() + : ClusterCommand("step-color-temperature") { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement 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 subscribeAttributeMaxMeasuredValueWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - SetCommandExitStatus(error); - }]; + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; + params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepColorTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type mRequest; }; /* - * Attribute PeakMeasuredValue + * Attribute CurrentHue */ -class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadColorControlCurrentHue : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadColorControlCurrentHue() + : ReadAttribute("current-hue") { } - ~ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue() {} + ~ReadColorControlCurrentHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentHue response %@", [value description]); if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("ColorControl CurrentHue read Error", error); } SetCommandExitStatus(error); }]; @@ -79644,22 +56628,22 @@ class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAt } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeColorControlCurrentHue() + : SubscribeAttribute("current-hue") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue() {} + ~SubscribeAttributeColorControlCurrentHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79670,12 +56654,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeCurrentHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.CurrentHue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79684,29 +56668,29 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : }; /* - * Attribute PeakMeasuredValueWindow + * Attribute CurrentSaturation */ -class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadColorControlCurrentSaturation : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadColorControlCurrentSaturation() + : ReadAttribute("current-saturation") { } - ~ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() {} + ~ReadColorControlCurrentSaturation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("ColorControl CurrentSaturation read Error", error); } SetCommandExitStatus(error); }]; @@ -79714,22 +56698,22 @@ class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeColorControlCurrentSaturation() + : SubscribeAttribute("current-saturation") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() {} + ~SubscribeAttributeColorControlCurrentSaturation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79740,12 +56724,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeCurrentSaturationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79754,29 +56738,29 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWi }; /* - * Attribute AverageMeasuredValue + * Attribute RemainingTime */ -class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadColorControlRemainingTime : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadColorControlRemainingTime() + : ReadAttribute("remaining-time") { } - ~ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue() {} + ~ReadColorControlRemainingTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.RemainingTime response %@", [value description]); if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("ColorControl RemainingTime read Error", error); } SetCommandExitStatus(error); }]; @@ -79784,22 +56768,22 @@ class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public Rea } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeColorControlRemainingTime() + : SubscribeAttribute("remaining-time") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue() {} + ~SubscribeAttributeColorControlRemainingTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79810,12 +56794,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeRemainingTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.RemainingTime response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79824,29 +56808,29 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu }; /* - * Attribute AverageMeasuredValueWindow + * Attribute CurrentX */ -class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadColorControlCurrentX : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadColorControlCurrentX() + : ReadAttribute("current-x") { } - ~ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() {} + ~ReadColorControlCurrentX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentX response %@", [value description]); if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("ColorControl CurrentX read Error", error); } SetCommandExitStatus(error); }]; @@ -79854,22 +56838,22 @@ class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : publ } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeColorControlCurrentX() + : SubscribeAttribute("current-x") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() {} + ~SubscribeAttributeColorControlCurrentX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79880,12 +56864,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeCurrentXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"ColorControl.CurrentX response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79894,29 +56878,29 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu }; /* - * Attribute Uncertainty + * Attribute CurrentY */ -class ReadCarbonDioxideConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadColorControlCurrentY : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadColorControlCurrentY() + : ReadAttribute("current-y") { } - ~ReadCarbonDioxideConcentrationMeasurementUncertainty() {} + ~ReadColorControlCurrentY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentY response %@", [value description]); if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement Uncertainty read Error", error); + LogNSError("ColorControl CurrentY read Error", error); } SetCommandExitStatus(error); }]; @@ -79924,22 +56908,22 @@ class ReadCarbonDioxideConcentrationMeasurementUncertainty : public ReadAttribut } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeColorControlCurrentY() + : SubscribeAttribute("current-y") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty() {} + ~SubscribeAttributeColorControlCurrentY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79950,12 +56934,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeCurrentYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"ColorControl.CurrentY response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79964,29 +56948,29 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : publi }; /* - * Attribute MeasurementUnit + * Attribute DriftCompensation */ -class ReadCarbonDioxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadColorControlDriftCompensation : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadColorControlDriftCompensation() + : ReadAttribute("drift-compensation") { } - ~ReadCarbonDioxideConcentrationMeasurementMeasurementUnit() {} + ~ReadColorControlDriftCompensation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.DriftCompensation response %@", [value description]); if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("ColorControl DriftCompensation read Error", error); } SetCommandExitStatus(error); }]; @@ -79994,22 +56978,22 @@ class ReadCarbonDioxideConcentrationMeasurementMeasurementUnit : public ReadAttr } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeColorControlDriftCompensation() + : SubscribeAttribute("drift-compensation") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit() {} + ~SubscribeAttributeColorControlDriftCompensation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80020,12 +57004,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeDriftCompensationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"ColorControl.DriftCompensation response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80034,29 +57018,29 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : p }; /* - * Attribute MeasurementMedium + * Attribute CompensationText */ -class ReadCarbonDioxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadColorControlCompensationText : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadColorControlCompensationText() + : ReadAttribute("compensation-text") { } - ~ReadCarbonDioxideConcentrationMeasurementMeasurementMedium() {} + ~ReadColorControlCompensationText() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CompensationText response %@", [value description]); if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("ColorControl CompensationText read Error", error); } SetCommandExitStatus(error); }]; @@ -80064,22 +57048,22 @@ class ReadCarbonDioxideConcentrationMeasurementMeasurementMedium : public ReadAt } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeColorControlCompensationText() + : SubscribeAttribute("compensation-text") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium() {} + ~SubscribeAttributeColorControlCompensationText() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80090,12 +57074,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeCompensationTextWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CompensationText response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80104,29 +57088,29 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : }; /* - * Attribute LevelValue + * Attribute ColorTemperatureMireds */ -class ReadCarbonDioxideConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadColorControlColorTemperatureMireds : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadColorControlColorTemperatureMireds() + : ReadAttribute("color-temperature-mireds") { } - ~ReadCarbonDioxideConcentrationMeasurementLevelValue() {} + ~ReadColorControlColorTemperatureMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement LevelValue read Error", error); + LogNSError("ColorControl ColorTemperatureMireds read Error", error); } SetCommandExitStatus(error); }]; @@ -80134,22 +57118,22 @@ class ReadCarbonDioxideConcentrationMeasurementLevelValue : public ReadAttribute } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeColorControlColorTemperatureMireds() + : SubscribeAttribute("color-temperature-mireds") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue() {} + ~SubscribeAttributeColorControlColorTemperatureMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80160,12 +57144,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeColorTemperatureMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80174,29 +57158,29 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public }; /* - * Attribute GeneratedCommandList + * Attribute ColorMode */ -class ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadColorControlColorMode : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadColorControlColorMode() + : ReadAttribute("color-mode") { } - ~ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList() {} + ~ReadColorControlColorMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorMode response %@", [value description]); if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("ColorControl ColorMode read Error", error); } SetCommandExitStatus(error); }]; @@ -80204,22 +57188,22 @@ class ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList : public Rea } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeColorControlColorMode() + : SubscribeAttribute("color-mode") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList() {} + ~SubscribeAttributeColorControlColorMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80230,12 +57214,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandLis if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeColorModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80244,29 +57228,29 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandLis }; /* - * Attribute AcceptedCommandList + * Attribute Options */ -class ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadColorControlOptions : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadColorControlOptions() + : ReadAttribute("options") { } - ~ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList() {} + ~ReadColorControlOptions() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Options response %@", [value description]); if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("ColorControl Options read Error", error); } SetCommandExitStatus(error); }]; @@ -80274,92 +57258,62 @@ class ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList : public Read } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class WriteColorControlOptions : public WriteAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteColorControlOptions() + : WriteAttribute("options") { + AddArgument("attr-name", "options"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList() {} + ~WriteColorControlOptions() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement 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(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + [cluster writeAttributeOptionsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl Options write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute EventList - */ -class ReadCarbonDioxideConcentrationMeasurementEventList : public ReadAttribute { -public: - ReadCarbonDioxideConcentrationMeasurementEventList() - : ReadAttribute("event-list") - { - } - - ~ReadCarbonDioxideConcentrationMeasurementEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint8_t mValue; }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeColorControlOptions : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeColorControlOptions() + : SubscribeAttribute("options") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList() {} + ~SubscribeAttributeColorControlOptions() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80370,12 +57324,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeOptionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Options response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80384,29 +57338,29 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public }; /* - * Attribute AttributeList + * Attribute NumberOfPrimaries */ -class ReadCarbonDioxideConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadColorControlNumberOfPrimaries : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadColorControlNumberOfPrimaries() + : ReadAttribute("number-of-primaries") { } - ~ReadCarbonDioxideConcentrationMeasurementAttributeList() {} + ~ReadColorControlNumberOfPrimaries() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement AttributeList read Error", error); + LogNSError("ColorControl NumberOfPrimaries read Error", error); } SetCommandExitStatus(error); }]; @@ -80414,22 +57368,22 @@ class ReadCarbonDioxideConcentrationMeasurementAttributeList : public ReadAttrib } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeColorControlNumberOfPrimaries() + : SubscribeAttribute("number-of-primaries") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList() {} + ~SubscribeAttributeColorControlNumberOfPrimaries() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80440,12 +57394,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeNumberOfPrimariesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80454,29 +57408,29 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : pub }; /* - * Attribute FeatureMap + * Attribute Primary1X */ -class ReadCarbonDioxideConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadColorControlPrimary1X : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadColorControlPrimary1X() + : ReadAttribute("primary1x") { } - ~ReadCarbonDioxideConcentrationMeasurementFeatureMap() {} + ~ReadColorControlPrimary1X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1X response %@", [value description]); if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement FeatureMap read Error", error); + LogNSError("ColorControl Primary1X read Error", error); } SetCommandExitStatus(error); }]; @@ -80484,22 +57438,22 @@ class ReadCarbonDioxideConcentrationMeasurementFeatureMap : public ReadAttribute } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeColorControlPrimary1X() + : SubscribeAttribute("primary1x") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap() {} + ~SubscribeAttributeColorControlPrimary1X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80510,12 +57464,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributePrimary1XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"ColorControl.Primary1X response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80524,29 +57478,29 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public }; /* - * Attribute ClusterRevision + * Attribute Primary1Y */ -class ReadCarbonDioxideConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadColorControlPrimary1Y : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadColorControlPrimary1Y() + : ReadAttribute("primary1y") { } - ~ReadCarbonDioxideConcentrationMeasurementClusterRevision() {} + ~ReadColorControlPrimary1Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1Y response %@", [value description]); if (error != nil) { - LogNSError("CarbonDioxideConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("ColorControl Primary1Y read Error", error); } SetCommandExitStatus(error); }]; @@ -80554,22 +57508,22 @@ class ReadCarbonDioxideConcentrationMeasurementClusterRevision : public ReadAttr } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeColorControlPrimary1Y() + : SubscribeAttribute("primary1y") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision() {} + ~SubscribeAttributeColorControlPrimary1Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80580,12 +57534,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributePrimary1YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"ColorControl.Primary1Y response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80593,57 +57547,30 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : p } }; -/*----------------------------------------------------------------------------*\ -| Cluster NitrogenDioxideConcentrationMeasurement | 0x0413 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute Primary1Intensity */ -class ReadNitrogenDioxideConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadColorControlPrimary1Intensity : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadColorControlPrimary1Intensity() + : ReadAttribute("primary1intensity") { } - ~ReadNitrogenDioxideConcentrationMeasurementMeasuredValue() {} + ~ReadColorControlPrimary1Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("ColorControl Primary1Intensity read Error", error); } SetCommandExitStatus(error); }]; @@ -80651,22 +57578,22 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasuredValue : public ReadAttr } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeColorControlPrimary1Intensity() + : SubscribeAttribute("primary1intensity") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue() {} + ~SubscribeAttributeColorControlPrimary1Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80677,12 +57604,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributePrimary1IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80691,29 +57618,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : p }; /* - * Attribute MinMeasuredValue + * Attribute Primary2X */ -class ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadColorControlPrimary2X : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadColorControlPrimary2X() + : ReadAttribute("primary2x") { } - ~ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue() {} + ~ReadColorControlPrimary2X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2X response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("ColorControl Primary2X read Error", error); } SetCommandExitStatus(error); }]; @@ -80721,22 +57648,22 @@ class ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public ReadA } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeColorControlPrimary2X() + : SubscribeAttribute("primary2x") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue() {} + ~SubscribeAttributeColorControlPrimary2X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80747,12 +57674,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributePrimary2XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.Primary2X response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80761,29 +57688,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue }; /* - * Attribute MaxMeasuredValue + * Attribute Primary2Y */ -class ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadColorControlPrimary2Y : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadColorControlPrimary2Y() + : ReadAttribute("primary2y") { } - ~ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() {} + ~ReadColorControlPrimary2Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2Y response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("ColorControl Primary2Y read Error", error); } SetCommandExitStatus(error); }]; @@ -80791,22 +57718,22 @@ class ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public ReadA } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeColorControlPrimary2Y() + : SubscribeAttribute("primary2y") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() {} + ~SubscribeAttributeColorControlPrimary2Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80817,12 +57744,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributePrimary2YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.Primary2Y response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80831,29 +57758,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue }; /* - * Attribute PeakMeasuredValue + * Attribute Primary2Intensity */ -class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadColorControlPrimary2Intensity : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadColorControlPrimary2Intensity() + : ReadAttribute("primary2intensity") { } - ~ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() {} + ~ReadColorControlPrimary2Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("ColorControl Primary2Intensity read Error", error); } SetCommandExitStatus(error); }]; @@ -80861,22 +57788,22 @@ class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public Read } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeColorControlPrimary2Intensity() + : SubscribeAttribute("primary2intensity") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() {} + ~SubscribeAttributeColorControlPrimary2Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80887,12 +57814,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributePrimary2IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80901,29 +57828,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue }; /* - * Attribute PeakMeasuredValueWindow + * Attribute Primary3X */ -class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadColorControlPrimary3X : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadColorControlPrimary3X() + : ReadAttribute("primary3x") { } - ~ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() {} + ~ReadColorControlPrimary3X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3X response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("ColorControl Primary3X read Error", error); } SetCommandExitStatus(error); }]; @@ -80931,22 +57858,22 @@ class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : publi } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeColorControlPrimary3X() + : SubscribeAttribute("primary3x") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() {} + ~SubscribeAttributeColorControlPrimary3X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80957,12 +57884,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributePrimary3XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"ColorControl.Primary3X response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80971,29 +57898,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue }; /* - * Attribute AverageMeasuredValue + * Attribute Primary3Y */ -class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadColorControlPrimary3Y : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadColorControlPrimary3Y() + : ReadAttribute("primary3y") { } - ~ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() {} + ~ReadColorControlPrimary3Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3Y response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("ColorControl Primary3Y read Error", error); } SetCommandExitStatus(error); }]; @@ -81001,22 +57928,22 @@ class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public R } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeColorControlPrimary3Y() + : SubscribeAttribute("primary3y") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() {} + ~SubscribeAttributeColorControlPrimary3Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81027,12 +57954,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributePrimary3YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.Primary3Y response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81041,29 +57968,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa }; /* - * Attribute AverageMeasuredValueWindow + * Attribute Primary3Intensity */ -class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadColorControlPrimary3Intensity : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadColorControlPrimary3Intensity() + : ReadAttribute("primary3intensity") { } - ~ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() {} + ~ReadColorControlPrimary3Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("ColorControl Primary3Intensity read Error", error); } SetCommandExitStatus(error); }]; @@ -81071,22 +57998,22 @@ class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : pu } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeColorControlPrimary3Intensity() + : SubscribeAttribute("primary3intensity") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() {} + ~SubscribeAttributeColorControlPrimary3Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81097,12 +58024,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributePrimary3IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81111,29 +58038,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa }; /* - * Attribute Uncertainty + * Attribute Primary4X */ -class ReadNitrogenDioxideConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadColorControlPrimary4X : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadColorControlPrimary4X() + : ReadAttribute("primary4x") { } - ~ReadNitrogenDioxideConcentrationMeasurementUncertainty() {} + ~ReadColorControlPrimary4X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4X response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement Uncertainty read Error", error); + LogNSError("ColorControl Primary4X read Error", error); } SetCommandExitStatus(error); }]; @@ -81141,22 +58068,22 @@ class ReadNitrogenDioxideConcentrationMeasurementUncertainty : public ReadAttrib } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeColorControlPrimary4X() + : SubscribeAttribute("primary4x") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty() {} + ~SubscribeAttributeColorControlPrimary4X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81167,12 +58094,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributePrimary4XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"ColorControl.Primary4X response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81181,29 +58108,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : pub }; /* - * Attribute MeasurementUnit + * Attribute Primary4Y */ -class ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadColorControlPrimary4Y : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadColorControlPrimary4Y() + : ReadAttribute("primary4y") { } - ~ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit() {} + ~ReadColorControlPrimary4Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4Y response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("ColorControl Primary4Y read Error", error); } SetCommandExitStatus(error); }]; @@ -81211,22 +58138,22 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit : public ReadAt } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeColorControlPrimary4Y() + : SubscribeAttribute("primary4y") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit() {} + ~SubscribeAttributeColorControlPrimary4Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81237,12 +58164,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributePrimary4YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"ColorControl.Primary4Y response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81251,29 +58178,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : }; /* - * Attribute MeasurementMedium + * Attribute Primary4Intensity */ -class ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadColorControlPrimary4Intensity : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadColorControlPrimary4Intensity() + : ReadAttribute("primary4intensity") { } - ~ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium() {} + ~ReadColorControlPrimary4Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("ColorControl Primary4Intensity read Error", error); } SetCommandExitStatus(error); }]; @@ -81281,22 +58208,22 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium : public Read } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeColorControlPrimary4Intensity() + : SubscribeAttribute("primary4intensity") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium() {} + ~SubscribeAttributeColorControlPrimary4Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81307,12 +58234,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributePrimary4IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81321,29 +58248,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium }; /* - * Attribute LevelValue + * Attribute Primary5X */ -class ReadNitrogenDioxideConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadColorControlPrimary5X : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadColorControlPrimary5X() + : ReadAttribute("primary5x") { } - ~ReadNitrogenDioxideConcentrationMeasurementLevelValue() {} + ~ReadColorControlPrimary5X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5X response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement LevelValue read Error", error); + LogNSError("ColorControl Primary5X read Error", error); } SetCommandExitStatus(error); }]; @@ -81351,22 +58278,22 @@ class ReadNitrogenDioxideConcentrationMeasurementLevelValue : public ReadAttribu } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeColorControlPrimary5X() + : SubscribeAttribute("primary5x") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue() {} + ~SubscribeAttributeColorControlPrimary5X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81377,12 +58304,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributePrimary5XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"ColorControl.Primary5X response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81391,29 +58318,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : publ }; /* - * Attribute GeneratedCommandList + * Attribute Primary5Y */ -class ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadColorControlPrimary5Y : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadColorControlPrimary5Y() + : ReadAttribute("primary5y") { } - ~ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList() {} + ~ReadColorControlPrimary5Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5Y response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("ColorControl Primary5Y read Error", error); } SetCommandExitStatus(error); }]; @@ -81421,22 +58348,22 @@ class ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public R } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeColorControlPrimary5Y() + : SubscribeAttribute("primary5y") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList() {} + ~SubscribeAttributeColorControlPrimary5Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81447,12 +58374,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandL if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePrimary5YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5Y response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81461,29 +58388,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandL }; /* - * Attribute AcceptedCommandList + * Attribute Primary5Intensity */ -class ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadColorControlPrimary5Intensity : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadColorControlPrimary5Intensity() + : ReadAttribute("primary5intensity") { } - ~ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList() {} + ~ReadColorControlPrimary5Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("ColorControl Primary5Intensity read Error", error); } SetCommandExitStatus(error); }]; @@ -81491,22 +58418,22 @@ class ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public Re } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeColorControlPrimary5Intensity() + : SubscribeAttribute("primary5intensity") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList() {} + ~SubscribeAttributeColorControlPrimary5Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81517,12 +58444,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandLi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePrimary5IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81531,29 +58458,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandLi }; /* - * Attribute EventList + * Attribute Primary6X */ -class ReadNitrogenDioxideConcentrationMeasurementEventList : public ReadAttribute { +class ReadColorControlPrimary6X : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadColorControlPrimary6X() + : ReadAttribute("primary6x") { } - ~ReadNitrogenDioxideConcentrationMeasurementEventList() {} + ~ReadColorControlPrimary6X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6X response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement EventList read Error", error); + LogNSError("ColorControl Primary6X read Error", error); } SetCommandExitStatus(error); }]; @@ -81561,22 +58488,22 @@ class ReadNitrogenDioxideConcentrationMeasurementEventList : public ReadAttribut } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeColorControlPrimary6X() + : SubscribeAttribute("primary6x") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList() {} + ~SubscribeAttributeColorControlPrimary6X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81587,12 +58514,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePrimary6XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6X response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81601,29 +58528,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : publi }; /* - * Attribute AttributeList + * Attribute Primary6Y */ -class ReadNitrogenDioxideConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadColorControlPrimary6Y : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadColorControlPrimary6Y() + : ReadAttribute("primary6y") { } - ~ReadNitrogenDioxideConcentrationMeasurementAttributeList() {} + ~ReadColorControlPrimary6Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6Y response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement AttributeList read Error", error); + LogNSError("ColorControl Primary6Y read Error", error); } SetCommandExitStatus(error); }]; @@ -81631,22 +58558,22 @@ class ReadNitrogenDioxideConcentrationMeasurementAttributeList : public ReadAttr } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeColorControlPrimary6Y() + : SubscribeAttribute("primary6y") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList() {} + ~SubscribeAttributeColorControlPrimary6Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81657,12 +58584,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePrimary6YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6Y response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81671,29 +58598,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : p }; /* - * Attribute FeatureMap + * Attribute Primary6Intensity */ -class ReadNitrogenDioxideConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadColorControlPrimary6Intensity : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadColorControlPrimary6Intensity() + : ReadAttribute("primary6intensity") { } - ~ReadNitrogenDioxideConcentrationMeasurementFeatureMap() {} + ~ReadColorControlPrimary6Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement FeatureMap read Error", error); + LogNSError("ColorControl Primary6Intensity read Error", error); } SetCommandExitStatus(error); }]; @@ -81701,22 +58628,22 @@ class ReadNitrogenDioxideConcentrationMeasurementFeatureMap : public ReadAttribu } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeColorControlPrimary6Intensity() + : SubscribeAttribute("primary6intensity") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap() {} + ~SubscribeAttributeColorControlPrimary6Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81727,12 +58654,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributePrimary6IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81741,29 +58668,29 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : publ }; /* - * Attribute ClusterRevision + * Attribute WhitePointX */ -class ReadNitrogenDioxideConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadColorControlWhitePointX : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadColorControlWhitePointX() + : ReadAttribute("white-point-x") { } - ~ReadNitrogenDioxideConcentrationMeasurementClusterRevision() {} + ~ReadColorControlWhitePointX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.WhitePointX response %@", [value description]); if (error != nil) { - LogNSError("NitrogenDioxideConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("ColorControl WhitePointX read Error", error); } SetCommandExitStatus(error); }]; @@ -81771,22 +58698,62 @@ class ReadNitrogenDioxideConcentrationMeasurementClusterRevision : public ReadAt } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class WriteColorControlWhitePointX : public WriteAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteColorControlWhitePointX() + : WriteAttribute("white-point-x") + { + AddArgument("attr-name", "white-point-x"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteColorControlWhitePointX() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000030) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeWhitePointXWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl WhitePointX write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { +public: + SubscribeAttributeColorControlWhitePointX() + : SubscribeAttribute("white-point-x") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision() {} + ~SubscribeAttributeColorControlWhitePointX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81797,12 +58764,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeWhitePointXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"ColorControl.WhitePointX response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81810,57 +58777,30 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : } }; -/*----------------------------------------------------------------------------*\ -| Cluster OzoneConcentrationMeasurement | 0x0415 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute WhitePointY */ -class ReadOzoneConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadColorControlWhitePointY : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadColorControlWhitePointY() + : ReadAttribute("white-point-y") { } - ~ReadOzoneConcentrationMeasurementMeasuredValue() {} + ~ReadColorControlWhitePointY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.WhitePointY response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("ColorControl WhitePointY read Error", error); } SetCommandExitStatus(error); }]; @@ -81868,22 +58808,62 @@ class ReadOzoneConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class WriteColorControlWhitePointY : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + WriteColorControlWhitePointY() + : WriteAttribute("white-point-y") { + AddArgument("attr-name", "white-point-y"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue() {} + ~WriteColorControlWhitePointY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeWhitePointYWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl WhitePointY write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { +public: + SubscribeAttributeColorControlWhitePointY() + : SubscribeAttribute("white-point-y") + { + } + + ~SubscribeAttributeColorControlWhitePointY() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000031) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81894,12 +58874,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeWhitePointYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"ColorControl.WhitePointY response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81908,29 +58888,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public Subs }; /* - * Attribute MinMeasuredValue + * Attribute ColorPointRX */ -class ReadOzoneConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadColorControlColorPointRX : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadColorControlColorPointRX() + : ReadAttribute("color-point-rx") { } - ~ReadOzoneConcentrationMeasurementMinMeasuredValue() {} + ~ReadColorControlColorPointRX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRX response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("ColorControl ColorPointRX read Error", error); } SetCommandExitStatus(error); }]; @@ -81938,22 +58918,62 @@ class ReadOzoneConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class WriteColorControlColorPointRX : public WriteAttribute { +public: + WriteColorControlColorPointRX() + : WriteAttribute("color-point-rx") + { + AddArgument("attr-name", "color-point-rx"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteColorControlColorPointRX() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000032) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointRXWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRX write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeColorControlColorPointRX() + : SubscribeAttribute("color-point-rx") { } - ~SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue() {} + ~SubscribeAttributeColorControlColorPointRX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81964,12 +58984,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeColorPointRXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.ColorPointRX response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81978,29 +58998,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public S }; /* - * Attribute MaxMeasuredValue + * Attribute ColorPointRY */ -class ReadOzoneConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadColorControlColorPointRY : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadColorControlColorPointRY() + : ReadAttribute("color-point-ry") { } - ~ReadOzoneConcentrationMeasurementMaxMeasuredValue() {} + ~ReadColorControlColorPointRY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRY response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("ColorControl ColorPointRY read Error", error); } SetCommandExitStatus(error); }]; @@ -82008,92 +59028,62 @@ class ReadOzoneConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class WriteColorControlColorPointRY : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + WriteColorControlColorPointRY() + : WriteAttribute("color-point-ry") { + AddArgument("attr-name", "color-point-ry"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue() {} + ~WriteColorControlColorPointRY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement 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 subscribeAttributeMaxMeasuredValueWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + [cluster writeAttributeColorPointRYWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRY write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute PeakMeasuredValue - */ -class ReadOzoneConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { -public: - ReadOzoneConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") - { - } - - ~ReadOzoneConcentrationMeasurementPeakMeasuredValue() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000003) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { - LogNSError("OzoneConcentrationMeasurement PeakMeasuredValue read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint16_t mValue; }; -class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeColorControlColorPointRY() + : SubscribeAttribute("color-point-ry") { } - ~SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue() {} + ~SubscribeAttributeColorControlColorPointRY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82104,12 +59094,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeColorPointRYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.ColorPointRY response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82118,29 +59108,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public }; /* - * Attribute PeakMeasuredValueWindow + * Attribute ColorPointRIntensity */ -class ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadColorControlColorPointRIntensity : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadColorControlColorPointRIntensity() + : ReadAttribute("color-point-rintensity") { } - ~ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow() {} + ~ReadColorControlColorPointRIntensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("ColorControl ColorPointRIntensity read Error", error); } SetCommandExitStatus(error); }]; @@ -82148,22 +59138,62 @@ class ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttr } }; -class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class WriteColorControlColorPointRIntensity : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + WriteColorControlColorPointRIntensity() + : WriteAttribute("color-point-rintensity") { + AddArgument("attr-name", "color-point-rintensity"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow() {} + ~WriteColorControlColorPointRIntensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeColorPointRIntensityWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRIntensity write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointRIntensity() + : SubscribeAttribute("color-point-rintensity") + { + } + + ~SubscribeAttributeColorControlColorPointRIntensity() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000034) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82174,12 +59204,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeColorPointRIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82188,29 +59218,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : p }; /* - * Attribute AverageMeasuredValue + * Attribute ColorPointGX */ -class ReadOzoneConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadColorControlColorPointGX : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadColorControlColorPointGX() + : ReadAttribute("color-point-gx") { } - ~ReadOzoneConcentrationMeasurementAverageMeasuredValue() {} + ~ReadColorControlColorPointGX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000036) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointGX response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("ColorControl ColorPointGX read Error", error); } SetCommandExitStatus(error); }]; @@ -82218,22 +59248,62 @@ class ReadOzoneConcentrationMeasurementAverageMeasuredValue : public ReadAttribu } }; -class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class WriteColorControlColorPointGX : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + WriteColorControlColorPointGX() + : WriteAttribute("color-point-gx") { + AddArgument("attr-name", "color-point-gx"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue() {} + ~WriteColorControlColorPointGX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000036) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointGXWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGX write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointGX() + : SubscribeAttribute("color-point-gx") + { + } + + ~SubscribeAttributeColorControlColorPointGX() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000036) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82244,12 +59314,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeColorPointGXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.ColorPointGX response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82258,29 +59328,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : publ }; /* - * Attribute AverageMeasuredValueWindow + * Attribute ColorPointGY */ -class ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadColorControlColorPointGY : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadColorControlColorPointGY() + : ReadAttribute("color-point-gy") { } - ~ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow() {} + ~ReadColorControlColorPointGY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointGY response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("ColorControl ColorPointGY read Error", error); } SetCommandExitStatus(error); }]; @@ -82288,22 +59358,62 @@ class ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow : public ReadA } }; -class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class WriteColorControlColorPointGY : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + WriteColorControlColorPointGY() + : WriteAttribute("color-point-gy") { + AddArgument("attr-name", "color-point-gy"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow() {} + ~WriteColorControlColorPointGY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointGYWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGY write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointGY() + : SubscribeAttribute("color-point-gy") + { + } + + ~SubscribeAttributeColorControlColorPointGY() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000037) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82314,12 +59424,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeColorPointGYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"ColorControl.ColorPointGY response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82328,29 +59438,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow }; /* - * Attribute Uncertainty + * Attribute ColorPointGIntensity */ -class ReadOzoneConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadColorControlColorPointGIntensity : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadColorControlColorPointGIntensity() + : ReadAttribute("color-point-gintensity") { } - ~ReadOzoneConcentrationMeasurementUncertainty() {} + ~ReadColorControlColorPointGIntensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000038) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement Uncertainty read Error", error); + LogNSError("ColorControl ColorPointGIntensity read Error", error); } SetCommandExitStatus(error); }]; @@ -82358,22 +59468,62 @@ class ReadOzoneConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public SubscribeAttribute { +class WriteColorControlColorPointGIntensity : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + WriteColorControlColorPointGIntensity() + : WriteAttribute("color-point-gintensity") { + AddArgument("attr-name", "color-point-gintensity"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementUncertainty() {} + ~WriteColorControlColorPointGIntensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000038) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeColorPointGIntensityWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGIntensity write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointGIntensity() + : SubscribeAttribute("color-point-gintensity") + { + } + + ~SubscribeAttributeColorControlColorPointGIntensity() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000038) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82384,12 +59534,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeColorPointGIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82398,29 +59548,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public Subscr }; /* - * Attribute MeasurementUnit + * Attribute ColorPointBX */ -class ReadOzoneConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadColorControlColorPointBX : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadColorControlColorPointBX() + : ReadAttribute("color-point-bx") { } - ~ReadOzoneConcentrationMeasurementMeasurementUnit() {} + ~ReadColorControlColorPointBX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBX response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("ColorControl ColorPointBX read Error", error); } SetCommandExitStatus(error); }]; @@ -82428,22 +59578,62 @@ class ReadOzoneConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class WriteColorControlColorPointBX : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + WriteColorControlColorPointBX() + : WriteAttribute("color-point-bx") { + AddArgument("attr-name", "color-point-bx"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit() {} + ~WriteColorControlColorPointBX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointBXWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBX write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointBX() + : SubscribeAttribute("color-point-bx") + { + } + + ~SubscribeAttributeColorControlColorPointBX() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82454,12 +59644,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeColorPointBXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"ColorControl.ColorPointBX response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82468,29 +59658,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public Su }; /* - * Attribute MeasurementMedium + * Attribute ColorPointBY */ -class ReadOzoneConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadColorControlColorPointBY : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadColorControlColorPointBY() + : ReadAttribute("color-point-by") { } - ~ReadOzoneConcentrationMeasurementMeasurementMedium() {} + ~ReadColorControlColorPointBY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBY response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("ColorControl ColorPointBY read Error", error); } SetCommandExitStatus(error); }]; @@ -82498,22 +59688,62 @@ class ReadOzoneConcentrationMeasurementMeasurementMedium : public ReadAttribute } }; -class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class WriteColorControlColorPointBY : public WriteAttribute { +public: + WriteColorControlColorPointBY() + : WriteAttribute("color-point-by") + { + AddArgument("attr-name", "color-point-by"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteColorControlColorPointBY() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003B) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointBYWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBY write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeColorControlColorPointBY() + : SubscribeAttribute("color-point-by") { } - ~SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium() {} + ~SubscribeAttributeColorControlColorPointBY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82524,12 +59754,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeColorPointBYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"ColorControl.ColorPointBY response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82538,29 +59768,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public }; /* - * Attribute LevelValue + * Attribute ColorPointBIntensity */ -class ReadOzoneConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadColorControlColorPointBIntensity : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadColorControlColorPointBIntensity() + : ReadAttribute("color-point-bintensity") { } - ~ReadOzoneConcentrationMeasurementLevelValue() {} + ~ReadColorControlColorPointBIntensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement LevelValue read Error", error); + LogNSError("ColorControl ColorPointBIntensity read Error", error); } SetCommandExitStatus(error); }]; @@ -82568,92 +59798,62 @@ class ReadOzoneConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementLevelValue : public SubscribeAttribute { +class WriteColorControlColorPointBIntensity : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + WriteColorControlColorPointBIntensity() + : WriteAttribute("color-point-bintensity") { + AddArgument("attr-name", "color-point-bintensity"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementLevelValue() {} + ~WriteColorControlColorPointBIntensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement 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 subscribeAttributeLevelValueWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + [cluster writeAttributeColorPointBIntensityWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBIntensity write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadOzoneConcentrationMeasurementGeneratedCommandList : public ReadAttribute { -public: - ReadOzoneConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadOzoneConcentrationMeasurementGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("OzoneConcentrationMeasurement GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint8_t mValue; }; -class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeColorControlColorPointBIntensity() + : SubscribeAttribute("color-point-bintensity") { } - ~SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList() {} + ~SubscribeAttributeColorControlColorPointBIntensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82664,12 +59864,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeColorPointBIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82678,29 +59878,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : publ }; /* - * Attribute AcceptedCommandList + * Attribute EnhancedCurrentHue */ -class ReadOzoneConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadColorControlEnhancedCurrentHue : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadColorControlEnhancedCurrentHue() + : ReadAttribute("enhanced-current-hue") { } - ~ReadOzoneConcentrationMeasurementAcceptedCommandList() {} + ~ReadColorControlEnhancedCurrentHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("ColorControl EnhancedCurrentHue read Error", error); } SetCommandExitStatus(error); }]; @@ -82708,22 +59908,22 @@ class ReadOzoneConcentrationMeasurementAcceptedCommandList : public ReadAttribut } }; -class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeColorControlEnhancedCurrentHue() + : SubscribeAttribute("enhanced-current-hue") { } - ~SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList() {} + ~SubscribeAttributeColorControlEnhancedCurrentHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82734,12 +59934,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEnhancedCurrentHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82748,29 +59948,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : publi }; /* - * Attribute EventList + * Attribute EnhancedColorMode */ -class ReadOzoneConcentrationMeasurementEventList : public ReadAttribute { +class ReadColorControlEnhancedColorMode : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadColorControlEnhancedColorMode() + : ReadAttribute("enhanced-color-mode") { } - ~ReadOzoneConcentrationMeasurementEventList() {} + ~ReadColorControlEnhancedColorMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement EventList read Error", error); + LogNSError("ColorControl EnhancedColorMode read Error", error); } SetCommandExitStatus(error); }]; @@ -82778,22 +59978,22 @@ class ReadOzoneConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeColorControlEnhancedColorMode() + : SubscribeAttribute("enhanced-color-mode") { } - ~SubscribeAttributeOzoneConcentrationMeasurementEventList() {} + ~SubscribeAttributeColorControlEnhancedColorMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82804,12 +60004,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementEventList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeEnhancedColorModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82818,29 +60018,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementEventList : public Subscrib }; /* - * Attribute AttributeList + * Attribute ColorLoopActive */ -class ReadOzoneConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadColorControlColorLoopActive : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadColorControlColorLoopActive() + : ReadAttribute("color-loop-active") { } - ~ReadOzoneConcentrationMeasurementAttributeList() {} + ~ReadColorControlColorLoopActive() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement AttributeList read Error", error); + LogNSError("ColorControl ColorLoopActive read Error", error); } SetCommandExitStatus(error); }]; @@ -82848,22 +60048,22 @@ class ReadOzoneConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeColorControlColorLoopActive() + : SubscribeAttribute("color-loop-active") { } - ~SubscribeAttributeOzoneConcentrationMeasurementAttributeList() {} + ~SubscribeAttributeColorControlColorLoopActive() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82874,12 +60074,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeColorLoopActiveWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82888,29 +60088,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public Subs }; /* - * Attribute FeatureMap + * Attribute ColorLoopDirection */ -class ReadOzoneConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadColorControlColorLoopDirection : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadColorControlColorLoopDirection() + : ReadAttribute("color-loop-direction") { } - ~ReadOzoneConcentrationMeasurementFeatureMap() {} + ~ReadColorControlColorLoopDirection() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement FeatureMap read Error", error); + LogNSError("ColorControl ColorLoopDirection read Error", error); } SetCommandExitStatus(error); }]; @@ -82918,22 +60118,22 @@ class ReadOzoneConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeColorControlColorLoopDirection() + : SubscribeAttribute("color-loop-direction") { } - ~SubscribeAttributeOzoneConcentrationMeasurementFeatureMap() {} + ~SubscribeAttributeColorControlColorLoopDirection() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82944,12 +60144,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeColorLoopDirectionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82958,29 +60158,29 @@ class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public Subscri }; /* - * Attribute ClusterRevision + * Attribute ColorLoopTime */ -class ReadOzoneConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadColorControlColorLoopTime : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadColorControlColorLoopTime() + : ReadAttribute("color-loop-time") { } - ~ReadOzoneConcentrationMeasurementClusterRevision() {} + ~ReadColorControlColorLoopTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); if (error != nil) { - LogNSError("OzoneConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("ColorControl ColorLoopTime read Error", error); } SetCommandExitStatus(error); }]; @@ -82988,22 +60188,22 @@ class ReadOzoneConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeColorControlColorLoopTime() + : SubscribeAttribute("color-loop-time") { } - ~SubscribeAttributeOzoneConcentrationMeasurementClusterRevision() {} + ~SubscribeAttributeColorControlColorLoopTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83014,12 +60214,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeColorLoopTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83027,57 +60227,30 @@ class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public Su } }; -/*----------------------------------------------------------------------------*\ -| Cluster Pm25ConcentrationMeasurement | 0x042A | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute ColorLoopStartEnhancedHue */ -class ReadPm25ConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadColorControlColorLoopStartEnhancedHue() + : ReadAttribute("color-loop-start-enhanced-hue") { } - ~ReadPm25ConcentrationMeasurementMeasuredValue() {} + ~ReadColorControlColorLoopStartEnhancedHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("ColorControl ColorLoopStartEnhancedHue read Error", error); } SetCommandExitStatus(error); }]; @@ -83085,22 +60258,22 @@ class ReadPm25ConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeColorControlColorLoopStartEnhancedHue() + : SubscribeAttribute("color-loop-start-enhanced-hue") { } - ~SubscribeAttributePm25ConcentrationMeasurementMeasuredValue() {} + ~SubscribeAttributeColorControlColorLoopStartEnhancedHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83111,12 +60284,12 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeColorLoopStartEnhancedHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83125,29 +60298,29 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public Subsc }; /* - * Attribute MinMeasuredValue + * Attribute ColorLoopStoredEnhancedHue */ -class ReadPm25ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadColorControlColorLoopStoredEnhancedHue() + : ReadAttribute("color-loop-stored-enhanced-hue") { } - ~ReadPm25ConcentrationMeasurementMinMeasuredValue() {} + ~ReadColorControlColorLoopStoredEnhancedHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("ColorControl ColorLoopStoredEnhancedHue read Error", error); } SetCommandExitStatus(error); }]; @@ -83155,22 +60328,22 @@ class ReadPm25ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeColorControlColorLoopStoredEnhancedHue() + : SubscribeAttribute("color-loop-stored-enhanced-hue") { } - ~SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue() {} + ~SubscribeAttributeColorControlColorLoopStoredEnhancedHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83181,12 +60354,12 @@ class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeColorLoopStoredEnhancedHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83195,29 +60368,29 @@ class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public Su }; /* - * Attribute MaxMeasuredValue + * Attribute ColorCapabilities */ -class ReadPm25ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadColorControlColorCapabilities : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadColorControlColorCapabilities() + : ReadAttribute("color-capabilities") { } - ~ReadPm25ConcentrationMeasurementMaxMeasuredValue() {} + ~ReadColorControlColorCapabilities() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("ColorControl ColorCapabilities read Error", error); } SetCommandExitStatus(error); }]; @@ -83225,22 +60398,22 @@ class ReadPm25ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeColorControlColorCapabilities() + : SubscribeAttribute("color-capabilities") { } - ~SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue() {} + ~SubscribeAttributeColorControlColorCapabilities() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83251,12 +60424,12 @@ class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeColorCapabilitiesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83265,29 +60438,29 @@ class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public Su }; /* - * Attribute PeakMeasuredValue + * Attribute ColorTempPhysicalMinMireds */ -class ReadPm25ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadColorControlColorTempPhysicalMinMireds() + : ReadAttribute("color-temp-physical-min-mireds") { } - ~ReadPm25ConcentrationMeasurementPeakMeasuredValue() {} + ~ReadColorControlColorTempPhysicalMinMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("ColorControl ColorTempPhysicalMinMireds read Error", error); } SetCommandExitStatus(error); }]; @@ -83295,22 +60468,22 @@ class ReadPm25ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeColorControlColorTempPhysicalMinMireds() + : SubscribeAttribute("color-temp-physical-min-mireds") { } - ~SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue() {} + ~SubscribeAttributeColorControlColorTempPhysicalMinMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83321,12 +60494,12 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeColorTempPhysicalMinMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83335,29 +60508,29 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public S }; /* - * Attribute PeakMeasuredValueWindow + * Attribute ColorTempPhysicalMaxMireds */ -class ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadColorControlColorTempPhysicalMaxMireds() + : ReadAttribute("color-temp-physical-max-mireds") { } - ~ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow() {} + ~ReadColorControlColorTempPhysicalMaxMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("ColorControl ColorTempPhysicalMaxMireds read Error", error); } SetCommandExitStatus(error); }]; @@ -83365,22 +60538,22 @@ class ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttri } }; -class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeColorControlColorTempPhysicalMaxMireds() + : SubscribeAttribute("color-temp-physical-max-mireds") { } - ~SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow() {} + ~SubscribeAttributeColorControlColorTempPhysicalMaxMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83391,12 +60564,12 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeColorTempPhysicalMaxMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83405,52 +60578,53 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : pu }; /* - * Attribute AverageMeasuredValue + * Attribute CoupleColorTempToLevelMinMireds */ -class ReadPm25ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadColorControlCoupleColorTempToLevelMinMireds() + : ReadAttribute("couple-color-temp-to-level-min-mireds") { } - ~ReadPm25ConcentrationMeasurementAverageMeasuredValue() {} + ~ReadColorControlCoupleColorTempToLevelMinMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { - LogNSError("PM25ConcentrationMeasurement AverageMeasuredValue read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl CoupleColorTempToLevelMinMireds read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() + : SubscribeAttribute("couple-color-temp-to-level-min-mireds") { } - ~SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue() {} + ~SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83461,12 +60635,12 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83475,29 +60649,29 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : publi }; /* - * Attribute AverageMeasuredValueWindow + * Attribute StartUpColorTemperatureMireds */ -class ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadColorControlStartUpColorTemperatureMireds() + : ReadAttribute("start-up-color-temperature-mireds") { } - ~ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow() {} + ~ReadColorControlStartUpColorTemperatureMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("ColorControl StartUpColorTemperatureMireds read Error", error); } SetCommandExitStatus(error); }]; @@ -83505,92 +60679,64 @@ class ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAt } }; -class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + WriteColorControlStartUpColorTemperatureMireds() + : WriteAttribute("start-up-color-temperature-mireds") { + AddArgument("attr-name", "start-up-color-temperature-mireds"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow() {} + ~WriteColorControlStartUpColorTemperatureMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00004010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement 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 subscribeAttributeAverageMeasuredValueWindowWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + [cluster + writeAttributeStartUpColorTemperatureMiredsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ColorControl StartUpColorTemperatureMireds write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute Uncertainty - */ -class ReadPm25ConcentrationMeasurementUncertainty : public ReadAttribute { -public: - ReadPm25ConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") - { - } - - ~ReadPm25ConcentrationMeasurementUncertainty() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000007) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { - LogNSError("PM25ConcentrationMeasurement Uncertainty read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint16_t mValue; }; -class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeColorControlStartUpColorTemperatureMireds() + : SubscribeAttribute("start-up-color-temperature-mireds") { } - ~SubscribeAttributePm25ConcentrationMeasurementUncertainty() {} + ~SubscribeAttributeColorControlStartUpColorTemperatureMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83601,12 +60747,12 @@ class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeStartUpColorTemperatureMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83615,29 +60761,29 @@ class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public Subscri }; /* - * Attribute MeasurementUnit + * Attribute GeneratedCommandList */ -class ReadPm25ConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadColorControlGeneratedCommandList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadColorControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPm25ConcentrationMeasurementMeasurementUnit() {} + ~ReadColorControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("ColorControl GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -83645,22 +60791,22 @@ class ReadPm25ConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeColorControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit() {} + ~SubscribeAttributeColorControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83671,12 +60817,12 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83685,29 +60831,29 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public Sub }; /* - * Attribute MeasurementMedium + * Attribute AcceptedCommandList */ -class ReadPm25ConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadColorControlAcceptedCommandList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadColorControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPm25ConcentrationMeasurementMeasurementMedium() {} + ~ReadColorControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("ColorControl AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -83715,22 +60861,22 @@ class ReadPm25ConcentrationMeasurementMeasurementMedium : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeColorControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium() {} + ~SubscribeAttributeColorControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83741,12 +60887,12 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83755,29 +60901,29 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public S }; /* - * Attribute LevelValue + * Attribute AttributeList */ -class ReadPm25ConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadColorControlAttributeList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadColorControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPm25ConcentrationMeasurementLevelValue() {} + ~ReadColorControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement LevelValue read Error", error); + LogNSError("ColorControl AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -83785,22 +60931,22 @@ class ReadPm25ConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeColorControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementLevelValue() {} + ~SubscribeAttributeColorControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83811,12 +60957,12 @@ class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83825,29 +60971,29 @@ class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public Subscrib }; /* - * Attribute GeneratedCommandList + * Attribute FeatureMap */ -class ReadPm25ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadColorControlFeatureMap : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadColorControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPm25ConcentrationMeasurementGeneratedCommandList() {} + ~ReadColorControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("ColorControl FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -83855,22 +61001,22 @@ class ReadPm25ConcentrationMeasurementGeneratedCommandList : public ReadAttribut } }; -class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeColorControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList() {} + ~SubscribeAttributeColorControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83881,12 +61027,12 @@ class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83895,29 +61041,29 @@ class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : publi }; /* - * Attribute AcceptedCommandList + * Attribute ClusterRevision */ -class ReadPm25ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadColorControlClusterRevision : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadColorControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPm25ConcentrationMeasurementAcceptedCommandList() {} + ~ReadColorControlClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("ColorControl ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -83925,22 +61071,22 @@ class ReadPm25ConcentrationMeasurementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeColorControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList() {} + ~SubscribeAttributeColorControlClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83951,12 +61097,12 @@ class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83964,30 +61110,60 @@ class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public } }; +/*----------------------------------------------------------------------------*\ +| Cluster BallastConfiguration | 0x0301 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhysicalMinLevel | 0x0000 | +| * PhysicalMaxLevel | 0x0001 | +| * BallastStatus | 0x0002 | +| * MinLevel | 0x0010 | +| * MaxLevel | 0x0011 | +| * IntrinsicBallastFactor | 0x0014 | +| * BallastFactorAdjustment | 0x0015 | +| * LampQuantity | 0x0020 | +| * LampType | 0x0030 | +| * LampManufacturer | 0x0031 | +| * LampRatedHours | 0x0032 | +| * LampBurnHours | 0x0033 | +| * LampAlarmMode | 0x0034 | +| * LampBurnHoursTripPoint | 0x0035 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute EventList + * Attribute PhysicalMinLevel */ -class ReadPm25ConcentrationMeasurementEventList : public ReadAttribute { +class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadBallastConfigurationPhysicalMinLevel() + : ReadAttribute("physical-min-level") { } - ~ReadPm25ConcentrationMeasurementEventList() {} + ~ReadBallastConfigurationPhysicalMinLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement EventList read Error", error); + LogNSError("BallastConfiguration PhysicalMinLevel read Error", error); } SetCommandExitStatus(error); }]; @@ -83995,22 +61171,22 @@ class ReadPm25ConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeBallastConfigurationPhysicalMinLevel() + : SubscribeAttribute("physical-min-level") { } - ~SubscribeAttributePm25ConcentrationMeasurementEventList() {} + ~SubscribeAttributeBallastConfigurationPhysicalMinLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84021,12 +61197,12 @@ class SubscribeAttributePm25ConcentrationMeasurementEventList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePhysicalMinLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84035,29 +61211,29 @@ class SubscribeAttributePm25ConcentrationMeasurementEventList : public Subscribe }; /* - * Attribute AttributeList + * Attribute PhysicalMaxLevel */ -class ReadPm25ConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadBallastConfigurationPhysicalMaxLevel() + : ReadAttribute("physical-max-level") { } - ~ReadPm25ConcentrationMeasurementAttributeList() {} + ~ReadBallastConfigurationPhysicalMaxLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement AttributeList read Error", error); + LogNSError("BallastConfiguration PhysicalMaxLevel read Error", error); } SetCommandExitStatus(error); }]; @@ -84065,22 +61241,22 @@ class ReadPm25ConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeBallastConfigurationPhysicalMaxLevel() + : SubscribeAttribute("physical-max-level") { } - ~SubscribeAttributePm25ConcentrationMeasurementAttributeList() {} + ~SubscribeAttributeBallastConfigurationPhysicalMaxLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84091,12 +61267,12 @@ class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePhysicalMaxLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84105,29 +61281,29 @@ class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public Subsc }; /* - * Attribute FeatureMap + * Attribute BallastStatus */ -class ReadPm25ConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadBallastConfigurationBallastStatus : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadBallastConfigurationBallastStatus() + : ReadAttribute("ballast-status") { } - ~ReadPm25ConcentrationMeasurementFeatureMap() {} + ~ReadBallastConfigurationBallastStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement FeatureMap read Error", error); + LogNSError("BallastConfiguration BallastStatus read Error", error); } SetCommandExitStatus(error); }]; @@ -84135,22 +61311,22 @@ class ReadPm25ConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeBallastConfigurationBallastStatus() + : SubscribeAttribute("ballast-status") { } - ~SubscribeAttributePm25ConcentrationMeasurementFeatureMap() {} + ~SubscribeAttributeBallastConfigurationBallastStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84161,12 +61337,12 @@ class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeBallastStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84175,29 +61351,29 @@ class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public Subscrib }; /* - * Attribute ClusterRevision + * Attribute MinLevel */ -class ReadPm25ConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadBallastConfigurationMinLevel : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadBallastConfigurationMinLevel() + : ReadAttribute("min-level") { } - ~ReadPm25ConcentrationMeasurementClusterRevision() {} + ~ReadBallastConfigurationMinLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); if (error != nil) { - LogNSError("PM25ConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("BallastConfiguration MinLevel read Error", error); } SetCommandExitStatus(error); }]; @@ -84205,119 +61381,62 @@ class ReadPm25ConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class WriteBallastConfigurationMinLevel : public WriteAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteBallastConfigurationMinLevel() + : WriteAttribute("min-level") { + AddArgument("attr-name", "min-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePm25ConcentrationMeasurementClusterRevision() {} + ~WriteBallastConfigurationMinLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement 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(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + [cluster writeAttributeMinLevelWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration MinLevel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster FormaldehydeConcentrationMeasurement | 0x042B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute MeasuredValue - */ -class ReadFormaldehydeConcentrationMeasurementMeasuredValue : public ReadAttribute { -public: - ReadFormaldehydeConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") - { - } - - ~ReadFormaldehydeConcentrationMeasurementMeasuredValue() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement MeasuredValue read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint8_t mValue; }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeBallastConfigurationMinLevel() + : SubscribeAttribute("min-level") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue() {} + ~SubscribeAttributeBallastConfigurationMinLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84328,12 +61447,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeMinLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84342,29 +61461,29 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : publ }; /* - * Attribute MinMeasuredValue + * Attribute MaxLevel */ -class ReadFormaldehydeConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadBallastConfigurationMaxLevel : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadBallastConfigurationMaxLevel() + : ReadAttribute("max-level") { } - ~ReadFormaldehydeConcentrationMeasurementMinMeasuredValue() {} + ~ReadBallastConfigurationMaxLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("BallastConfiguration MaxLevel read Error", error); } SetCommandExitStatus(error); }]; @@ -84372,92 +61491,62 @@ class ReadFormaldehydeConcentrationMeasurementMinMeasuredValue : public ReadAttr } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class WriteBallastConfigurationMaxLevel : public WriteAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + WriteBallastConfigurationMaxLevel() + : WriteAttribute("max-level") { + AddArgument("attr-name", "max-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue() {} + ~WriteBallastConfigurationMaxLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement 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 subscribeAttributeMinMeasuredValueWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + [cluster writeAttributeMaxLevelWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration MaxLevel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute MaxMeasuredValue - */ -class ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { -public: - ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") - { - } - ~ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement MaxMeasuredValue read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint8_t mValue; }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeBallastConfigurationMaxLevel() + : SubscribeAttribute("max-level") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue() {} + ~SubscribeAttributeBallastConfigurationMaxLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84468,12 +61557,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeMaxLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84482,29 +61571,29 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : p }; /* - * Attribute PeakMeasuredValue + * Attribute IntrinsicBallastFactor */ -class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadBallastConfigurationIntrinsicBallastFactor : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadBallastConfigurationIntrinsicBallastFactor() + : ReadAttribute("intrinsic-ballast-factor") { } - ~ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue() {} + ~ReadBallastConfigurationIntrinsicBallastFactor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeIntrinsicBallastFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("BallastConfiguration IntrinsicBallastFactor read Error", error); } SetCommandExitStatus(error); }]; @@ -84512,22 +61601,63 @@ class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue : public ReadAtt } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { +public: + WriteBallastConfigurationIntrinsicBallastFactor() + : WriteAttribute("intrinsic-ballast-factor") + { + AddArgument("attr-name", "intrinsic-ballast-factor"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteBallastConfigurationIntrinsicBallastFactor() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000014) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster + writeAttributeIntrinsicBallastFactorWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration IntrinsicBallastFactor write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() + : SubscribeAttribute("intrinsic-ballast-factor") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue() {} + ~SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84538,12 +61668,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeIntrinsicBallastFactorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84552,29 +61682,29 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : }; /* - * Attribute PeakMeasuredValueWindow + * Attribute BallastFactorAdjustment */ -class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadBallastConfigurationBallastFactorAdjustment() + : ReadAttribute("ballast-factor-adjustment") { } - ~ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() {} + ~ReadBallastConfigurationBallastFactorAdjustment() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBallastFactorAdjustmentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("BallastConfiguration BallastFactorAdjustment read Error", error); } SetCommandExitStatus(error); }]; @@ -84582,22 +61712,63 @@ class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public R } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + WriteBallastConfigurationBallastFactorAdjustment() + : WriteAttribute("ballast-factor-adjustment") { + AddArgument("attr-name", "ballast-factor-adjustment"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() {} + ~WriteBallastConfigurationBallastFactorAdjustment() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeBallastFactorAdjustmentWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "BallastConfiguration BallastFactorAdjustment write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationBallastFactorAdjustment() + : SubscribeAttribute("ballast-factor-adjustment") + { + } + + ~SubscribeAttributeBallastConfigurationBallastFactorAdjustment() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000015) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84608,12 +61779,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWin if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeBallastFactorAdjustmentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84622,29 +61793,29 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWin }; /* - * Attribute AverageMeasuredValue + * Attribute LampQuantity */ -class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadBallastConfigurationLampQuantity : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadBallastConfigurationLampQuantity() + : ReadAttribute("lamp-quantity") { } - ~ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue() {} + ~ReadBallastConfigurationLampQuantity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("BallastConfiguration LampQuantity read Error", error); } SetCommandExitStatus(error); }]; @@ -84652,22 +61823,22 @@ class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue : public Read } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeBallastConfigurationLampQuantity() + : SubscribeAttribute("lamp-quantity") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue() {} + ~SubscribeAttributeBallastConfigurationLampQuantity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84678,12 +61849,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeLampQuantityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84692,29 +61863,29 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue }; /* - * Attribute AverageMeasuredValueWindow + * Attribute LampType */ -class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadBallastConfigurationLampType : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadBallastConfigurationLampType() + : ReadAttribute("lamp-type") { } - ~ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() {} + ~ReadBallastConfigurationLampType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampType response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("BallastConfiguration LampType read Error", error); } SetCommandExitStatus(error); }]; @@ -84722,22 +61893,64 @@ class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : publi } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class WriteBallastConfigurationLampType : public WriteAttribute { +public: + WriteBallastConfigurationLampType() + : WriteAttribute("lamp-type") + { + AddArgument("attr-name", "lamp-type"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteBallastConfigurationLampType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000030) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() + length:mValue.size() + encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeLampTypeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampType write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::ByteSpan mValue; +}; + +class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeBallastConfigurationLampType() + : SubscribeAttribute("lamp-type") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() {} + ~SubscribeAttributeBallastConfigurationLampType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84748,12 +61961,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeLampTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84762,29 +61975,29 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue }; /* - * Attribute Uncertainty + * Attribute LampManufacturer */ -class ReadFormaldehydeConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadBallastConfigurationLampManufacturer : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadBallastConfigurationLampManufacturer() + : ReadAttribute("lamp-manufacturer") { } - ~ReadFormaldehydeConcentrationMeasurementUncertainty() {} + ~ReadBallastConfigurationLampManufacturer() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement Uncertainty read Error", error); + LogNSError("BallastConfiguration LampManufacturer read Error", error); } SetCommandExitStatus(error); }]; @@ -84792,22 +62005,64 @@ class ReadFormaldehydeConcentrationMeasurementUncertainty : public ReadAttribute } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public SubscribeAttribute { +class WriteBallastConfigurationLampManufacturer : public WriteAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + WriteBallastConfigurationLampManufacturer() + : WriteAttribute("lamp-manufacturer") { + AddArgument("attr-name", "lamp-manufacturer"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty() {} + ~WriteBallastConfigurationLampManufacturer() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() + length:mValue.size() + encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeLampManufacturerWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampManufacturer write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::ByteSpan mValue; +}; + +class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampManufacturer() + : SubscribeAttribute("lamp-manufacturer") + { + } + + ~SubscribeAttributeBallastConfigurationLampManufacturer() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000031) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84818,12 +62073,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeLampManufacturerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84832,29 +62087,29 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public }; /* - * Attribute MeasurementUnit + * Attribute LampRatedHours */ -class ReadFormaldehydeConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadBallastConfigurationLampRatedHours : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadBallastConfigurationLampRatedHours() + : ReadAttribute("lamp-rated-hours") { } - ~ReadFormaldehydeConcentrationMeasurementMeasurementUnit() {} + ~ReadBallastConfigurationLampRatedHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("BallastConfiguration LampRatedHours read Error", error); } SetCommandExitStatus(error); }]; @@ -84862,22 +62117,62 @@ class ReadFormaldehydeConcentrationMeasurementMeasurementUnit : public ReadAttri } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class WriteBallastConfigurationLampRatedHours : public WriteAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + WriteBallastConfigurationLampRatedHours() + : WriteAttribute("lamp-rated-hours") { + AddArgument("attr-name", "lamp-rated-hours"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit() {} + ~WriteBallastConfigurationLampRatedHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeLampRatedHoursWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampRatedHours write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampRatedHours() + : SubscribeAttribute("lamp-rated-hours") + { + } + + ~SubscribeAttributeBallastConfigurationLampRatedHours() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000032) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84888,12 +62183,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeLampRatedHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84902,29 +62197,29 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : pu }; /* - * Attribute MeasurementMedium + * Attribute LampBurnHours */ -class ReadFormaldehydeConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadBallastConfigurationLampBurnHours : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadBallastConfigurationLampBurnHours() + : ReadAttribute("lamp-burn-hours") { } - ~ReadFormaldehydeConcentrationMeasurementMeasurementMedium() {} + ~ReadBallastConfigurationLampBurnHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("BallastConfiguration LampBurnHours read Error", error); } SetCommandExitStatus(error); }]; @@ -84932,22 +62227,62 @@ class ReadFormaldehydeConcentrationMeasurementMeasurementMedium : public ReadAtt } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class WriteBallastConfigurationLampBurnHours : public WriteAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + WriteBallastConfigurationLampBurnHours() + : WriteAttribute("lamp-burn-hours") { + AddArgument("attr-name", "lamp-burn-hours"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium() {} + ~WriteBallastConfigurationLampBurnHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeLampBurnHoursWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampBurnHours write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampBurnHours() + : SubscribeAttribute("lamp-burn-hours") + { + } + + ~SubscribeAttributeBallastConfigurationLampBurnHours() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000033) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84958,12 +62293,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeLampBurnHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84972,29 +62307,29 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : }; /* - * Attribute LevelValue + * Attribute LampAlarmMode */ -class ReadFormaldehydeConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadBallastConfigurationLampAlarmMode() + : ReadAttribute("lamp-alarm-mode") { } - ~ReadFormaldehydeConcentrationMeasurementLevelValue() {} + ~ReadBallastConfigurationLampAlarmMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement LevelValue read Error", error); + LogNSError("BallastConfiguration LampAlarmMode read Error", error); } SetCommandExitStatus(error); }]; @@ -85002,22 +62337,62 @@ class ReadFormaldehydeConcentrationMeasurementLevelValue : public ReadAttribute } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public SubscribeAttribute { +class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + WriteBallastConfigurationLampAlarmMode() + : WriteAttribute("lamp-alarm-mode") { + AddArgument("attr-name", "lamp-alarm-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue() {} + ~WriteBallastConfigurationLampAlarmMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeLampAlarmModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampAlarmMode write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampAlarmMode() + : SubscribeAttribute("lamp-alarm-mode") + { + } + + ~SubscribeAttributeBallastConfigurationLampAlarmMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000034) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85028,12 +62403,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeLampAlarmModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85042,29 +62417,29 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public }; /* - * Attribute GeneratedCommandList + * Attribute LampBurnHoursTripPoint */ -class ReadFormaldehydeConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadBallastConfigurationLampBurnHoursTripPoint() + : ReadAttribute("lamp-burn-hours-trip-point") { } - ~ReadFormaldehydeConcentrationMeasurementGeneratedCommandList() {} + ~ReadBallastConfigurationLampBurnHoursTripPoint() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("BallastConfiguration LampBurnHoursTripPoint read Error", error); } SetCommandExitStatus(error); }]; @@ -85072,22 +62447,63 @@ class ReadFormaldehydeConcentrationMeasurementGeneratedCommandList : public Read } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteBallastConfigurationLampBurnHoursTripPoint() + : WriteAttribute("lamp-burn-hours-trip-point") + { + AddArgument("attr-name", "lamp-burn-hours-trip-point"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteBallastConfigurationLampBurnHoursTripPoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000035) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster + writeAttributeLampBurnHoursTripPointWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() + : SubscribeAttribute("lamp-burn-hours-trip-point") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList() {} + ~SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85098,12 +62514,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeLampBurnHoursTripPointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85112,29 +62528,29 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList }; /* - * Attribute AcceptedCommandList + * Attribute GeneratedCommandList */ -class ReadFormaldehydeConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadBallastConfigurationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadFormaldehydeConcentrationMeasurementAcceptedCommandList() {} + ~ReadBallastConfigurationGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("BallastConfiguration GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -85142,22 +62558,22 @@ class ReadFormaldehydeConcentrationMeasurementAcceptedCommandList : public ReadA } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeBallastConfigurationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList() {} + ~SubscribeAttributeBallastConfigurationGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85168,12 +62584,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85182,29 +62598,29 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList }; /* - * Attribute EventList + * Attribute AcceptedCommandList */ -class ReadFormaldehydeConcentrationMeasurementEventList : public ReadAttribute { +class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadBallastConfigurationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadFormaldehydeConcentrationMeasurementEventList() {} + ~ReadBallastConfigurationAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement EventList read Error", error); + LogNSError("BallastConfiguration AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -85212,22 +62628,22 @@ class ReadFormaldehydeConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeBallastConfigurationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementEventList() {} + ~SubscribeAttributeBallastConfigurationAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85238,12 +62654,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); + NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85254,27 +62670,27 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public S /* * Attribute AttributeList */ -class ReadFormaldehydeConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadBallastConfigurationAttributeList : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementAttributeList() + ReadBallastConfigurationAttributeList() : ReadAttribute("attribute-list") { } - ~ReadFormaldehydeConcentrationMeasurementAttributeList() {} + ~ReadBallastConfigurationAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement AttributeList read Error", error); + LogNSError("BallastConfiguration AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -85282,22 +62698,22 @@ class ReadFormaldehydeConcentrationMeasurementAttributeList : public ReadAttribu } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList() + SubscribeAttributeBallastConfigurationAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList() {} + ~SubscribeAttributeBallastConfigurationAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85313,7 +62729,7 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : publ mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85324,27 +62740,27 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : publ /* * Attribute FeatureMap */ -class ReadFormaldehydeConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadBallastConfigurationFeatureMap : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementFeatureMap() + ReadBallastConfigurationFeatureMap() : ReadAttribute("feature-map") { } - ~ReadFormaldehydeConcentrationMeasurementFeatureMap() {} + ~ReadBallastConfigurationFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement FeatureMap read Error", error); + LogNSError("BallastConfiguration FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -85352,22 +62768,22 @@ class ReadFormaldehydeConcentrationMeasurementFeatureMap : public ReadAttribute } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap() + SubscribeAttributeBallastConfigurationFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap() {} + ~SubscribeAttributeBallastConfigurationFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85383,7 +62799,7 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85394,27 +62810,27 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public /* * Attribute ClusterRevision */ -class ReadFormaldehydeConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadBallastConfigurationClusterRevision : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementClusterRevision() + ReadBallastConfigurationClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadFormaldehydeConcentrationMeasurementClusterRevision() {} + ~ReadBallastConfigurationClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("FormaldehydeConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("BallastConfiguration ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -85422,22 +62838,22 @@ class ReadFormaldehydeConcentrationMeasurementClusterRevision : public ReadAttri } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision() + SubscribeAttributeBallastConfigurationClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision() {} + ~SubscribeAttributeBallastConfigurationClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85453,7 +62869,7 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : pu mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85462,7 +62878,7 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : pu }; /*----------------------------------------------------------------------------*\ -| Cluster Pm1ConcentrationMeasurement | 0x042C | +| Cluster IlluminanceMeasurement | 0x0400 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| @@ -85470,14 +62886,8 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : pu | * MeasuredValue | 0x0000 | | * MinMeasuredValue | 0x0001 | | * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | +| * Tolerance | 0x0003 | +| * LightSensorType | 0x0004 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -85491,27 +62901,27 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : pu /* * Attribute MeasuredValue */ -class ReadPm1ConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMeasuredValue() + ReadIlluminanceMeasurementMeasuredValue() : ReadAttribute("measured-value") { } - ~ReadPm1ConcentrationMeasurementMeasuredValue() {} + ~ReadIlluminanceMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("IlluminanceMeasurement MeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -85519,22 +62929,22 @@ class ReadPm1ConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMeasuredValue() + SubscribeAttributeIlluminanceMeasurementMeasuredValue() : SubscribeAttribute("measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementMeasuredValue() {} + ~SubscribeAttributeIlluminanceMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85550,7 +62960,7 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public Subscr mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85561,27 +62971,27 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public Subscr /* * Attribute MinMeasuredValue */ -class ReadPm1ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMinMeasuredValue() + ReadIlluminanceMeasurementMinMeasuredValue() : ReadAttribute("min-measured-value") { } - ~ReadPm1ConcentrationMeasurementMinMeasuredValue() {} + ~ReadIlluminanceMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("IlluminanceMeasurement MinMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -85589,22 +62999,22 @@ class ReadPm1ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue() + SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue() {} + ~SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85620,7 +63030,7 @@ class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public Sub mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85631,27 +63041,27 @@ class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public Sub /* * Attribute MaxMeasuredValue */ -class ReadPm1ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMaxMeasuredValue() + ReadIlluminanceMeasurementMaxMeasuredValue() : ReadAttribute("max-measured-value") { } - ~ReadPm1ConcentrationMeasurementMaxMeasuredValue() {} + ~ReadIlluminanceMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("IlluminanceMeasurement MaxMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -85659,22 +63069,22 @@ class ReadPm1ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue() + SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue() {} + ~SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85690,7 +63100,7 @@ class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public Sub mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85699,29 +63109,29 @@ class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public Sub }; /* - * Attribute PeakMeasuredValue + * Attribute Tolerance */ -class ReadPm1ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadIlluminanceMeasurementTolerance : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadIlluminanceMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadPm1ConcentrationMeasurementPeakMeasuredValue() {} + ~ReadIlluminanceMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("IlluminanceMeasurement Tolerance read Error", error); } SetCommandExitStatus(error); }]; @@ -85729,22 +63139,22 @@ class ReadPm1ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeIlluminanceMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue() {} + ~SubscribeAttributeIlluminanceMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85755,12 +63165,12 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85769,29 +63179,29 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public Su }; /* - * Attribute PeakMeasuredValueWindow + * Attribute LightSensorType */ -class ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadIlluminanceMeasurementLightSensorType() + : ReadAttribute("light-sensor-type") { } - ~ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow() {} + ~ReadIlluminanceMeasurementLightSensorType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("IlluminanceMeasurement LightSensorType read Error", error); } SetCommandExitStatus(error); }]; @@ -85799,22 +63209,22 @@ class ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttrib } }; -class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementLightSensorType : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeIlluminanceMeasurementLightSensorType() + : SubscribeAttribute("light-sensor-type") { } - ~SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow() {} + ~SubscribeAttributeIlluminanceMeasurementLightSensorType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85825,12 +63235,12 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeLightSensorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85839,29 +63249,29 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : pub }; /* - * Attribute AverageMeasuredValue + * Attribute GeneratedCommandList */ -class ReadPm1ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadIlluminanceMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPm1ConcentrationMeasurementAverageMeasuredValue() {} + ~ReadIlluminanceMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("IlluminanceMeasurement GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -85869,22 +63279,22 @@ class ReadPm1ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute } }; -class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue() {} + ~SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85895,12 +63305,12 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85909,29 +63319,29 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public }; /* - * Attribute AverageMeasuredValueWindow + * Attribute AcceptedCommandList */ -class ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadIlluminanceMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow() {} + ~ReadIlluminanceMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("IlluminanceMeasurement AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -85939,22 +63349,22 @@ class ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAtt } }; -class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow() {} + ~SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85965,12 +63375,12 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85979,29 +63389,29 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : }; /* - * Attribute Uncertainty + * Attribute AttributeList */ -class ReadPm1ConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadIlluminanceMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPm1ConcentrationMeasurementUncertainty() {} + ~ReadIlluminanceMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement Uncertainty read Error", error); + LogNSError("IlluminanceMeasurement AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -86009,22 +63419,22 @@ class ReadPm1ConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeIlluminanceMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementUncertainty() {} + ~SubscribeAttributeIlluminanceMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86035,12 +63445,12 @@ class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86049,29 +63459,29 @@ class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public Subscrib }; /* - * Attribute MeasurementUnit + * Attribute FeatureMap */ -class ReadPm1ConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadIlluminanceMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPm1ConcentrationMeasurementMeasurementUnit() {} + ~ReadIlluminanceMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("IlluminanceMeasurement FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -86079,22 +63489,22 @@ class ReadPm1ConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeIlluminanceMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit() {} + ~SubscribeAttributeIlluminanceMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86105,12 +63515,12 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86119,29 +63529,29 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public Subs }; /* - * Attribute MeasurementMedium + * Attribute ClusterRevision */ -class ReadPm1ConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadIlluminanceMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPm1ConcentrationMeasurementMeasurementMedium() {} + ~ReadIlluminanceMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("IlluminanceMeasurement ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -86149,22 +63559,22 @@ class ReadPm1ConcentrationMeasurementMeasurementMedium : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeIlluminanceMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium() {} + ~SubscribeAttributeIlluminanceMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86175,12 +63585,12 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86188,100 +63598,50 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public Su } }; -/* - * Attribute LevelValue - */ -class ReadPm1ConcentrationMeasurementLevelValue : public ReadAttribute { -public: - ReadPm1ConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") - { - } - - ~ReadPm1ConcentrationMeasurementLevelValue() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000000A) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { - LogNSError("PM1ConcentrationMeasurement LevelValue read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePm1ConcentrationMeasurementLevelValue : public SubscribeAttribute { -public: - SubscribeAttributePm1ConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") - { - } - - ~SubscribeAttributePm1ConcentrationMeasurementLevelValue() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000000A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement 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 subscribeAttributeLevelValueWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; +/*----------------------------------------------------------------------------*\ +| Cluster TemperatureMeasurement | 0x0402 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute GeneratedCommandList + * Attribute MeasuredValue */ -class ReadPm1ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTemperatureMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadPm1ConcentrationMeasurementGeneratedCommandList() {} + ~ReadTemperatureMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("TemperatureMeasurement MeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -86289,22 +63649,22 @@ class ReadPm1ConcentrationMeasurementGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTemperatureMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList() {} + ~SubscribeAttributeTemperatureMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86315,12 +63675,12 @@ class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86329,29 +63689,29 @@ class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public }; /* - * Attribute AcceptedCommandList + * Attribute MinMeasuredValue */ -class ReadPm1ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadTemperatureMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadPm1ConcentrationMeasurementAcceptedCommandList() {} + ~ReadTemperatureMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("TemperatureMeasurement MinMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -86359,22 +63719,22 @@ class ReadPm1ConcentrationMeasurementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeTemperatureMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList() {} + ~SubscribeAttributeTemperatureMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86385,12 +63745,12 @@ class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86399,29 +63759,29 @@ class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public }; /* - * Attribute EventList + * Attribute MaxMeasuredValue */ -class ReadPm1ConcentrationMeasurementEventList : public ReadAttribute { +class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadTemperatureMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadPm1ConcentrationMeasurementEventList() {} + ~ReadTemperatureMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement EventList read Error", error); + LogNSError("TemperatureMeasurement MaxMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -86429,22 +63789,22 @@ class ReadPm1ConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementEventList() {} + ~SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86455,12 +63815,12 @@ class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86469,29 +63829,29 @@ class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeA }; /* - * Attribute AttributeList + * Attribute Tolerance */ -class ReadPm1ConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadTemperatureMeasurementTolerance : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadTemperatureMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadPm1ConcentrationMeasurementAttributeList() {} + ~ReadTemperatureMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement AttributeList read Error", error); + LogNSError("TemperatureMeasurement Tolerance read Error", error); } SetCommandExitStatus(error); }]; @@ -86499,22 +63859,22 @@ class ReadPm1ConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeTemperatureMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributePm1ConcentrationMeasurementAttributeList() {} + ~SubscribeAttributeTemperatureMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86525,12 +63885,12 @@ class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86539,29 +63899,29 @@ class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public Subscr }; /* - * Attribute FeatureMap + * Attribute GeneratedCommandList */ -class ReadPm1ConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadTemperatureMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPm1ConcentrationMeasurementFeatureMap() {} + ~ReadTemperatureMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement FeatureMap read Error", error); + LogNSError("TemperatureMeasurement GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -86569,22 +63929,22 @@ class ReadPm1ConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeTemperatureMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementFeatureMap() {} + ~SubscribeAttributeTemperatureMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86595,12 +63955,12 @@ class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86609,29 +63969,29 @@ class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public Subscribe }; /* - * Attribute ClusterRevision + * Attribute AcceptedCommandList */ -class ReadPm1ConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadTemperatureMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPm1ConcentrationMeasurementClusterRevision() {} + ~ReadTemperatureMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("PM1ConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("TemperatureMeasurement AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -86639,22 +63999,22 @@ class ReadPm1ConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeTemperatureMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementClusterRevision() {} + ~SubscribeAttributeTemperatureMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86665,12 +64025,12 @@ class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86678,57 +64038,30 @@ class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public Subs } }; -/*----------------------------------------------------------------------------*\ -| Cluster Pm10ConcentrationMeasurement | 0x042D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute AttributeList */ -class ReadPm10ConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadTemperatureMeasurementAttributeList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadTemperatureMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPm10ConcentrationMeasurementMeasuredValue() {} + ~ReadTemperatureMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("TemperatureMeasurement AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -86736,22 +64069,22 @@ class ReadPm10ConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeTemperatureMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementMeasuredValue() {} + ~SubscribeAttributeTemperatureMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86762,12 +64095,12 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86776,29 +64109,29 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public Subsc }; /* - * Attribute MinMeasuredValue + * Attribute FeatureMap */ -class ReadPm10ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadTemperatureMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPm10ConcentrationMeasurementMinMeasuredValue() {} + ~ReadTemperatureMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("TemperatureMeasurement FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -86806,22 +64139,22 @@ class ReadPm10ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeTemperatureMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue() {} + ~SubscribeAttributeTemperatureMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86832,12 +64165,12 @@ class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86846,29 +64179,29 @@ class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public Su }; /* - * Attribute MaxMeasuredValue + * Attribute ClusterRevision */ -class ReadPm10ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadTemperatureMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPm10ConcentrationMeasurementMaxMeasuredValue() {} + ~ReadTemperatureMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("TemperatureMeasurement ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -86876,22 +64209,22 @@ class ReadPm10ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeTemperatureMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue() {} + ~SubscribeAttributeTemperatureMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86902,12 +64235,12 @@ class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86915,30 +64248,55 @@ class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public Su } }; +/*----------------------------------------------------------------------------*\ +| Cluster PressureMeasurement | 0x0403 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * ScaledValue | 0x0010 | +| * MinScaledValue | 0x0011 | +| * MaxScaledValue | 0x0012 | +| * ScaledTolerance | 0x0013 | +| * Scale | 0x0014 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute PeakMeasuredValue + * Attribute MeasuredValue */ -class ReadPm10ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadPressureMeasurementMeasuredValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadPressureMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadPm10ConcentrationMeasurementPeakMeasuredValue() {} + ~ReadPressureMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("PressureMeasurement MeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -86946,22 +64304,22 @@ class ReadPm10ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributePressureMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue() {} + ~SubscribeAttributePressureMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86972,12 +64330,12 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86986,29 +64344,29 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public S }; /* - * Attribute PeakMeasuredValueWindow + * Attribute MinMeasuredValue */ -class ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadPressureMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow() {} + ~ReadPressureMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("PressureMeasurement MinMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -87016,22 +64374,22 @@ class ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttri } }; -class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributePressureMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow() {} + ~SubscribeAttributePressureMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87042,12 +64400,12 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87056,29 +64414,29 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : pu }; /* - * Attribute AverageMeasuredValue + * Attribute MaxMeasuredValue */ -class ReadPm10ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadPressureMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadPm10ConcentrationMeasurementAverageMeasuredValue() {} + ~ReadPressureMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("PressureMeasurement MaxMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -87086,22 +64444,22 @@ class ReadPm10ConcentrationMeasurementAverageMeasuredValue : public ReadAttribut } }; -class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributePressureMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue() {} + ~SubscribeAttributePressureMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87112,12 +64470,12 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87126,29 +64484,29 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : publi }; /* - * Attribute AverageMeasuredValueWindow + * Attribute Tolerance */ -class ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadPressureMeasurementTolerance : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadPressureMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow() {} + ~ReadPressureMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("PressureMeasurement Tolerance read Error", error); } SetCommandExitStatus(error); }]; @@ -87156,22 +64514,22 @@ class ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAt } }; -class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributePressureMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow() {} + ~SubscribeAttributePressureMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87182,12 +64540,12 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87196,29 +64554,29 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : }; /* - * Attribute Uncertainty + * Attribute ScaledValue */ -class ReadPm10ConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadPressureMeasurementScaledValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadPressureMeasurementScaledValue() + : ReadAttribute("scaled-value") { } - ~ReadPm10ConcentrationMeasurementUncertainty() {} + ~ReadPressureMeasurementScaledValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement Uncertainty read Error", error); + LogNSError("PressureMeasurement ScaledValue read Error", error); } SetCommandExitStatus(error); }]; @@ -87226,22 +64584,22 @@ class ReadPm10ConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributePressureMeasurementScaledValue() + : SubscribeAttribute("scaled-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementUncertainty() {} + ~SubscribeAttributePressureMeasurementScaledValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87252,12 +64610,12 @@ class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87266,29 +64624,29 @@ class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public Subscri }; /* - * Attribute MeasurementUnit + * Attribute MinScaledValue */ -class ReadPm10ConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadPressureMeasurementMinScaledValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadPressureMeasurementMinScaledValue() + : ReadAttribute("min-scaled-value") { } - ~ReadPm10ConcentrationMeasurementMeasurementUnit() {} + ~ReadPressureMeasurementMinScaledValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("PressureMeasurement MinScaledValue read Error", error); } SetCommandExitStatus(error); }]; @@ -87296,22 +64654,22 @@ class ReadPm10ConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributePressureMeasurementMinScaledValue() + : SubscribeAttribute("min-scaled-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit() {} + ~SubscribeAttributePressureMeasurementMinScaledValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87322,12 +64680,12 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeMinScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87336,29 +64694,29 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public Sub }; /* - * Attribute MeasurementMedium + * Attribute MaxScaledValue */ -class ReadPm10ConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadPressureMeasurementMaxScaledValue() + : ReadAttribute("max-scaled-value") { } - ~ReadPm10ConcentrationMeasurementMeasurementMedium() {} + ~ReadPressureMeasurementMaxScaledValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("PressureMeasurement MaxScaledValue read Error", error); } SetCommandExitStatus(error); }]; @@ -87366,22 +64724,22 @@ class ReadPm10ConcentrationMeasurementMeasurementMedium : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributePressureMeasurementMaxScaledValue() + : SubscribeAttribute("max-scaled-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium() {} + ~SubscribeAttributePressureMeasurementMaxScaledValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87392,12 +64750,12 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeMaxScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87406,29 +64764,29 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public S }; /* - * Attribute LevelValue + * Attribute ScaledTolerance */ -class ReadPm10ConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadPressureMeasurementScaledTolerance : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadPressureMeasurementScaledTolerance() + : ReadAttribute("scaled-tolerance") { } - ~ReadPm10ConcentrationMeasurementLevelValue() {} + ~ReadPressureMeasurementScaledTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement LevelValue read Error", error); + LogNSError("PressureMeasurement ScaledTolerance read Error", error); } SetCommandExitStatus(error); }]; @@ -87436,22 +64794,22 @@ class ReadPm10ConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributePressureMeasurementScaledTolerance() + : SubscribeAttribute("scaled-tolerance") { } - ~SubscribeAttributePm10ConcentrationMeasurementLevelValue() {} + ~SubscribeAttributePressureMeasurementScaledTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87462,12 +64820,12 @@ class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeScaledToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87476,29 +64834,29 @@ class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public Subscrib }; /* - * Attribute GeneratedCommandList + * Attribute Scale */ -class ReadPm10ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadPressureMeasurementScale : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPressureMeasurementScale() + : ReadAttribute("scale") { } - ~ReadPm10ConcentrationMeasurementGeneratedCommandList() {} + ~ReadPressureMeasurementScale() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Scale response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("PressureMeasurement Scale read Error", error); } SetCommandExitStatus(error); }]; @@ -87506,22 +64864,22 @@ class ReadPm10ConcentrationMeasurementGeneratedCommandList : public ReadAttribut } }; -class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePressureMeasurementScale() + : SubscribeAttribute("scale") { } - ~SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList() {} + ~SubscribeAttributePressureMeasurementScale() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87532,12 +64890,12 @@ class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeScaleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Scale response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87546,29 +64904,29 @@ class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : publi }; /* - * Attribute AcceptedCommandList + * Attribute GeneratedCommandList */ -class ReadPm10ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPressureMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPm10ConcentrationMeasurementAcceptedCommandList() {} + ~ReadPressureMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("PressureMeasurement GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -87576,22 +64934,22 @@ class ReadPm10ConcentrationMeasurementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePressureMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList() {} + ~SubscribeAttributePressureMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87602,12 +64960,12 @@ class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87616,29 +64974,29 @@ class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public }; /* - * Attribute EventList + * Attribute AcceptedCommandList */ -class ReadPm10ConcentrationMeasurementEventList : public ReadAttribute { +class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadPressureMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPm10ConcentrationMeasurementEventList() {} + ~ReadPressureMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement EventList read Error", error); + LogNSError("PressureMeasurement AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -87646,22 +65004,22 @@ class ReadPm10ConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePressureMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementEventList() {} + ~SubscribeAttributePressureMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87672,12 +65030,12 @@ class SubscribeAttributePm10ConcentrationMeasurementEventList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); + NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87688,27 +65046,27 @@ class SubscribeAttributePm10ConcentrationMeasurementEventList : public Subscribe /* * Attribute AttributeList */ -class ReadPm10ConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadPressureMeasurementAttributeList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementAttributeList() + ReadPressureMeasurementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadPm10ConcentrationMeasurementAttributeList() {} + ~ReadPressureMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement AttributeList read Error", error); + LogNSError("PressureMeasurement AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -87716,22 +65074,22 @@ class ReadPm10ConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementAttributeList() + SubscribeAttributePressureMeasurementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementAttributeList() {} + ~SubscribeAttributePressureMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87747,7 +65105,7 @@ class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public Subsc mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87758,27 +65116,27 @@ class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public Subsc /* * Attribute FeatureMap */ -class ReadPm10ConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadPressureMeasurementFeatureMap : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementFeatureMap() + ReadPressureMeasurementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadPm10ConcentrationMeasurementFeatureMap() {} + ~ReadPressureMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement FeatureMap read Error", error); + LogNSError("PressureMeasurement FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -87786,22 +65144,22 @@ class ReadPm10ConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementFeatureMap() + SubscribeAttributePressureMeasurementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePm10ConcentrationMeasurementFeatureMap() {} + ~SubscribeAttributePressureMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87817,7 +65175,7 @@ class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public Subscrib mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87828,27 +65186,27 @@ class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public Subscrib /* * Attribute ClusterRevision */ -class ReadPm10ConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadPressureMeasurementClusterRevision : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementClusterRevision() + ReadPressureMeasurementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadPm10ConcentrationMeasurementClusterRevision() {} + ~ReadPressureMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("PM10ConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("PressureMeasurement ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -87856,22 +65214,22 @@ class ReadPm10ConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementClusterRevision() + SubscribeAttributePressureMeasurementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePm10ConcentrationMeasurementClusterRevision() {} + ~SubscribeAttributePressureMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87887,7 +65245,7 @@ class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public Sub mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87896,7 +65254,7 @@ class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public Sub }; /*----------------------------------------------------------------------------*\ -| Cluster TotalVolatileOrganicCompoundsConcentrationMeasurement | 0x042E | +| Cluster FlowMeasurement | 0x0404 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| @@ -87904,14 +65262,7 @@ class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public Sub | * MeasuredValue | 0x0000 | | * MinMeasuredValue | 0x0001 | | * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | +| * Tolerance | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -87925,28 +65276,27 @@ class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public Sub /* * Attribute MeasuredValue */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementMeasuredValue : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() + ReadFlowMeasurementMeasuredValue() : ReadAttribute("measured-value") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() {} + ~ReadFlowMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("FlowMeasurement MeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -87954,23 +65304,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : p } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() + SubscribeAttributeFlowMeasurementMeasuredValue() : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() {} + ~SubscribeAttributeFlowMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87986,7 +65335,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -87997,28 +65346,27 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea /* * Attribute MinMeasuredValue */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() + ReadFlowMeasurementMinMeasuredValue() : ReadAttribute("min-measured-value") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() {} + ~ReadFlowMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("FlowMeasurement MinMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -88026,23 +65374,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() + SubscribeAttributeFlowMeasurementMinMeasuredValue() : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() {} + ~SubscribeAttributeFlowMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88058,7 +65405,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMin mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -88069,28 +65416,27 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMin /* * Attribute MaxMeasuredValue */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() + ReadFlowMeasurementMaxMeasuredValue() : ReadAttribute("max-measured-value") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() {} + ~ReadFlowMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("FlowMeasurement MaxMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -88098,23 +65444,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() + SubscribeAttributeFlowMeasurementMaxMeasuredValue() : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() {} + ~SubscribeAttributeFlowMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88130,7 +65475,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMax mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -88139,30 +65484,29 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMax }; /* - * Attribute PeakMeasuredValue + * Attribute Tolerance */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementTolerance : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadFlowMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() {} + ~ReadFlowMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("FlowMeasurement Tolerance read Error", error); } SetCommandExitStatus(error); }]; @@ -88170,23 +65514,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeFlowMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() {} + ~SubscribeAttributeFlowMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88197,12 +65540,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); SetCommandExitStatus(error); }]; @@ -88211,31 +65554,29 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea }; /* - * Attribute PeakMeasuredValueWindow + * Attribute GeneratedCommandList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadFlowMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() {} + ~ReadFlowMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog( - @"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("FlowMeasurement GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -88243,23 +65584,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeFlowMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() {} + ~SubscribeAttributeFlowMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88270,13 +65610,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", - [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -88285,30 +65624,29 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea }; /* - * Attribute AverageMeasuredValue + * Attribute AcceptedCommandList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadFlowMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() {} + ~ReadFlowMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("FlowMeasurement AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -88316,23 +65654,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVa } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeFlowMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() {} + ~SubscribeAttributeFlowMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88343,13 +65680,82 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog( - @"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AttributeList + */ +class ReadFlowMeasurementAttributeList : public ReadAttribute { +public: + ReadFlowMeasurementAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadFlowMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); + if (error != nil) { + LogNSError("FlowMeasurement AttributeList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeFlowMeasurementAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeFlowMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement 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(@"FlowMeasurement.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -88358,31 +65764,29 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve }; /* - * Attribute AverageMeasuredValueWindow + * Attribute FeatureMap */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadFlowMeasurementFeatureMap : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadFlowMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() {} + ~ReadFlowMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", - [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("FlowMeasurement FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -88390,24 +65794,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVa } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow - : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeFlowMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() {} + ~SubscribeAttributeFlowMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88418,13 +65820,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", - [value description]); + NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -88433,30 +65834,29 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve }; /* - * Attribute Uncertainty + * Attribute ClusterRevision */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadFlowMeasurementClusterRevision : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadFlowMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() {} + ~ReadFlowMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement Uncertainty read Error", error); + LogNSError("FlowMeasurement ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -88464,23 +65864,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : pub } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeFlowMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() {} + ~SubscribeAttributeFlowMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88491,12 +65890,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUnc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -88504,31 +65903,50 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUnc } }; +/*----------------------------------------------------------------------------*\ +| Cluster RelativeHumidityMeasurement | 0x0405 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute MeasurementUnit + * Attribute MeasuredValue */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadRelativeHumidityMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() {} + ~ReadRelativeHumidityMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("RelativeHumidityMeasurement MeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -88536,23 +65954,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() {} + ~SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88563,12 +65980,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -88577,30 +65994,29 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea }; /* - * Attribute MeasurementMedium + * Attribute MinMeasuredValue */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadRelativeHumidityMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() {} + ~ReadRelativeHumidityMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("RelativeHumidityMeasurement MinMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -88608,23 +66024,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() {} + ~SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88635,12 +66050,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -88649,30 +66064,29 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea }; /* - * Attribute LevelValue + * Attribute MaxMeasuredValue */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadRelativeHumidityMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() {} + ~ReadRelativeHumidityMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement LevelValue read Error", error); + LogNSError("RelativeHumidityMeasurement MaxMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -88680,23 +66094,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : publ } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() {} + ~SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88707,12 +66120,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLev if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -88721,30 +66134,29 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLev }; /* - * Attribute GeneratedCommandList + * Attribute Tolerance */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadRelativeHumidityMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() {} + ~ReadRelativeHumidityMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("RelativeHumidityMeasurement Tolerance read Error", error); } SetCommandExitStatus(error); }]; @@ -88752,23 +66164,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandL } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeRelativeHumidityMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() {} + ~SubscribeAttributeRelativeHumidityMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88779,13 +66190,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGen if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog( - @"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); SetCommandExitStatus(error); }]; @@ -88794,30 +66204,29 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGen }; /* - * Attribute AcceptedCommandList + * Attribute GeneratedCommandList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadRelativeHumidityMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() {} + ~ReadRelativeHumidityMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("RelativeHumidityMeasurement GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -88825,23 +66234,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandLi } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() {} + ~SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88852,13 +66260,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog( - @"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -88867,30 +66274,29 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcc }; /* - * Attribute EventList + * Attribute AcceptedCommandList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : public ReadAttribute { +class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadRelativeHumidityMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() {} + ~ReadRelativeHumidityMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement EventList read Error", error); + LogNSError("RelativeHumidityMeasurement AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -88898,23 +66304,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : publi } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() {} + ~SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88925,12 +66330,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEve if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -88941,28 +66346,27 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEve /* * Attribute AttributeList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + ReadRelativeHumidityMeasurementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() {} + ~ReadRelativeHumidityMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AttributeList read Error", error); + LogNSError("RelativeHumidityMeasurement AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -88970,23 +66374,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : p } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + SubscribeAttributeRelativeHumidityMeasurementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() {} + ~SubscribeAttributeRelativeHumidityMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89002,7 +66405,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAtt mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89013,28 +66416,27 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAtt /* * Attribute FeatureMap */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + ReadRelativeHumidityMeasurementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() {} + ~ReadRelativeHumidityMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement FeatureMap read Error", error); + LogNSError("RelativeHumidityMeasurement FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -89042,23 +66444,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : publ } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + SubscribeAttributeRelativeHumidityMeasurementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() {} + ~SubscribeAttributeRelativeHumidityMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89074,7 +66475,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFea mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89085,28 +66486,27 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFea /* * Attribute ClusterRevision */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + ReadRelativeHumidityMeasurementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() {} + ~ReadRelativeHumidityMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("RelativeHumidityMeasurement ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -89114,23 +66514,22 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + SubscribeAttributeRelativeHumidityMeasurementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() {} + ~SubscribeAttributeRelativeHumidityMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89146,7 +66545,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClu mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89155,22 +66554,23 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClu }; /*----------------------------------------------------------------------------*\ -| Cluster RadonConcentrationMeasurement | 0x042F | +| Cluster OccupancySensing | 0x0406 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | +| * Occupancy | 0x0000 | +| * OccupancySensorType | 0x0001 | +| * OccupancySensorTypeBitmap | 0x0002 | +| * PIROccupiedToUnoccupiedDelay | 0x0010 | +| * PIRUnoccupiedToOccupiedDelay | 0x0011 | +| * PIRUnoccupiedToOccupiedThreshold | 0x0012 | +| * UltrasonicOccupiedToUnoccupiedDelay | 0x0020 | +| * UltrasonicUnoccupiedToOccupiedDelay | 0x0021 | +| * UltrasonicUnoccupiedToOccupiedThreshold | 0x0022 | +| * PhysicalContactOccupiedToUnoccupiedDelay | 0x0030 | +| * PhysicalContactUnoccupiedToOccupiedDelay | 0x0031 | +| * PhysicalContactUnoccupiedToOccupiedThreshold | 0x0032 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -89182,29 +66582,29 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClu \*----------------------------------------------------------------------------*/ /* - * Attribute MeasuredValue + * Attribute Occupancy */ -class ReadRadonConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadOccupancySensingOccupancy : public ReadAttribute { public: - ReadRadonConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadOccupancySensingOccupancy() + : ReadAttribute("occupancy") { } - ~ReadRadonConcentrationMeasurementMeasuredValue() {} + ~ReadOccupancySensingOccupancy() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.Occupancy response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("OccupancySensing Occupancy read Error", error); } SetCommandExitStatus(error); }]; @@ -89212,22 +66612,22 @@ class ReadRadonConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeOccupancySensingOccupancy() + : SubscribeAttribute("occupancy") { } - ~SubscribeAttributeRadonConcentrationMeasurementMeasuredValue() {} + ~SubscribeAttributeOccupancySensingOccupancy() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89238,12 +66638,12 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasuredValue : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeOccupancyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.Occupancy response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89252,29 +66652,29 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasuredValue : public Subs }; /* - * Attribute MinMeasuredValue + * Attribute OccupancySensorType */ -class ReadRadonConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadOccupancySensingOccupancySensorType : public ReadAttribute { public: - ReadRadonConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadOccupancySensingOccupancySensorType() + : ReadAttribute("occupancy-sensor-type") { } - ~ReadRadonConcentrationMeasurementMinMeasuredValue() {} + ~ReadOccupancySensingOccupancySensorType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("OccupancySensing OccupancySensorType read Error", error); } SetCommandExitStatus(error); }]; @@ -89282,22 +66682,22 @@ class ReadRadonConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeOccupancySensingOccupancySensorType() + : SubscribeAttribute("occupancy-sensor-type") { } - ~SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue() {} + ~SubscribeAttributeOccupancySensingOccupancySensorType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89308,12 +66708,12 @@ class SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeOccupancySensorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89322,29 +66722,29 @@ class SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue : public S }; /* - * Attribute MaxMeasuredValue + * Attribute OccupancySensorTypeBitmap */ -class ReadRadonConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { public: - ReadRadonConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadOccupancySensingOccupancySensorTypeBitmap() + : ReadAttribute("occupancy-sensor-type-bitmap") { } - ~ReadRadonConcentrationMeasurementMaxMeasuredValue() {} + ~ReadOccupancySensingOccupancySensorTypeBitmap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("OccupancySensing OccupancySensorTypeBitmap read Error", error); } SetCommandExitStatus(error); }]; @@ -89352,22 +66752,22 @@ class ReadRadonConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() + : SubscribeAttribute("occupancy-sensor-type-bitmap") { } - ~SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue() {} + ~SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89378,12 +66778,12 @@ class SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeOccupancySensorTypeBitmapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89392,29 +66792,29 @@ class SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue : public S }; /* - * Attribute PeakMeasuredValue + * Attribute PIROccupiedToUnoccupiedDelay */ -class ReadRadonConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadOccupancySensingPIROccupiedToUnoccupiedDelay : public ReadAttribute { public: - ReadRadonConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadOccupancySensingPIROccupiedToUnoccupiedDelay() + : ReadAttribute("piroccupied-to-unoccupied-delay") { } - ~ReadRadonConcentrationMeasurementPeakMeasuredValue() {} + ~ReadOccupancySensingPIROccupiedToUnoccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -89422,22 +66822,64 @@ class ReadRadonConcentrationMeasurementPeakMeasuredValue : public ReadAttribute } }; -class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class WriteOccupancySensingPIROccupiedToUnoccupiedDelay : public WriteAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + WriteOccupancySensingPIROccupiedToUnoccupiedDelay() + : WriteAttribute("piroccupied-to-unoccupied-delay") { + AddArgument("attr-name", "piroccupied-to-unoccupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue() {} + ~WriteOccupancySensingPIROccupiedToUnoccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributePIROccupiedToUnoccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() + : SubscribeAttribute("piroccupied-to-unoccupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000010) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89448,12 +66890,12 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89462,29 +66904,29 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue : public }; /* - * Attribute PeakMeasuredValueWindow + * Attribute PIRUnoccupiedToOccupiedDelay */ -class ReadRadonConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadOccupancySensingPIRUnoccupiedToOccupiedDelay : public ReadAttribute { public: - ReadRadonConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() + : ReadAttribute("pirunoccupied-to-occupied-delay") { } - ~ReadRadonConcentrationMeasurementPeakMeasuredValueWindow() {} + ~ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -89492,22 +66934,64 @@ class ReadRadonConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttr } }; -class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class WriteOccupancySensingPIRUnoccupiedToOccupiedDelay : public WriteAttribute { +public: + WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() + : WriteAttribute("pirunoccupied-to-occupied-delay") + { + AddArgument("attr-name", "pirunoccupied-to-occupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000011) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() + : SubscribeAttribute("pirunoccupied-to-occupied-delay") { } - ~SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow() {} + ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89518,12 +67002,12 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89532,52 +67016,95 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : p }; /* - * Attribute AverageMeasuredValue + * Attribute PIRUnoccupiedToOccupiedThreshold */ -class ReadRadonConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold : public ReadAttribute { public: - ReadRadonConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() + : ReadAttribute("pirunoccupied-to-occupied-threshold") { } - ~ReadRadonConcentrationMeasurementAverageMeasuredValue() {} + ~ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { - LogNSError("RadonConcentrationMeasurement AverageMeasuredValue read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); + if (error != nil) { + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold : public WriteAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() + : WriteAttribute("pirunoccupied-to-occupied-threshold") { + AddArgument("attr-name", "pirunoccupied-to-occupied-threshold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue() {} + ~WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " + "PIRUnoccupiedToOccupiedThreshold write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() + : SubscribeAttribute("pirunoccupied-to-occupied-threshold") + { + } + + ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000012) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89588,12 +67115,12 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89602,29 +67129,30 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : publ }; /* - * Attribute AverageMeasuredValueWindow + * Attribute UltrasonicOccupiedToUnoccupiedDelay */ -class ReadRadonConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttribute { public: - ReadRadonConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + : ReadAttribute("ultrasonic-occupied-to-unoccupied-delay") { } - ~ReadRadonConcentrationMeasurementAverageMeasuredValueWindow() {} + ~ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -89632,22 +67160,65 @@ class ReadRadonConcentrationMeasurementAverageMeasuredValueWindow : public ReadA } }; -class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + : WriteAttribute("ultrasonic-occupied-to-unoccupied-delay") { + AddArgument("attr-name", "ultrasonic-occupied-to-unoccupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow() {} + ~WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " + "UltrasonicOccupiedToUnoccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + : SubscribeAttribute("ultrasonic-occupied-to-unoccupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000020) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89658,12 +67229,12 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89672,29 +67243,30 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow }; /* - * Attribute Uncertainty + * Attribute UltrasonicUnoccupiedToOccupiedDelay */ -class ReadRadonConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttribute { public: - ReadRadonConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + : ReadAttribute("ultrasonic-unoccupied-to-occupied-delay") { } - ~ReadRadonConcentrationMeasurementUncertainty() {} + ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement Uncertainty read Error", error); + LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -89702,22 +67274,65 @@ class ReadRadonConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public SubscribeAttribute { +class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + : WriteAttribute("ultrasonic-unoccupied-to-occupied-delay") { + AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRadonConcentrationMeasurementUncertainty() {} + ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " + "UltrasonicUnoccupiedToOccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000021) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89728,12 +67343,12 @@ class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89742,29 +67357,30 @@ class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public Subscr }; /* - * Attribute MeasurementUnit + * Attribute UltrasonicUnoccupiedToOccupiedThreshold */ -class ReadRadonConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadAttribute { public: - ReadRadonConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + : ReadAttribute("ultrasonic-unoccupied-to-occupied-threshold") { } - ~ReadRadonConcentrationMeasurementMeasurementUnit() {} + ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold read Error", error); } SetCommandExitStatus(error); }]; @@ -89772,22 +67388,66 @@ class ReadRadonConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public WriteAttribute { +public: + WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + : WriteAttribute("ultrasonic-unoccupied-to-occupied-threshold") + { + AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-threshold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000022) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster + writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing " + "UltrasonicUnoccupiedToOccupiedThreshold write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-threshold") { } - ~SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit() {} + ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89798,12 +67458,12 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89812,29 +67472,30 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public Su }; /* - * Attribute MeasurementMedium + * Attribute PhysicalContactOccupiedToUnoccupiedDelay */ -class ReadRadonConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public ReadAttribute { public: - ReadRadonConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + : ReadAttribute("physical-contact-occupied-to-unoccupied-delay") { } - ~ReadRadonConcentrationMeasurementMeasurementMedium() {} + ~ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -89842,22 +67503,66 @@ class ReadRadonConcentrationMeasurementMeasurementMedium : public ReadAttribute } }; -class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public WriteAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + : WriteAttribute("physical-contact-occupied-to-unoccupied-delay") { + AddArgument("attr-name", "physical-contact-occupied-to-unoccupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium() {} + ~WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing " + "PhysicalContactOccupiedToUnoccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + : SubscribeAttribute("physical-contact-occupied-to-unoccupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000030) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89868,12 +67573,12 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89882,29 +67587,30 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public }; /* - * Attribute LevelValue + * Attribute PhysicalContactUnoccupiedToOccupiedDelay */ -class ReadRadonConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public ReadAttribute { public: - ReadRadonConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + : ReadAttribute("physical-contact-unoccupied-to-occupied-delay") { } - ~ReadRadonConcentrationMeasurementLevelValue() {} + ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement LevelValue read Error", error); + LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -89912,22 +67618,66 @@ class ReadRadonConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public SubscribeAttribute { +class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public WriteAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + : WriteAttribute("physical-contact-unoccupied-to-occupied-delay") { + AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRadonConcentrationMeasurementLevelValue() {} + ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing " + "PhysicalContactUnoccupiedToOccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + : SubscribeAttribute("physical-contact-unoccupied-to-occupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000031) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89938,12 +67688,12 @@ class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -89952,29 +67702,30 @@ class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public Subscri }; /* - * Attribute GeneratedCommandList + * Attribute PhysicalContactUnoccupiedToOccupiedThreshold */ -class ReadRadonConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public ReadAttribute { public: - ReadRadonConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + : ReadAttribute("physical-contact-unoccupied-to-occupied-threshold") { } - ~ReadRadonConcentrationMeasurementGeneratedCommandList() {} + ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold read Error", error); } SetCommandExitStatus(error); }]; @@ -89982,22 +67733,65 @@ class ReadRadonConcentrationMeasurementGeneratedCommandList : public ReadAttribu } }; -class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public WriteAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + : WriteAttribute("physical-contact-unoccupied-to-occupied-threshold") { + AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-threshold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList() {} + ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " + "PhysicalContactUnoccupiedToOccupiedTh" + "reshold write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + : SubscribeAttribute("physical-contact-unoccupied-to-occupied-threshold") + { + } + + ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000032) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90008,12 +67802,12 @@ class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); SetCommandExitStatus(error); }]; @@ -90022,29 +67816,29 @@ class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : publ }; /* - * Attribute AcceptedCommandList + * Attribute GeneratedCommandList */ -class ReadRadonConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOccupancySensingGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadRadonConcentrationMeasurementAcceptedCommandList() {} + ~ReadOccupancySensingGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("OccupancySensing GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -90052,22 +67846,22 @@ class ReadRadonConcentrationMeasurementAcceptedCommandList : public ReadAttribut } }; -class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOccupancySensingGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList() {} + ~SubscribeAttributeOccupancySensingGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90078,12 +67872,12 @@ class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -90092,29 +67886,29 @@ class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : publi }; /* - * Attribute EventList + * Attribute AcceptedCommandList */ -class ReadRadonConcentrationMeasurementEventList : public ReadAttribute { +class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadOccupancySensingAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadRadonConcentrationMeasurementEventList() {} + ~ReadOccupancySensingAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement EventList read Error", error); + LogNSError("OccupancySensing AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -90122,22 +67916,22 @@ class ReadRadonConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeOccupancySensingAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementEventList() {} + ~SubscribeAttributeOccupancySensingAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90148,12 +67942,12 @@ class SubscribeAttributeRadonConcentrationMeasurementEventList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); + NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -90164,27 +67958,27 @@ class SubscribeAttributeRadonConcentrationMeasurementEventList : public Subscrib /* * Attribute AttributeList */ -class ReadRadonConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadOccupancySensingAttributeList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementAttributeList() + ReadOccupancySensingAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRadonConcentrationMeasurementAttributeList() {} + ~ReadOccupancySensingAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"OccupancySensing.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement AttributeList read Error", error); + LogNSError("OccupancySensing AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -90192,22 +67986,22 @@ class ReadRadonConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementAttributeList() + SubscribeAttributeOccupancySensingAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementAttributeList() {} + ~SubscribeAttributeOccupancySensingAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90223,7 +68017,7 @@ class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public Subs mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"OccupancySensing.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -90234,27 +68028,27 @@ class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public Subs /* * Attribute FeatureMap */ -class ReadRadonConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadOccupancySensingFeatureMap : public ReadAttribute { public: - ReadRadonConcentrationMeasurementFeatureMap() + ReadOccupancySensingFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRadonConcentrationMeasurementFeatureMap() {} + ~ReadOccupancySensingFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement FeatureMap read Error", error); + LogNSError("OccupancySensing FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -90262,22 +68056,22 @@ class ReadRadonConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementFeatureMap() + SubscribeAttributeOccupancySensingFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRadonConcentrationMeasurementFeatureMap() {} + ~SubscribeAttributeOccupancySensingFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90293,7 +68087,7 @@ class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public Subscri mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -90304,27 +68098,27 @@ class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public Subscri /* * Attribute ClusterRevision */ -class ReadRadonConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadOccupancySensingClusterRevision : public ReadAttribute { public: - ReadRadonConcentrationMeasurementClusterRevision() + ReadOccupancySensingClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRadonConcentrationMeasurementClusterRevision() {} + ~ReadOccupancySensingClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("RadonConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("OccupancySensing ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -90332,22 +68126,22 @@ class ReadRadonConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementClusterRevision() + SubscribeAttributeOccupancySensingClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRadonConcentrationMeasurementClusterRevision() {} + ~SubscribeAttributeOccupancySensingClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90363,7 +68157,7 @@ class SubscribeAttributeRadonConcentrationMeasurementClusterRevision : public Su mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -90598,76 +68392,6 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute } }; -/* - * Attribute EventList - */ -class ReadWakeOnLanEventList : public ReadAttribute { -public: - ReadWakeOnLanEventList() - : ReadAttribute("event-list") - { - } - - ~ReadWakeOnLanEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.EventList response %@", [value description]); - if (error != nil) { - LogNSError("WakeOnLAN EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWakeOnLanEventList : public SubscribeAttribute { -public: - SubscribeAttributeWakeOnLanEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeWakeOnLanEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -91370,72 +69094,6 @@ class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { } }; -/* - * Attribute EventList - */ -class ReadChannelEventList : public ReadAttribute { -public: - ReadChannelEventList() - : ReadAttribute("event-list") - { - } - - ~ReadChannelEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.EventList response %@", [value description]); - if (error != nil) { - LogNSError("Channel EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeChannelEventList : public SubscribeAttribute { -public: - SubscribeAttributeChannelEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeChannelEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel 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(@"Channel.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -91989,76 +69647,6 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAtt } }; -/* - * Attribute EventList - */ -class ReadTargetNavigatorEventList : public ReadAttribute { -public: - ReadTargetNavigatorEventList() - : ReadAttribute("event-list") - { - } - - ~ReadTargetNavigatorEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.EventList response %@", [value description]); - if (error != nil) { - LogNSError("TargetNavigator EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTargetNavigatorEventList : public SubscribeAttribute { -public: - SubscribeAttributeTargetNavigatorEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeTargetNavigatorEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -93434,76 +71022,6 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttri } }; -/* - * Attribute EventList - */ -class ReadMediaPlaybackEventList : public ReadAttribute { -public: - ReadMediaPlaybackEventList() - : ReadAttribute("event-list") - { - } - - ~ReadMediaPlaybackEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.EventList response %@", [value description]); - if (error != nil) { - LogNSError("MediaPlayback EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeMediaPlaybackEventList : public SubscribeAttribute { -public: - SubscribeAttributeMediaPlaybackEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeMediaPlaybackEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -94198,76 +71716,6 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribut } }; -/* - * Attribute EventList - */ -class ReadMediaInputEventList : public ReadAttribute { -public: - ReadMediaInputEventList() - : ReadAttribute("event-list") - { - } - - ~ReadMediaInputEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.EventList response %@", [value description]); - if (error != nil) { - LogNSError("MediaInput EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeMediaInputEventList : public SubscribeAttribute { -public: - SubscribeAttributeMediaInputEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeMediaInputEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -94668,72 +72116,6 @@ class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute } }; -/* - * Attribute EventList - */ -class ReadLowPowerEventList : public ReadAttribute { -public: - ReadLowPowerEventList() - : ReadAttribute("event-list") - { - } - - ~ReadLowPowerEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.EventList response %@", [value description]); - if (error != nil) { - LogNSError("LowPower EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeLowPowerEventList : public SubscribeAttribute { -public: - SubscribeAttributeLowPowerEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeLowPowerEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -95136,76 +72518,6 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribu } }; -/* - * Attribute EventList - */ -class ReadKeypadInputEventList : public ReadAttribute { -public: - ReadKeypadInputEventList() - : ReadAttribute("event-list") - { - } - - ~ReadKeypadInputEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.EventList response %@", [value description]); - if (error != nil) { - LogNSError("KeypadInput EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeKeypadInputEventList : public SubscribeAttribute { -public: - SubscribeAttributeKeypadInputEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeKeypadInputEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput 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(@"KeypadInput.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -96086,76 +73398,6 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAtt } }; -/* - * Attribute EventList - */ -class ReadContentLauncherEventList : public ReadAttribute { -public: - ReadContentLauncherEventList() - : ReadAttribute("event-list") - { - } - - ~ReadContentLauncherEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.EventList response %@", [value description]); - if (error != nil) { - LogNSError("ContentLauncher EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeContentLauncherEventList : public SubscribeAttribute { -public: - SubscribeAttributeContentLauncherEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeContentLauncherEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -96762,76 +74004,6 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribu } }; -/* - * Attribute EventList - */ -class ReadAudioOutputEventList : public ReadAttribute { -public: - ReadAudioOutputEventList() - : ReadAttribute("event-list") - { - } - - ~ReadAudioOutputEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.EventList response %@", [value description]); - if (error != nil) { - LogNSError("AudioOutput EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeAudioOutputEventList : public SubscribeAttribute { -public: - SubscribeAttributeAudioOutputEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeAudioOutputEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput 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(@"AudioOutput.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -97586,76 +74758,6 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public Subscrib } }; -/* - * Attribute EventList - */ -class ReadApplicationLauncherEventList : public ReadAttribute { -public: - ReadApplicationLauncherEventList() - : ReadAttribute("event-list") - { - } - - ~ReadApplicationLauncherEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.EventList response %@", [value description]); - if (error != nil) { - LogNSError("ApplicationLauncher EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeApplicationLauncherEventList : public SubscribeAttribute { -public: - SubscribeAttributeApplicationLauncherEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeApplicationLauncherEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher 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(@"ApplicationLauncher.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -98591,76 +75693,6 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAt } }; -/* - * Attribute EventList - */ -class ReadApplicationBasicEventList : public ReadAttribute { -public: - ReadApplicationBasicEventList() - : ReadAttribute("event-list") - { - } - - ~ReadApplicationBasicEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.EventList response %@", [value description]); - if (error != nil) { - LogNSError("ApplicationBasic EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeApplicationBasicEventList : public SubscribeAttribute { -public: - SubscribeAttributeApplicationBasicEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeApplicationBasicEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -99175,76 +76207,6 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttrib } }; -/* - * Attribute EventList - */ -class ReadAccountLoginEventList : public ReadAttribute { -public: - ReadAccountLoginEventList() - : ReadAttribute("event-list") - { - } - - ~ReadAccountLoginEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.EventList response %@", [value description]); - if (error != nil) { - LogNSError("AccountLogin EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeAccountLoginEventList : public SubscribeAttribute { -public: - SubscribeAttributeAccountLoginEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeAccountLoginEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin 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(@"AccountLogin.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -109145,76 +86107,6 @@ class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public Subscr } }; -/* - * Attribute EventList - */ -class ReadElectricalMeasurementEventList : public ReadAttribute { -public: - ReadElectricalMeasurementEventList() - : ReadAttribute("event-list") - { - } - - ~ReadElectricalMeasurementEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.EventList response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeElectricalMeasurementEventList : public SubscribeAttribute { -public: - SubscribeAttributeElectricalMeasurementEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeElectricalMeasurementEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - 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(@"ElectricalMeasurement.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -120595,76 +97487,6 @@ class SubscribeAttributeUnitTestingAcceptedCommandList : public SubscribeAttribu } }; -/* - * Attribute EventList - */ -class ReadUnitTestingEventList : public ReadAttribute { -public: - ReadUnitTestingEventList() - : ReadAttribute("event-list") - { - } - - ~ReadUnitTestingEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitTesting.EventList response %@", [value description]); - if (error != nil) { - LogNSError("UnitTesting EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeUnitTestingEventList : public SubscribeAttribute { -public: - SubscribeAttributeUnitTestingEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeUnitTestingEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitTesting.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute AttributeList */ @@ -120900,8 +97722,6 @@ void registerClusterIdentify(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -120935,8 +97755,6 @@ void registerClusterGroups(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -120980,16 +97798,10 @@ void registerClusterScenes(Commands & commands) 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(), // @@ -121034,8 +97846,6 @@ void registerClusterOnOff(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121066,8 +97876,6 @@ void registerClusterOnOffSwitchConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121137,8 +97945,6 @@ void registerClusterLevelControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121188,8 +97994,6 @@ void registerClusterBinaryInputBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121223,8 +98027,6 @@ void registerClusterDescriptor(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121253,8 +98055,6 @@ void registerClusterBinding(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121292,8 +98092,6 @@ void registerClusterAccessControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121339,8 +98137,6 @@ void registerClusterActions(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121413,8 +98209,6 @@ void registerClusterBasicInformation(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121445,8 +98239,6 @@ void registerClusterOtaSoftwareUpdateProvider(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121482,8 +98274,6 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121516,8 +98306,6 @@ void registerClusterLocalizationConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121551,8 +98339,6 @@ void registerClusterTimeFormatLocalization(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121581,8 +98367,6 @@ void registerClusterUnitLocalization(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121610,8 +98394,6 @@ void registerClusterPowerSourceConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121699,8 +98481,6 @@ void registerClusterPowerSource(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121742,8 +98522,6 @@ void registerClusterGeneralCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121792,8 +98570,6 @@ void registerClusterNetworkCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121820,8 +98596,6 @@ void registerClusterDiagnosticLogs(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121866,8 +98640,6 @@ void registerClusterGeneralDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -121904,8 +98676,6 @@ void registerClusterSoftwareDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -122060,8 +98830,6 @@ void registerClusterThreadNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -122116,8 +98884,6 @@ void registerClusterWiFiNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -122164,8 +98930,6 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -122224,8 +98988,6 @@ void registerClusterBridgedDeviceBasicInformation(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -122259,8 +99021,6 @@ void registerClusterSwitch(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -122297,8 +99057,6 @@ void registerClusterAdministratorCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -122344,8 +99102,6 @@ void registerClusterOperationalCredentials(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -122384,8 +99140,6 @@ void registerClusterGroupKeyManagement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -122413,8 +99167,6 @@ void registerClusterFixedLabel(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -122443,8 +99195,6 @@ void registerClusterUserLabel(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -122472,8 +99222,6 @@ void registerClusterBooleanState(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -122516,8 +99264,6 @@ void registerClusterModeSelect(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -122528,284 +99274,6 @@ void registerClusterModeSelect(Commands & commands) commands.Register(clusterName, clusterCommands); } -void registerClusterTemperatureControl(Commands & commands) -{ - using namespace chip::app::Clusters::TemperatureControl; - - const char * clusterName = "TemperatureControl"; - - commands_list clusterCommands = { - make_unique(Id), // - make_unique(), // - make_unique(Id), // - make_unique(), // - make_unique(Id), // - make_unique(Id), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - }; - - commands.Register(clusterName, clusterCommands); -} -void registerClusterRefrigeratorAlarm(Commands & commands) -{ - using namespace chip::app::Clusters::RefrigeratorAlarm; - - const char * clusterName = "RefrigeratorAlarm"; - - 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(Id), // - make_unique(Id), // - }; - - commands.Register(clusterName, clusterCommands); -} -void registerClusterAirQuality(Commands & commands) -{ - using namespace chip::app::Clusters::AirQuality; - - const char * clusterName = "AirQuality"; - - 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(), // - }; - - commands.Register(clusterName, clusterCommands); -} -void registerClusterSmokeCoAlarm(Commands & commands) -{ - using namespace chip::app::Clusters::SmokeCoAlarm; - - const char * clusterName = "SmokeCoAlarm"; - - commands_list clusterCommands = { - make_unique(Id), // - make_unique(), // - make_unique(Id), // - make_unique(), // - make_unique(Id), // - make_unique(Id), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(Id), // - make_unique(Id), // - }; - - commands.Register(clusterName, clusterCommands); -} -void registerClusterOperationalState(Commands & commands) -{ - using namespace chip::app::Clusters::OperationalState; - - const char * clusterName = "OperationalState"; - - commands_list clusterCommands = { - make_unique(Id), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(Id), // - make_unique(), // - make_unique(Id), // - make_unique(Id), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(Id), // - make_unique(Id), // - }; - - commands.Register(clusterName, clusterCommands); -} -void registerClusterHepaFilterMonitoring(Commands & commands) -{ - using namespace chip::app::Clusters::HepaFilterMonitoring; - - const char * clusterName = "HepaFilterMonitoring"; - - commands_list clusterCommands = { - make_unique(Id), // - make_unique(), // - make_unique(Id), // - make_unique(), // - make_unique(Id), // - make_unique(Id), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - }; - - commands.Register(clusterName, clusterCommands); -} -void registerClusterActivatedCarbonFilterMonitoring(Commands & commands) -{ - using namespace chip::app::Clusters::ActivatedCarbonFilterMonitoring; - - const char * clusterName = "ActivatedCarbonFilterMonitoring"; - - commands_list clusterCommands = { - make_unique(Id), // - make_unique(), // - make_unique(Id), // - make_unique(), // - make_unique(Id), // - make_unique(Id), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - }; - - commands.Register(clusterName, clusterCommands); -} void registerClusterDoorLock(Commands & commands) { using namespace chip::app::Clusters::DoorLock; @@ -122832,7 +99300,6 @@ void registerClusterDoorLock(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // make_unique(Id), // make_unique(), // make_unique(Id), // @@ -122930,8 +99397,6 @@ void registerClusterDoorLock(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123011,8 +99476,6 @@ void registerClusterWindowCovering(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123066,8 +99529,6 @@ void registerClusterBarrierControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123143,8 +99604,6 @@ void registerClusterPumpConfigurationAndControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123301,8 +99760,6 @@ void registerClusterThermostat(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123321,7 +99778,6 @@ void registerClusterFanControl(Commands & commands) commands_list clusterCommands = { make_unique(Id), // - make_unique(), // make_unique(Id), // make_unique(), // make_unique(Id), // @@ -123353,15 +99809,10 @@ void registerClusterFanControl(Commands & commands) 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(), // @@ -123396,8 +99847,6 @@ void registerClusterThermostatUserInterfaceConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123559,8 +100008,6 @@ void registerClusterColorControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123624,8 +100071,6 @@ void registerClusterBallastConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123661,8 +100106,6 @@ void registerClusterIlluminanceMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123696,8 +100139,6 @@ void registerClusterTemperatureMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123741,8 +100182,6 @@ void registerClusterPressureMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123776,8 +100215,6 @@ void registerClusterFlowMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123811,8 +100248,6 @@ void registerClusterRelativeHumidityMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123871,8 +100306,6 @@ void registerClusterOccupancySensing(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -123883,496 +100316,6 @@ void registerClusterOccupancySensing(Commands & commands) commands.Register(clusterName, clusterCommands); } -void registerClusterCarbonMonoxideConcentrationMeasurement(Commands & commands) -{ - using namespace chip::app::Clusters::CarbonMonoxideConcentrationMeasurement; - - const char * clusterName = "CarbonMonoxideConcentrationMeasurement"; - - 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(), // - 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 registerClusterCarbonDioxideConcentrationMeasurement(Commands & commands) -{ - using namespace chip::app::Clusters::CarbonDioxideConcentrationMeasurement; - - const char * clusterName = "CarbonDioxideConcentrationMeasurement"; - - 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(), // - 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 registerClusterNitrogenDioxideConcentrationMeasurement(Commands & commands) -{ - using namespace chip::app::Clusters::NitrogenDioxideConcentrationMeasurement; - - const char * clusterName = "NitrogenDioxideConcentrationMeasurement"; - - 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(), // - 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 registerClusterOzoneConcentrationMeasurement(Commands & commands) -{ - using namespace chip::app::Clusters::OzoneConcentrationMeasurement; - - const char * clusterName = "OzoneConcentrationMeasurement"; - - 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(), // - 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 registerClusterPm25ConcentrationMeasurement(Commands & commands) -{ - using namespace chip::app::Clusters::Pm25ConcentrationMeasurement; - - const char * clusterName = "Pm25ConcentrationMeasurement"; - - 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(), // - 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 registerClusterFormaldehydeConcentrationMeasurement(Commands & commands) -{ - using namespace chip::app::Clusters::FormaldehydeConcentrationMeasurement; - - const char * clusterName = "FormaldehydeConcentrationMeasurement"; - - 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(), // - 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 registerClusterPm1ConcentrationMeasurement(Commands & commands) -{ - using namespace chip::app::Clusters::Pm1ConcentrationMeasurement; - - const char * clusterName = "Pm1ConcentrationMeasurement"; - - 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(), // - 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 registerClusterPm10ConcentrationMeasurement(Commands & commands) -{ - using namespace chip::app::Clusters::Pm10ConcentrationMeasurement; - - const char * clusterName = "Pm10ConcentrationMeasurement"; - - 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(), // - 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 registerClusterTotalVolatileOrganicCompoundsConcentrationMeasurement(Commands & commands) -{ - using namespace chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement; - - const char * clusterName = "TotalVolatileOrganicCompoundsConcentrationMeasurement"; - - 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(), // - 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 registerClusterRadonConcentrationMeasurement(Commands & commands) -{ - using namespace chip::app::Clusters::RadonConcentrationMeasurement; - - const char * clusterName = "RadonConcentrationMeasurement"; - - 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(), // - 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 registerClusterWakeOnLan(Commands & commands) { using namespace chip::app::Clusters::WakeOnLan; @@ -124390,8 +100333,6 @@ void registerClusterWakeOnLan(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -124426,8 +100367,6 @@ void registerClusterChannel(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -124458,8 +100397,6 @@ void registerClusterTargetNavigator(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -124510,8 +100447,6 @@ void registerClusterMediaPlayback(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -124545,8 +100480,6 @@ void registerClusterMediaInput(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -124573,8 +100506,6 @@ void registerClusterLowPower(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -124601,8 +100532,6 @@ void registerClusterKeypadInput(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -124635,8 +100564,6 @@ void registerClusterContentLauncher(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -124668,8 +100595,6 @@ void registerClusterAudioOutput(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -124703,8 +100628,6 @@ void registerClusterApplicationLauncher(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -124746,8 +100669,6 @@ void registerClusterApplicationBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -124776,8 +100697,6 @@ void registerClusterAccountLogin(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -125069,8 +100988,6 @@ void registerClusterElectricalMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -125364,8 +101281,6 @@ void registerClusterUnitTesting(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -125435,13 +101350,6 @@ void registerClusters(Commands & commands) registerClusterUserLabel(commands); registerClusterBooleanState(commands); registerClusterModeSelect(commands); - registerClusterTemperatureControl(commands); - registerClusterRefrigeratorAlarm(commands); - registerClusterAirQuality(commands); - registerClusterSmokeCoAlarm(commands); - registerClusterOperationalState(commands); - registerClusterHepaFilterMonitoring(commands); - registerClusterActivatedCarbonFilterMonitoring(commands); registerClusterDoorLock(commands); registerClusterWindowCovering(commands); registerClusterBarrierControl(commands); @@ -125457,16 +101365,6 @@ void registerClusters(Commands & commands) registerClusterFlowMeasurement(commands); registerClusterRelativeHumidityMeasurement(commands); registerClusterOccupancySensing(commands); - registerClusterCarbonMonoxideConcentrationMeasurement(commands); - registerClusterCarbonDioxideConcentrationMeasurement(commands); - registerClusterNitrogenDioxideConcentrationMeasurement(commands); - registerClusterOzoneConcentrationMeasurement(commands); - registerClusterPm25ConcentrationMeasurement(commands); - registerClusterFormaldehydeConcentrationMeasurement(commands); - registerClusterPm1ConcentrationMeasurement(commands); - registerClusterPm10ConcentrationMeasurement(commands); - registerClusterTotalVolatileOrganicCompoundsConcentrationMeasurement(commands); - registerClusterRadonConcentrationMeasurement(commands); registerClusterWakeOnLan(commands); registerClusterChannel(commands); registerClusterTargetNavigator(commands); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 88a07202867a62..dff6c7bd3e7c71 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -43,8 +43,6 @@ class TestList : public Command { printf("Test_TC_ACL_2_3\n"); printf("Test_TC_ACE_1_1\n"); printf("Test_TC_ACE_1_5\n"); - printf("Test_TC_AIRQUAL_1_1\n"); - printf("Test_TC_AIRQUAL_2_1\n"); printf("Test_TC_BOOL_1_1\n"); printf("Test_TC_BOOL_2_1\n"); printf("Test_TC_BRBINFO_1_1\n"); @@ -67,26 +65,6 @@ class TestList : public Command { printf("Test_TC_CC_7_4\n"); printf("TestColorControl_9_1\n"); printf("TestColorControl_9_2\n"); - printf("Test_TC_CDOCONC_1_1\n"); - printf("Test_TC_CDOCONC_2_1\n"); - printf("Test_TC_CMOCONC_1_1\n"); - printf("Test_TC_CMOCONC_2_1\n"); - printf("Test_TC_FLDCONC_1_1\n"); - printf("Test_TC_FLDCONC_2_1\n"); - printf("Test_TC_NDOCONC_1_1\n"); - printf("Test_TC_NDOCONC_2_1\n"); - printf("Test_TC_OZCONC_1_1\n"); - printf("Test_TC_OZCONC_2_1\n"); - printf("Test_TC_PMHCONC_1_1\n"); - printf("Test_TC_PMHCONC_2_1\n"); - printf("Test_TC_PMICONC_1_1\n"); - printf("Test_TC_PMICONC_2_1\n"); - printf("Test_TC_PMKCONC_1_1\n"); - printf("Test_TC_PMKCONC_2_1\n"); - printf("Test_TC_RNCONC_1_1\n"); - printf("Test_TC_RNCONC_2_1\n"); - printf("Test_TC_TVOCCONC_1_1\n"); - printf("Test_TC_TVOCCONC_2_1\n"); printf("Test_TC_OPCREDS_1_2\n"); printf("Test_TC_BINFO_1_1\n"); printf("Test_TC_CNET_1_3\n"); @@ -103,7 +81,6 @@ class TestList : public Command { printf("Test_TC_FAN_2_2\n"); printf("Test_TC_FAN_2_3\n"); printf("Test_TC_FAN_2_4\n"); - printf("Test_TC_FAN_2_5\n"); printf("Test_TC_FAN_3_1\n"); printf("Test_TC_FAN_3_2\n"); printf("Test_TC_FAN_3_4\n"); @@ -272,14 +249,9 @@ class TestList : public Command { printf("Test_TC_DRLK_2_7\n"); printf("Test_TC_DRLK_2_8\n"); printf("Test_TC_DRLK_2_11\n"); - printf("Test_TC_DRLK_2_12\n"); printf("TestGroupsCluster\n"); printf("TestGroupKeyManagementCluster\n"); printf("Test_TC_G_1_1\n"); - printf("Test_TC_ACFREMON_1_1\n"); - printf("Test_TC_ACFREMON_2_1\n"); - printf("Test_TC_HEPAFREMON_1_1\n"); - printf("Test_TC_HEPAFREMON_2_1\n"); return CHIP_NO_ERROR; } @@ -2550,8 +2522,8 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestThReadsEventListAttributeFromDut_6(); - break; + NextTest(); + return; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values in " @@ -2771,28 +2743,6 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsEventListAttributeFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR TestThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() { @@ -6439,11 +6389,11 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { } }; -class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { +class Test_TC_BOOL_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_AIRQUAL_1_1() - : TestCommandBridge("Test_TC_AIRQUAL_1_1") + Test_TC_BOOL_1_1() + : TestCommandBridge("Test_TC_BOOL_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -6453,7 +6403,7 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_AIRQUAL_1_1() {} + ~Test_TC_BOOL_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -6461,11 +6411,11 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_AIRQUAL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_BOOL_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_AIRQUAL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BOOL_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -6482,68 +6432,41 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("!AIRQUAL.S.F00 && !AIRQUAL.S.F01 && !AIRQUAL.S.F02 && !AIRQUAL.S.F03")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given AIRQUAL.S.F00(Fair) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("AIRQUAL.S.F00")) { - NextTest(); - return; - } - err = TestGivenAIRQUALSF00FairEnsureFeaturemapHasTheCorrectBitSet_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Given AIRQUAL.S.F01(Moderate) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("AIRQUAL.S.F01")) { - NextTest(); - return; - } - err = TestGivenAIRQUALSF01ModerateEnsureFeaturemapHasTheCorrectBitSet_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : Given AIRQUAL.S.F02(VeryPoor) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("AIRQUAL.S.F02")) { - NextTest(); - return; - } - err = TestGivenAIRQUALSF02VeryPoorEnsureFeaturemapHasTheCorrectBitSet_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Given AIRQUAL.S.F03(ExtremelyPoor) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("AIRQUAL.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: EventList\n"); + if (ShouldSkip("BOOL.S.E00")) { NextTest(); return; } - err = TestGivenAIRQUALSF03ExtremelyPoorEnsureFeaturemapHasTheCorrectBitSet_6(); - break; + NextTest(); + return; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads EventList attribute from DUT\n"); - err = TestThReadsEventListAttributeFromDut_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: EventList\n"); + if (ShouldSkip(" !BOOL.S.E00 ")) { + NextTest(); + return; + } + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -6579,15 +6502,6 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -6601,7 +6515,7 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -6620,11 +6534,11 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6644,7 +6558,7 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -6664,87 +6578,11 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenAIRQUALSF00FairEnsureFeaturemapHasTheCorrectBitSet_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given AIRQUAL.S.F00(Fair) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenAIRQUALSF01ModerateEnsureFeaturemapHasTheCorrectBitSet_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given AIRQUAL.S.F01(Moderate) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenAIRQUALSF02VeryPoorEnsureFeaturemapHasTheCorrectBitSet_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given AIRQUAL.S.F02(VeryPoor) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenAIRQUALSF03ExtremelyPoorEnsureFeaturemapHasTheCorrectBitSet_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given AIRQUAL.S.F03(ExtremelyPoor) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_7() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -6767,11 +6605,11 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_8() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -6779,6 +6617,11 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -6786,11 +6629,11 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_9() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -6809,37 +6652,13 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestThReadsEventListAttributeFromDut_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } }; -class Test_TC_AIRQUAL_2_1 : public TestCommandBridge { +class Test_TC_BOOL_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_AIRQUAL_2_1() - : TestCommandBridge("Test_TC_AIRQUAL_2_1") + Test_TC_BOOL_2_1() + : TestCommandBridge("Test_TC_BOOL_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -6849,7 +6668,7 @@ class Test_TC_AIRQUAL_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_AIRQUAL_2_1() {} + ~Test_TC_BOOL_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -6857,11 +6676,11 @@ class Test_TC_AIRQUAL_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_AIRQUAL_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_BOOL_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_AIRQUAL_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BOOL_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -6878,12 +6697,12 @@ class Test_TC_AIRQUAL_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the AirQuality attribute.\n"); - if (ShouldSkip("AIRQUAL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Read mandatory non-global attribute: StateValue\n"); + if (ShouldSkip("BOOL.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAirQualityAttribute_1(); + err = TestReadMandatoryNonGlobalAttributeStateValue_1(); break; } @@ -6930,22 +6749,19 @@ class Test_TC_AIRQUAL_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheAirQualityAttribute_1() + CHIP_ERROR TestReadMandatoryNonGlobalAttributeStateValue_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAirQualityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AirQuality attribute. Error: %@", err); + [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read mandatory non-global attribute: StateValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("airQuality", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("airQuality", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("airQuality", [value unsignedCharValue], 6U)); - + VerifyOrReturn(CheckConstraintType("stateValue", "boolean", "boolean")); NextTest(); }]; @@ -6953,11 +6769,11 @@ class Test_TC_AIRQUAL_2_1 : public TestCommandBridge { } }; -class Test_TC_BOOL_1_1 : public TestCommandBridge { +class Test_TC_BRBINFO_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_BOOL_1_1() - : TestCommandBridge("Test_TC_BOOL_1_1") + Test_TC_BRBINFO_1_1() + : TestCommandBridge("Test_TC_BRBINFO_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -6967,7 +6783,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_BOOL_1_1() {} + ~Test_TC_BRBINFO_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -6975,11 +6791,11 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_BOOL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_BRBINFO_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BOOL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BRBINFO_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -6996,600 +6812,171 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads optional attribute(VendorName) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeVendorNameInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads optional attribute(VendorID) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeVendorIDInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: EventList\n"); - if (ShouldSkip("BOOL.S.E00")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads optional attribute(ProductName) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0003")) { NextTest(); return; } - err = TestReadTheGlobalAttributeEventList_6(); + err = TestThReadsOptionalAttributeProductNameInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: EventList\n"); - if (ShouldSkip(" !BOOL.S.E00 ")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads optional attribute(NodeLabel) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeNodeLabelInAttributeList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads optional attribute(HardwareVersion) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0007")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeHardwareVersionInAttributeList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads optional attribute(HardwareVersionString) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeHardwareVersionStringInAttributeList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads optional attribute(SoftwareVersion) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0009")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeSoftwareVersionInAttributeList_10(); + break; + case 11: + ChipLogProgress( + chipTool, " ***** Test Step 11 : TH reads optional attribute(SoftwareVersionString) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A000a")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeSoftwareVersionStringInAttributeList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads optional attribute(ManufacturingDate) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A000b")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeManufacturingDateInAttributeList_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads optional attribute(PartNumber) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A000c")) { NextTest(); return; } - err = TestReadTheGlobalAttributeEventList_7(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BOOL_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_BOOL_2_1() - : TestCommandBridge("Test_TC_BOOL_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_BOOL_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_BOOL_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BOOL_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read mandatory non-global attribute: StateValue\n"); - if (ShouldSkip("BOOL.S.A0000")) { - NextTest(); - return; - } - err = TestReadMandatoryNonGlobalAttributeStateValue_1(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadMandatoryNonGlobalAttributeStateValue_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read mandatory non-global attribute: StateValue Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("stateValue", "boolean", "boolean")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BRBINFO_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_BRBINFO_1_1() - : TestCommandBridge("Test_TC_BRBINFO_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_BRBINFO_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_BRBINFO_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BRBINFO_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); - err = TestThReadsTheClusterRevisionFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - err = TestThReadsTheFeatureMapFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); - err = TestThReadsAttributeListFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads optional attribute(VendorName) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeVendorNameInAttributeList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads optional attribute(VendorID) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0002")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeVendorIDInAttributeList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads optional attribute(ProductName) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeProductNameInAttributeList_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads optional attribute(NodeLabel) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0005")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeNodeLabelInAttributeList_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads optional attribute(HardwareVersion) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0007")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeHardwareVersionInAttributeList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads optional attribute(HardwareVersionString) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0008")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeHardwareVersionStringInAttributeList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads optional attribute(SoftwareVersion) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0009")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeSoftwareVersionInAttributeList_10(); - break; - case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : TH reads optional attribute(SoftwareVersionString) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000a")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeSoftwareVersionStringInAttributeList_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads optional attribute(ManufacturingDate) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000b")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeManufacturingDateInAttributeList_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads optional attribute(PartNumber) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000c")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributePartNumberInAttributeList_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads optional attribute(ProductURL) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000d")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeProductURLInAttributeList_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads optional attribute(ProductLabel) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000e")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeProductLabelInAttributeList_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads optional attribute(SerialNumber) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000f")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeSerialNumberInAttributeList_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads optional attribute(UniqueID) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0012")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeUniqueIDInAttributeList_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads optional event(StartUp) in EventList\n"); - if (ShouldSkip("BRBINFO.S.E00")) { - NextTest(); - return; - } - err = TestThReadsOptionalEventStartUpInEventList_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads optional attribute(ShutDown) in EventList\n"); - if (ShouldSkip("BRBINFO.S.E01")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeShutDownInEventList_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads optional attribute(Leave) in EventList\n"); - if (ShouldSkip("BRBINFO.S.E02")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeLeaveInEventList_20(); - break; - case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH1 reads AcceptedCommandList from DUT\n"); - err = TestTh1ReadsAcceptedCommandListFromDut_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH1 reads GeneratedCommandList from DUT\n"); - err = TestTh1ReadsGeneratedCommandListFromDut_23(); + err = TestThReadsOptionalAttributePartNumberInAttributeList_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads optional attribute(ProductURL) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A000d")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeProductURLInAttributeList_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads optional attribute(ProductLabel) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A000e")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeProductLabelInAttributeList_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads optional attribute(SerialNumber) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A000f")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeSerialNumberInAttributeList_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads optional attribute(UniqueID) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0012")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeUniqueIDInAttributeList_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads optional event(StartUp) in EventList\n"); + if (ShouldSkip("BRBINFO.S.E00")) { + NextTest(); + return; + } + NextTest(); + return; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads optional attribute(ShutDown) in EventList\n"); + if (ShouldSkip("BRBINFO.S.E01")) { + NextTest(); + return; + } + NextTest(); + return; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads optional attribute(Leave) in EventList\n"); + if (ShouldSkip("BRBINFO.S.E02")) { + NextTest(); + return; + } + NextTest(); + return; + case 21: + ChipLogProgress(chipTool, + " ***** Test Step 21 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH1 reads AcceptedCommandList from DUT\n"); + err = TestTh1ReadsAcceptedCommandListFromDut_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH1 reads GeneratedCommandList from DUT\n"); + err = TestTh1ReadsGeneratedCommandListFromDut_23(); break; } @@ -8104,75 +7491,6 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalEventStartUpInEventList_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional event(StartUp) in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 0UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeShutDownInEventList_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(ShutDown) in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeLeaveInEventList_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(Leave) in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 2UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_21() { @@ -9322,8 +8640,8 @@ class Test_TC_CC_1_1 : public TestCommandBridge { break; case 57: ChipLogProgress(chipTool, " ***** Test Step 57 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_57(); - break; + NextTest(); + return; case 58: ChipLogProgress(chipTool, " ***** Test Step 58 : Read the optional command(MoveToHue) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C00.Rsp")) { @@ -10940,30 +10258,6 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_57() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR TestReadTheOptionalCommandMoveToHueInAcceptedCommandList_58() { @@ -27429,11 +26723,11 @@ class TestColorControl_9_2 : public TestCommandBridge { } }; -class Test_TC_CDOCONC_1_1 : public TestCommandBridge { +class Test_TC_OPCREDS_1_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CDOCONC_1_1() - : TestCommandBridge("Test_TC_CDOCONC_1_1") + Test_TC_OPCREDS_1_2() + : TestCommandBridge("Test_TC_OPCREDS_1_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -27443,7 +26737,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CDOCONC_1_1() {} + ~Test_TC_OPCREDS_1_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -27451,11 +26745,11 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CDOCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OPCREDS_1_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CDOCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OPCREDS_1_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -27472,244 +26766,578 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("CDOCONC.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + if (ShouldSkip("OPCREDS.S.Afffd")) { NextTest(); return; } - err = TestReadTheGlobalAttributeClusterRevision_1(); + err = TestThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Given CDOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip("OPCREDS.S.Afffc")) { NextTest(); return; } - err = TestGivenCdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Given CDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + if (ShouldSkip("OPCREDS.S.Afffb")) { NextTest(); return; } - err = TestGivenCdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given CDOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list " + "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " + "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " + "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afffb")) { NextTest(); return; } - err = TestGivenCdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); break; case 5: ChipLogProgress(chipTool, - " ***** Test Step 5 : Given CDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F01")) { + " ***** Test Step 5 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " + "the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afffa")) { NextTest(); return; } - err = TestGivenCdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given CDOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip("OPCREDS.S.Afff9")) { NextTest(); return; } - err = TestGivenCdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestThReadsAcceptedCommandListFromDut_6(); break; case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Given CDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F02")) { + " ***** Test Step 7 : TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afff9")) { NextTest(); return; } - err = TestGivenCdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Given CDOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads GeneratedCommandList from DUT\n"); + if (ShouldSkip("OPCREDS.S.Afff8")) { NextTest(); return; } - err = TestGivenCdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestThReadsGeneratedCommandListFromDut_8(); break; case 9: ChipLogProgress(chipTool, - " ***** Test Step 9 : Given CDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F03")) { + " ***** Test Step 9 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afff8")) { NextTest(); return; } - err = TestGivenCdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Given CDOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F04")) { + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 10; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAttributeListFromDut_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 11UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 8UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; + +class Test_TC_BINFO_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_BINFO_1_1() + : TestCommandBridge("Test_TC_BINFO_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_BINFO_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_BINFO_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BINFO_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + if (ShouldSkip("BINFO.S.Afffd")) { NextTest(); return; } - err = TestGivenCdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestThReadsTheClusterRevisionFromDut_1(); break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Given CDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F04")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip("BINFO.S.Afffc")) { NextTest(); return; } - err = TestGivenCdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestThReadsTheFeatureMapFromDut_2(); break; - case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Given CDOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F05")) { + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + if (ShouldSkip("BINFO.S.Afffb")) { NextTest(); return; } - err = TestGivenCdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestThReadsAttributeListFromDut_3(); break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Given CDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F05")) { + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads optional attribute(ManufacturingDate) in attributeList\n"); + if (ShouldSkip("BINFO.S.A000b && BINFO.S.Afffb")) { NextTest(); return; } - err = TestGivenCdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestThReadsOptionalAttributeManufacturingDateInAttributeList_4(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb")) { + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads optional attribute(PartNumber) in attributeList\n"); + if (ShouldSkip("BINFO.S.A000c && BINFO.S.Afffb")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_14(); + err = TestThReadsOptionalAttributePartNumberInAttributeList_5(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.A0007 && CDOCONC.S.F00")) { + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads optional attribute(ProductURL) in attributeList\n"); + if (ShouldSkip("BINFO.S.A000d && BINFO.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestThReadsOptionalAttributeProductURLInAttributeList_6(); break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Check the optional attribute Uncertainty is excluded from AttributeList when " - "CDOCONC.S.A0007 is not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.A0007")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads optional attribute(ProductLabel) in attributeList\n"); + if (ShouldSkip("BINFO.S.A000e && BINFO.S.Afffb")) { NextTest(); return; } - err = TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_16(); + err = TestThReadsOptionalAttributeProductLabelInAttributeList_7(); break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F00")) { + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads optional attribute(SerialNumber) in attributeList\n"); + if (ShouldSkip("BINFO.S.A000f && BINFO.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestThReadsOptionalAttributeSerialNumberInAttributeList_8(); break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when CDOCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F00")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads optional attribute(LocalConfigDisabled) in attributeList\n"); + if (ShouldSkip("BINFO.S.A0010 && BINFO.S.Afffb")) { NextTest(); return; } - err = TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_18(); + err = TestThReadsOptionalAttributeLocalConfigDisabledInAttributeList_9(); break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow " - "in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F04")) { + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads optional attribute(Reachable) in attributeList\n"); + if (ShouldSkip("BINFO.S.A0011 && BINFO.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestThReadsOptionalAttributeReachableInAttributeList_10(); break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "CDOCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F04")) { + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads optional attribute(UniqueID) in attributeList\n"); + if (ShouldSkip("BINFO.S.A0012 && BINFO.S.Afffb")) { NextTest(); return; } - err = TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_20(); + err = TestThReadsOptionalAttributeUniqueIDInAttributeList_11(); break; - case 21: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 21 : Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F05")) { + " ***** Test Step 12 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list " + "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " + "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " + "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); break; - case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when CDOCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F05")) { + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH1 reads EventList from DUT\n"); + if (ShouldSkip(" BINFO.S.Afffa && !BINFO.S.E00 && !BINFO.S.E01 && !BINFO.S.E02 && !BINFO.S.A0011 ")) { NextTest(); return; } - err = TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F01")) { + NextTest(); + return; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read BINFO.S.E00(StartUp) event in EventList\n"); + if (ShouldSkip("BINFO.S.E00 && BINFO.S.Afffa")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); - break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F01")) { + NextTest(); + return; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read BINFO.S.E01(ShutDown) event in EventList\n"); + if (ShouldSkip("BINFO.S.E01 && BINFO.S.Afffa")) { NextTest(); return; } - err = TestCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read the global attribute: EventList\n"); - if (ShouldSkip("CDOCONC.S.Afffa")) { + NextTest(); + return; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read BINFO.S.E02(Leave) event in EventList\n"); + if (ShouldSkip("BINFO.S.E02 && BINFO.S.Afffa")) { + NextTest(); + return; + } + NextTest(); + return; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Read (ReachableChanged) event in EventList\n"); + if (ShouldSkip("BINFO.S.A0011 && BINFO.S.Afffa")) { NextTest(); return; } - err = TestReadTheGlobalAttributeEventList_25(); + NextTest(); + return; + case 18: + ChipLogProgress(chipTool, + " ***** Test Step 18 : TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values " + "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " + "the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afffa")) { + NextTest(); + return; + } + err = TestThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18(); break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("CDOCONC.S.Afff9")) { + case 19: + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afff9")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("CDOCONC.S.Afff8")) { + case 20: + ChipLogProgress(chipTool, + " ***** Test Step 20 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afff8")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); break; } @@ -27785,27 +27413,6 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -27819,7 +27426,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -27834,23 +27441,21 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -27860,20 +27465,23 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CDOCONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -27881,259 +27489,628 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestThReadsAttributeListFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestThReadsOptionalAttributeManufacturingDateInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CDOCONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(ManufacturingDate) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestThReadsOptionalAttributePartNumberInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(PartNumber) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestThReadsOptionalAttributeProductURLInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CDOCONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(ProductURL) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 13UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestThReadsOptionalAttributeProductLabelInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(ProductLabel) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestThReadsOptionalAttributeSerialNumberInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CDOCONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(SerialNumber) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestThReadsOptionalAttributeLocalConfigDisabledInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(LocalConfigDisabled) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestThReadsOptionalAttributeReachableInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CDOCONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(Reachable) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestThReadsOptionalAttributeUniqueIDInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(UniqueID) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR + TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CDOCONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); + CHIP_ERROR + TestThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18() + { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + CHIP_ERROR + TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() + { - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; + +class Test_TC_CNET_1_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CNET_1_3() + : TestCommandBridge("Test_TC_CNET_1_3") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_CNET_1_3() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CNET_1_3\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CNET_1_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + if (ShouldSkip("CNET.S.Afffd")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip(" !CNET.S.F00 && !CNET.S.F01 && !CNET.S.F02 && CNET.S.Afffc")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap when CNET.S.F00 is set\n"); + if (ShouldSkip("CNET.S.F00 && CNET.S.Afffc")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMapWhenCnetsf00IsSet_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: FeatureMap when CNET.S.F01 is set\n"); + if (ShouldSkip("CNET.S.F01 && CNET.S.Afffc")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMapWhenCnetsf01IsSet_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: FeatureMap when CNET.S.F02 is set\n"); + if (ShouldSkip("CNET.S.F02 && CNET.S.Afffc")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMapWhenCnetsf02IsSet_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("CNET.S.Afffb")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read mandatory attributes in AttributeList if CNET.S.F00(WI)/CNET.S.F01(TH)/CNET.S.F02(ET) " + "is true\n"); + if (ShouldSkip("CNET.S.F00 || CNET.S.F01 || CNET.S.F02 && CNET.S.Afffb")) { + NextTest(); + return; + } + err = TestReadMandatoryAttributesInAttributeListIfCnetsf00wiCnetsf01thCnetsf02etIsTrue_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(ScanMaxTimeSeconds): AttributeList\n"); + if (ShouldSkip("CNET.S.A0002 && CNET.S.Afffb")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeScanMaxTimeSecondsAttributeList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Reading optional attribute(ConnectMaxTimeSeconds) in AttributeList\n"); + if (ShouldSkip("CNET.S.A0003 && CNET.S.Afffb")) { + NextTest(); + return; + } + err = TestReadingOptionalAttributeConnectMaxTimeSecondsInAttributeList_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list " + "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " + "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " + "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && CNET.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " + "the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && CNET.S.Afffa")) { + NextTest(); + return; + } + err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : Read AcceptedCommandList If DUT supports Wi-Fi/Thread related features " + "CNET.S.F00(WI),CNET.S.F01(TH)\n"); + if (ShouldSkip("( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff9")) { + NextTest(); + return; + } + err = TestReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : Read AcceptedCommandList If DUT supports Wi-Fi related features (CNET.S.F00(WI) is true)\n"); + if (ShouldSkip("CNET.S.F00 && CNET.S.Afff9")) { + NextTest(); + return; + } + err = TestReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : Read AcceptedCommandList If DUT supports Thread related features(CNET.S.F01(TH) is true)\n"); + if (ShouldSkip("CNET.S.F01 && CNET.S.Afff9")) { + NextTest(); + return; + } + err = TestReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_14(); + break; + case 15: + ChipLogProgress(chipTool, + " ***** Test Step 15 : Read AcceptedCommandList If DUT supports Ethernet related features(CNET.S.F02(TH) is " + "true)\n"); + if (ShouldSkip("CNET.S.F02 && CNET.S.Afff9")) { + NextTest(); + return; + } + err = TestReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_15(); + break; + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " + "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " + "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " + "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " + "or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && CNET.S.Afff9")) { + NextTest(); + return; + } + err = TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); + break; + case 17: + ChipLogProgress(chipTool, + " ***** Test Step 17 : Read the GeneratedCommandList If DUT supports Wi-Fi/Thread related features(CNET.S.F00(WI) " + "or CNET.S.F01(TH) is true)\n"); + if (ShouldSkip("( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff8")) { + NextTest(); + return; + } + err = TestReadTheGeneratedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCNETSF00WIOrCnetsf01thIsTrue_17(); + break; + case 18: + ChipLogProgress(chipTool, + " ***** Test Step 18 : Read the GeneratedCommandList If DUT supports Ethernet related features(CNET.S.F02(ET) must " + "be true)\n"); + if (ShouldSkip("CNET.S.F02 && CNET.S.Afff8")) { + NextTest(); + return; + } + err = TestReadTheGeneratedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02ETMustBeTrue_18(); + break; + case 19: + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && CNET.S.Afff8")) { + NextTest(); + return; + } + err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 20; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestGivenCdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } NextTest(); }]; @@ -28141,22 +28118,24 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMapWhenCnetsf00IsSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute Uncertainty in AttributeList Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap when CNET.S.F00 is set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } NextTest(); }]; @@ -28164,24 +28143,24 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_16() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMapWhenCnetsf01IsSet_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check the optional attribute Uncertainty is excluded from AttributeList when CDOCONC.S.A0007 is not set Error: " - @"%@", - err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap when CNET.S.F01 is set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 2UL)); + } NextTest(); }]; @@ -28189,28 +28168,24 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMapWhenCnetsf02IsSet_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue and " - @"Measurement Unit in AttributeList Error: %@", - err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap when CNET.S.F02 is set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 4UL)); + } NextTest(); }]; @@ -28218,29 +28193,27 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_18() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are excluded " - @"from AttributeList when CDOCONC.S.F00 (MEA) is not set Error: %@", - err); + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -28248,25 +28221,28 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestReadMandatoryAttributesInAttributeListIfCnetsf00wiCnetsf01thCnetsf02etIsTrue_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList " - @"Error: %@", + NSLog(@"Read mandatory attributes in AttributeList if CNET.S.F00(WI)/CNET.S.F01(TH)/CNET.S.F02(ET) is true Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); NextTest(); }]; @@ -28274,25 +28250,22 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_20() + CHIP_ERROR TestReadTheOptionalAttributeScanMaxTimeSecondsAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when CDOCONC.S.F04 " - @"(PEA) is not set Error: %@", - err); + NSLog(@"Read the optional attribute(ScanMaxTimeSeconds): AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); }]; @@ -28300,25 +28273,22 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestReadingOptionalAttributeConnectMaxTimeSecondsInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - @"AttributeList Error: %@", - err); + NSLog(@"Reading optional attribute(ConnectMaxTimeSeconds) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -28327,25 +28297,47 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_22() + TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - @"CDOCONC.S.F05 (AVG) is not set Error: %@", + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read AcceptedCommandList If DUT supports Wi-Fi/Thread related features CNET.S.F00(WI),CNET.S.F01(TH) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); NextTest(); }]; @@ -28353,22 +28345,22 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attribute LevelValue in AttributeList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read AcceptedCommandList If DUT supports Wi-Fi related features (CNET.S.F00(WI) is true) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); NextTest(); }]; @@ -28376,22 +28368,22 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_24() + CHIP_ERROR TestReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is not set Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read AcceptedCommandList If DUT supports Thread related features(CNET.S.F01(TH) is true) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 10UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); NextTest(); }]; @@ -28399,69 +28391,81 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_25() + CHIP_ERROR TestReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read AcceptedCommandList If DUT supports Ethernet related features(CNET.S.F02(TH) is true) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR + TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadTheGeneratedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCNETSF00WIOrCnetsf01thIsTrue_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the GeneratedCommandList If DUT supports Wi-Fi/Thread related features(CNET.S.F00(WI) or CNET.S.F01(TH) " + @"is true) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 7UL)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestReadTheGeneratedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02ETMustBeTrue_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Read the GeneratedCommandList If DUT supports Ethernet related features(CNET.S.F02(ET) must be true) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28470,19 +28474,29 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR + TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; -class Test_TC_CDOCONC_2_1 : public TestCommandBridge { +class Test_TC_DESC_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CDOCONC_2_1() - : TestCommandBridge("Test_TC_CDOCONC_2_1") + Test_TC_DESC_1_1() + : TestCommandBridge("Test_TC_DESC_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -28492,7 +28506,7 @@ class Test_TC_CDOCONC_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CDOCONC_2_1() {} + ~Test_TC_DESC_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -28500,11 +28514,11 @@ class Test_TC_CDOCONC_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CDOCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DESC_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CDOCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DESC_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -28521,84 +28535,81 @@ class Test_TC_CDOCONC_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MinMeasuredValue attribute.\n"); - if (ShouldSkip("CDOCONC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + if (ShouldSkip("DESC.S.Afffd")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMinMeasuredValueAttribute_1(); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the MaxMeasuredValue attribute.\n"); - if (ShouldSkip("CDOCONC.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("DESC.S.Afffc")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the MeasuredValue attribute.\n"); - if (ShouldSkip("CDOCONC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("DESC.S.Afffb")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasuredValueAttribute_3(); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the PeakMeasuredValue attribute.\n"); - if (ShouldSkip("CDOCONC.S.A0003")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list " + "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " + "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " + "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afffb")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueAttribute_4(); + err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the DUT the PeakMeasuredValueWindow attribute.\n"); - if (ShouldSkip("CDOCONC.S.A0004")) { + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " + "the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afffa")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5(); + err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the AverageMeasuredValue attribute.\n"); - if (ShouldSkip("CDOCONC.S.A0005")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afff9")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6(); + err = TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the AverageMeasuredValueWindow attribute.\n"); - if (ShouldSkip("CDOCONC.S.A0006")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the MeasurementUnit attribute.\n"); - if (ShouldSkip("CDOCONC.S.A0008")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasurementUnitAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the MeasurementMedium attribute.\n"); - if (ShouldSkip("CDOCONC.S.A0009")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasurementMediumAttribute_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads from the DUT the LevelValue attribute.\n"); - if (ShouldSkip("CDOCONC.S.A000a")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afff8")) { NextTest(); return; } - err = TestThReadsFromTheDutTheLevelValueAttribute_10(); + err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); break; } @@ -28635,15 +28646,6 @@ class Test_TC_CDOCONC_2_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -28657,7 +28659,7 @@ class Test_TC_CDOCONC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -28671,165 +28673,78 @@ class Test_TC_CDOCONC_2_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMinMeasuredValueAttribute_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MinMeasuredValue attribute. Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value floatValue], 0.0f)); - } { - MinMeasuredValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MaxMeasuredValue attribute. Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value floatValue], MinMeasuredValue)); - } { - MaxMeasuredValue = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasuredValue attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("measuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value floatValue], MaxMeasuredValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueAttribute_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValue attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("peakMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValue", [value floatValue], MaxMeasuredValue)); + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValueWindow attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("peakMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValueWindow", [value unsignedIntValue], 604800UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValue attribute. Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("averageMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValue", [value floatValue], MaxMeasuredValue)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -28837,108 +28752,56 @@ class Test_TC_CDOCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7() + CHIP_ERROR + TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValueWindow attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("averageMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValueWindow", [value unsignedIntValue], 604800UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementUnitAttribute_8() + CHIP_ERROR + TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementUnit attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("measurementUnit", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementUnit", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementUnit", [value unsignedCharValue], 7U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementMediumAttribute_9() + CHIP_ERROR + TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementMedium attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("measurementMedium", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementMedium", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementMedium", [value unsignedCharValue], 2U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheLevelValueAttribute_10() + CHIP_ERROR + TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the LevelValue attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("levelValue", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("levelValue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("levelValue", [value unsignedCharValue], 4U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } }; -class Test_TC_CMOCONC_1_1 : public TestCommandBridge { +class Test_TC_DLOG_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CMOCONC_1_1() - : TestCommandBridge("Test_TC_CMOCONC_1_1") + Test_TC_DLOG_1_1() + : TestCommandBridge("Test_TC_DLOG_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -28948,7 +28811,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CMOCONC_1_1() {} + ~Test_TC_DLOG_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -28956,11 +28819,11 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CMOCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DLOG_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CMOCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DLOG_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -28977,244 +28840,570 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("CMOCONC.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + if (ShouldSkip("DLOG.S.Afffd")) { NextTest(); return; } - err = TestReadTheGlobalAttributeClusterRevision_1(); + err = TestThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip("DLOG.S.Afffc")) { NextTest(); return; } - err = TestGivenCmoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + if (ShouldSkip("DLOG.S.Afffb")) { NextTest(); return; } - err = TestGivenCmoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list " + "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " + "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " + "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afffb")) { NextTest(); return; } - err = TestGivenCmoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); break; case 5: ChipLogProgress(chipTool, - " ***** Test Step 5 : Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F01")) { + " ***** Test Step 5 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " + "the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afffa")) { NextTest(); return; } - err = TestGivenCmoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip("DLOG.S.Afff9")) { NextTest(); return; } - err = TestGivenCmoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestThReadsAcceptedCommandListFromDut_6(); break; case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F02")) { + " ***** Test Step 7 : TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afff9")) { NextTest(); return; } - err = TestGivenCmoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads GeneratedCommandList from DUT\n"); + if (ShouldSkip("DLOG.S.Afff8")) { NextTest(); return; } - err = TestGivenCmoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestThReadsGeneratedCommandListFromDut_8(); break; case 9: ChipLogProgress(chipTool, - " ***** Test Step 9 : Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F03")) { + " ***** Test Step 9 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afff8")) { NextTest(); return; } - err = TestGivenCmoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F04")) { + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 10; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAttributeListFromDut_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; + +class Test_TC_DGETH_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DGETH_1_1() + : TestCommandBridge("Test_TC_DGETH_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_DGETH_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + if (ShouldSkip("DGETH.S.Afffd")) { NextTest(); return; } - err = TestGivenCmoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestThReadsTheClusterRevisionFromDut_1(); break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F04")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip(" !DGETH.S.F00 && !DGETH.S.F01 && DGETH.S.Afffc")) { NextTest(); return; } - err = TestGivenCmoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestThReadsTheFeatureMapFromDut_2(); break; - case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F05")) { + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Given DGETH.S.F00 ensure featuremap has the correct bit set\n"); + if (ShouldSkip("DGETH.S.F00 && DGETH.S.Afffc")) { NextTest(); return; } - err = TestGivenCmoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestGivenDgethsf00EnsureFeaturemapHasTheCorrectBitSet_3(); break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F05")) { + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Given DGETH.S.F01 ensure featuremap has the correct bit set\n"); + if (ShouldSkip("DGETH.S.F01 && DGETH.S.Afffc")) { NextTest(); return; } - err = TestGivenCmoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestGivenDgethsf01EnsureFeaturemapHasTheCorrectBitSet_4(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb")) { + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads AttributeList from DUT\n"); + if (ShouldSkip("DGETH.S.Afffb")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_14(); + err = TestThReadsAttributeListFromDut_5(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.A0007 && CMOCONC.S.F00")) { + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads optional attribute(PHYRate) in AttributeList\n"); + if (ShouldSkip("DGETH.S.A0000 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestThReadsOptionalAttributePHYRateInAttributeList_6(); break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Check the optional attribute Uncertainty is excluded from AttributeList when " - "CMOCONC.S.A0007 is not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.A0007")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads optional attribute(FullDuplex) in AttributeList\n"); + if (ShouldSkip("DGETH.S.A0001 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_16(); + err = TestThReadsOptionalAttributeFullDuplexInAttributeList_7(); break; - case 17: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 17 : Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F00")) { + " ***** Test Step 8 : TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in " + "AttributeList\n"); + if (ShouldSkip("DGETH.S.A0002 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_8(); break; - case 18: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 18 : Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when CMOCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F00")) { + " ***** Test Step 9 : TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in " + "AttributeList\n"); + if (ShouldSkip("DGETH.S.A0003 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_18(); + err = TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_9(); break; - case 19: + case 10: ChipLogProgress(chipTool, - " ***** Test Step 19 : Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow " - "in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F04")) { + " ***** Test Step 10 : TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in " + "AttributeList\n"); + if (ShouldSkip("DGETH.S.A0004 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_10(); break; - case 20: + case 11: ChipLogProgress(chipTool, - " ***** Test Step 20 : Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "CMOCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F04")) { + " ***** Test Step 11 : TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in " + "AttributeList\n"); + if (ShouldSkip("DGETH.S.A0005 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_20(); + err = TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_11(); break; - case 21: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 21 : Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F05")) { + " ***** Test Step 12 : TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in " + "AttributeList\n"); + if (ShouldSkip("DGETH.S.A0006 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_12(); break; - case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when CMOCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F05")) { + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads optional attribute(CarrierDetect) in AttributeList\n"); + if (ShouldSkip("DGETH.S.A0007 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_22(); + err = TestThReadsOptionalAttributeCarrierDetectInAttributeList_13(); break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F01")) { + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads optional attribute(TimeSinceReset) in AttributeList\n"); + if (ShouldSkip("DGETH.S.A0008 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); + err = TestThReadsOptionalAttributeTimeSinceResetInAttributeList_14(); break; - case 24: + case 15: ChipLogProgress(chipTool, - " ***** Test Step 24 : Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F01")) { + " ***** Test Step 15 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list " + "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " + "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " + "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afffb")) { NextTest(); return; } - err = TestCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_24(); + err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read the global attribute: EventList\n"); - if (ShouldSkip("CMOCONC.S.Afffa")) { + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " + "the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afffa")) { NextTest(); return; } - err = TestReadTheGlobalAttributeEventList_25(); + err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("CMOCONC.S.Afff9")) { + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip("( DGETH.S.F00 || DGETH.S.F01 ) && DGETH.S.Afff9")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestThReadsAcceptedCommandListFromDut_17(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("CMOCONC.S.Afff8")) { + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip("DGETH.S.Afff9 && !DGETH.S.F00 && !DGETH.S.F01")) { + NextTest(); + return; + } + err = TestThReadsAcceptedCommandListFromDut_18(); + break; + case 19: + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " + "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " + "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " + "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " + "or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afff9")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); + break; + case 20: + ChipLogProgress(chipTool, + " ***** Test Step 20 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afff8")) { + NextTest(); + return; + } + err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); break; } @@ -29290,27 +29479,6 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -29324,7 +29492,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -29339,23 +29507,23 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -29365,208 +29533,24 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCmoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenCmoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenCmoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenCmoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenCmoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenCmoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenCmoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenCmoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenCmoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenCmoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); @@ -29575,17 +29559,17 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCmoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestGivenDgethsf00EnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); + NSLog(@"Given DGETH.S.F00 ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29596,17 +29580,17 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCmoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestGivenDgethsf01EnsureFeaturemapHasTheCorrectBitSet_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Given DGETH.S.F01 ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29617,22 +29601,21 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestThReadsAttributeListFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -29646,22 +29629,22 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestThReadsOptionalAttributePHYRateInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute Uncertainty in AttributeList Error: %@", err); + NSLog(@"TH reads optional attribute(PHYRate) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); }]; @@ -29669,24 +29652,22 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_16() + CHIP_ERROR TestThReadsOptionalAttributeFullDuplexInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check the optional attribute Uncertainty is excluded from AttributeList when CMOCONC.S.A0007 is not set Error: " - @"%@", - err); + NSLog(@"TH reads optional attribute(FullDuplex) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); }]; @@ -29694,28 +29675,24 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue and " - @"Measurement Unit in AttributeList Error: %@", + NSLog( + @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); NextTest(); }]; @@ -29723,29 +29700,24 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_18() + CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are excluded " - @"from AttributeList when CMOCONC.S.F00 (MEA) is not set Error: %@", + NSLog( + @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -29753,24 +29725,23 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList " - @"Error: %@", + NSLog( + @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); NextTest(); @@ -29779,25 +29750,24 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_20() + CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when CMOCONC.S.F04 " - @"(PEA) is not set Error: %@", + NSLog( + @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); NextTest(); }]; @@ -29805,24 +29775,23 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - @"AttributeList Error: %@", + NSLog( + @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); NextTest(); @@ -29831,26 +29800,22 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_22() + CHIP_ERROR TestThReadsOptionalAttributeCarrierDetectInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - @"CMOCONC.S.F05 (AVG) is not set Error: %@", - err); + NSLog(@"TH reads optional attribute(CarrierDetect) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); NextTest(); }]; @@ -29858,22 +29823,22 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestThReadsOptionalAttributeTimeSinceResetInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attribute LevelValue in AttributeList Error: %@", err); + NSLog(@"TH reads optional attribute(TimeSinceReset) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); NextTest(); }]; @@ -29881,66 +29846,62 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_24() + CHIP_ERROR + TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is not set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 10UL)); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - NextTest(); - }]; + CHIP_ERROR + TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16() + { - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeEventList_25() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29956,38 +29917,34 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR + TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; + CHIP_ERROR + TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20() + { - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } }; -class Test_TC_CMOCONC_2_1 : public TestCommandBridge { +class Test_TC_DGETH_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CMOCONC_2_1() - : TestCommandBridge("Test_TC_CMOCONC_2_1") + Test_TC_DGETH_2_1() + : TestCommandBridge("Test_TC_DGETH_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -29997,7 +29954,7 @@ class Test_TC_CMOCONC_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CMOCONC_2_1() {} + ~Test_TC_DGETH_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30005,11 +29962,11 @@ class Test_TC_CMOCONC_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CMOCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CMOCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30026,84 +29983,146 @@ class Test_TC_CMOCONC_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MinMeasuredValue attribute.\n"); - if (ShouldSkip("CMOCONC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Read PHYRate attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMinMeasuredValueAttribute_1(); + err = TestReadPHYRateAttributeConstraints_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the MaxMeasuredValue attribute.\n"); - if (ShouldSkip("CMOCONC.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read FullDuplex attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0001")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2(); + err = TestReadFullDuplexAttributeConstraints_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the MeasuredValue attribute.\n"); - if (ShouldSkip("CMOCONC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read PacketRxCount attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0002")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasuredValueAttribute_3(); + err = TestReadPacketRxCountAttributeConstraints_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the PeakMeasuredValue attribute.\n"); - if (ShouldSkip("CMOCONC.S.A0003")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Read PacketRxCount value from DUT and verify the number of packets received on ethernet " + "network interface\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0002")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueAttribute_4(); + err = TestReadPacketRxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the DUT the PeakMeasuredValueWindow attribute.\n"); - if (ShouldSkip("CMOCONC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Read PacketTxCount attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0003")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5(); + err = TestReadPacketTxCountAttributeConstraints_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the AverageMeasuredValue attribute.\n"); - if (ShouldSkip("CMOCONC.S.A0005")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Read PacketTxCount value from DUT and verify the number of packets received on ethernet " + "network interface\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0003")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6(); + err = TestReadPacketTxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the AverageMeasuredValueWindow attribute.\n"); - if (ShouldSkip("CMOCONC.S.A0006")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Read TxErrCount attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0004")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7(); + err = TestReadTxErrCountAttributeConstraints_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the MeasurementUnit attribute.\n"); - if (ShouldSkip("CMOCONC.S.A0008")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Read TxErrCount value from DUT and verify value indicates the number of failed packet " + "transmission on ethernet network interface\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0004")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasurementUnitAttribute_8(); + err = TestReadTxErrCountValueFromDutAndVerifyValueIndicatesTheNumberOfFailedPacketTransmissionOnEthernetNetworkInterface_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the MeasurementMedium attribute.\n"); - if (ShouldSkip("CMOCONC.S.A0009")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Read CollisionCount attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0005")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasurementMediumAttribute_9(); + err = TestReadCollisionCountAttributeConstraints_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads from the DUT the LevelValue attribute.\n"); - if (ShouldSkip("CMOCONC.S.A000a")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Read CollisionCount value from DUT and verify value indicates the number of collision " + "occurred while transmitting packets on ethernet network interface\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0005")) { + NextTest(); + return; + } + err = TestReadCollisionCountValueFromDutAndVerifyValueIndicatesTheNumberOfCollisionOccurredWhileTransmittingPacketsOnEthernetNetworkInterface_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read OverrunCount attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0006")) { + NextTest(); + return; + } + err = TestReadOverrunCountAttributeConstraints_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : Read OverrunCount value from DUT and verify value indicates the number of packets dropped " + "due to lack of buffer memory on ethernet network interface\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0006")) { + NextTest(); + return; + } + err = TestReadOverrunCountValueFromDutAndVerifyValueIndicatesTheNumberOfPacketsDroppedDueToLackOfBufferMemoryOnEthernetNetworkInterface_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Read CarrierDetect attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0007")) { + NextTest(); + return; + } + err = TestReadCarrierDetectAttributeConstraints_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : Read CarrierDetect value from DUT and verify value indicates the presence of carrier detect " + "control signal on ethernet network interface\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0007")) { + NextTest(); + return; + } + err = TestReadCarrierDetectValueFromDutAndVerifyValueIndicatesThePresenceOfCarrierDetectControlSignalOnEthernetNetworkInterface_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read TimeSinceReset attribute constraints\n"); + if (ShouldSkip("DGETH.S.A0008")) { + NextTest(); + return; + } + err = TestReadTimeSinceResetAttributeConstraints_15(); + break; + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : Read TimeSinceReset value from DUT and verify the value indicates the duration of time, in " + "minutes\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0008")) { NextTest(); return; } - err = TestThReadsFromTheDutTheLevelValueAttribute_10(); + err = TestReadTimeSinceResetValueFromDutAndVerifyTheValueIndicatesTheDurationOfTimeInMinutes_16(); break; } @@ -30149,6 +30168,24 @@ class Test_TC_CMOCONC_2_1 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -30162,7 +30199,7 @@ class Test_TC_CMOCONC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 17; chip::Optional mNodeId; chip::Optional mCluster; @@ -30176,29 +30213,26 @@ class Test_TC_CMOCONC_2_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMinMeasuredValueAttribute_1() + CHIP_ERROR TestReadPHYRateAttributeConstraints_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MinMeasuredValue attribute. Error: %@", err); + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read PHYRate attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value floatValue], 0.0f)); - } - { - MinMeasuredValue = value; + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); } NextTest(); @@ -30206,29 +30240,24 @@ class Test_TC_CMOCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2() + CHIP_ERROR TestReadFullDuplexAttributeConstraints_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MaxMeasuredValue attribute. Error: %@", err); + [cluster readAttributeFullDuplexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read FullDuplex attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value floatValue], MinMeasuredValue)); - } - { - MaxMeasuredValue = value; + VerifyOrReturn(CheckConstraintType("fullDuplex", "boolean", "boolean")); } NextTest(); @@ -30237,176 +30266,182 @@ class Test_TC_CMOCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_3() + CHIP_ERROR TestReadPacketRxCountAttributeConstraints_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasuredValue attribute. Error: %@", err); + [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read PacketRxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("measuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value floatValue], MaxMeasuredValue)); - } - + VerifyOrReturn(CheckConstraintType("packetRxCount", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueAttribute_4() + CHIP_ERROR TestReadPacketRxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValue attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("peakMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValue", [value floatValue], MaxMeasuredValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5() + CHIP_ERROR TestReadPacketTxCountAttributeConstraints_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValueWindow attribute. Error: %@", err); + [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read PacketTxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("peakMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValueWindow", [value unsignedIntValue], 604800UL)); - + VerifyOrReturn(CheckConstraintType("packetTxCount", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6() + CHIP_ERROR TestReadPacketTxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_6() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadTxErrCountAttributeConstraints_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValue attribute. Error: %@", err); + [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read TxErrCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("averageMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValue", [value floatValue], MaxMeasuredValue)); - } - + VerifyOrReturn(CheckConstraintType("txErrCount", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7() + CHIP_ERROR + TestReadTxErrCountValueFromDutAndVerifyValueIndicatesTheNumberOfFailedPacketTransmissionOnEthernetNetworkInterface_8() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadCollisionCountAttributeConstraints_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValueWindow attribute. Error: %@", err); + [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read CollisionCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("averageMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValueWindow", [value unsignedIntValue], 604800UL)); - + VerifyOrReturn(CheckConstraintType("collisionCount", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementUnitAttribute_8() + CHIP_ERROR + TestReadCollisionCountValueFromDutAndVerifyValueIndicatesTheNumberOfCollisionOccurredWhileTransmittingPacketsOnEthernetNetworkInterface_10() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadOverrunCountAttributeConstraints_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementUnit attribute. Error: %@", err); + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read OverrunCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("measurementUnit", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementUnit", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementUnit", [value unsignedCharValue], 7U)); - + VerifyOrReturn(CheckConstraintType("overrunCount", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementMediumAttribute_9() + CHIP_ERROR + TestReadOverrunCountValueFromDutAndVerifyValueIndicatesTheNumberOfPacketsDroppedDueToLackOfBufferMemoryOnEthernetNetworkInterface_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementMedium attribute. Error: %@", err); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadCarrierDetectAttributeConstraints_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCarrierDetectWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read CarrierDetect attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("measurementMedium", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementMedium", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementMedium", [value unsignedCharValue], 2U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("carrierDetect", "boolean", "boolean")); + } NextTest(); }]; @@ -30414,36 +30449,54 @@ class Test_TC_CMOCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheLevelValueAttribute_10() + CHIP_ERROR + TestReadCarrierDetectValueFromDutAndVerifyValueIndicatesThePresenceOfCarrierDetectControlSignalOnEthernetNetworkInterface_14() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadTimeSinceResetAttributeConstraints_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the LevelValue attribute. Error: %@", err); + [cluster readAttributeTimeSinceResetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read TimeSinceReset attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("levelValue", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("levelValue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("levelValue", [value unsignedCharValue], 4U)); - + VerifyOrReturn(CheckConstraintType("timeSinceReset", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestReadTimeSinceResetValueFromDutAndVerifyTheValueIndicatesTheDurationOfTimeInMinutes_16() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; -class Test_TC_FLDCONC_1_1 : public TestCommandBridge { +class Test_TC_DGETH_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FLDCONC_1_1() - : TestCommandBridge("Test_TC_FLDCONC_1_1") + Test_TC_DGETH_2_2() + : TestCommandBridge("Test_TC_DGETH_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -30453,7 +30506,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_FLDCONC_1_1() {} + ~Test_TC_DGETH_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30461,11 +30514,11 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLDCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLDCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30482,244 +30535,172 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("FLDCONC.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestReadTheGlobalAttributeClusterRevision_1(); + err = TestThReadsPHYRateAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Given FLDCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestGivenFldconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestThReadsPHYRateAttributeFromDut_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Given FLDCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestGivenFldconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestThReadsPHYRateAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given FLDCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestGivenFldconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestThReadsPHYRateAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Given FLDCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestGivenFldconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestThReadsPHYRateAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given FLDCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestGivenFldconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestThReadsPHYRateAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Given FLDCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestGivenFldconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestThReadsPHYRateAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Given FLDCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestGivenFldconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestThReadsPHYRateAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Given FLDCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestGivenFldconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestThReadsPHYRateAttributeFromDut_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Given FLDCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F04")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestGivenFldconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestThReadsPHYRateAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Given FLDCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F04")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads PacketRxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0002")) { NextTest(); return; } - err = TestGivenFldconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestThReadsPacketRxCountAttributeValueFromDut_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Given FLDCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F05")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads PacketTxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0003")) { NextTest(); return; } - err = TestGivenFldconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestThReadsPacketTxCountAttributeValueFromDut_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Given FLDCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F05")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads TxErrCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0004")) { NextTest(); return; } - err = TestGivenFldconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestThReadsTxErrCountAttributeValueFromDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CollisionCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0005")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_14(); + err = TestThReadsCollisionCountAttributeValueFromDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.A0007 && FLDCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads OverrunCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0006")) { NextTest(); return; } - err = TestReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestThReadsOverrunCountAttributeValueFromDut_15(); break; case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Check the optional attribute Uncertainty is excluded from AttributeList when " - "FLDCONC.S.A0007 is not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Sends ResetCounts command\n"); + if (ShouldSkip("DGETH.S.C00.Rsp")) { NextTest(); return; } - err = TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_16(); + err = TestSendsResetCountsCommand_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads PacketRxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0002 && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestThReadsPacketRxCountAttributeValueFromDut_17(); break; case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when FLDCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads PacketTxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0003 && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_18(); + err = TestThReadsPacketTxCountAttributeValueFromDut_18(); break; case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow " - "in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F04")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads TxErrCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0004")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestThReadsTxErrCountAttributeValueFromDut_19(); break; case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "FLDCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F04")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CollisionCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0005")) { NextTest(); return; } - err = TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_20(); + err = TestThReadsCollisionCountAttributeValueFromDut_20(); break; case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F05")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); - break; - case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when FLDCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F05")) { - NextTest(); - return; - } - err = TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F01")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); - break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F01")) { - NextTest(); - return; - } - err = TestCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read the global attribute: EventList\n"); - if (ShouldSkip("FLDCONC.S.Afffa")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeEventList_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("FLDCONC.S.Afff9")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("FLDCONC.S.Afff8")) { + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads OverrunCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0006")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestThReadsOverrunCountAttributeValueFromDut_21(); break; } @@ -30798,24 +30779,6 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -30829,7 +30792,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 22; chip::Optional mNodeId; chip::Optional mCluster; @@ -30844,306 +30807,215 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenFldconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FLDCONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenFldconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FLDCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenFldconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FLDCONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenFldconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FLDCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenFldconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FLDCONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenFldconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FLDCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenFldconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FLDCONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenFldconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FLDCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenFldconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FLDCONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenFldconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FLDCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenFldconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FLDCONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenFldconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FLDCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } NextTest(); }]; @@ -31151,22 +31023,26 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute Uncertainty in AttributeList Error: %@", err); + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } NextTest(); }]; @@ -31174,161 +31050,151 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_16() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check the optional attribute Uncertainty is excluded from AttributeList when FLDCONC.S.A0007 is not set Error: " - @"%@", - err); + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull PacketRxCountValue; - CHIP_ERROR - TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + CHIP_ERROR TestThReadsPacketRxCountAttributeValueFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue and " - @"Measurement Unit in AttributeList Error: %@", - err); + [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PacketRxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + { + PacketRxCountValue = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull PacketTxCountValue; - CHIP_ERROR - TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_18() + CHIP_ERROR TestThReadsPacketTxCountAttributeValueFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are excluded " - @"from AttributeList when FLDCONC.S.F00 (MEA) is not set Error: %@", - err); + [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PacketTxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 8UL)); + { + PacketTxCountValue = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull TxErrCountValue; - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestThReadsTxErrCountAttributeValueFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList " - @"Error: %@", - err); + [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + { + TxErrCountValue = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CollisionCountValue; - CHIP_ERROR TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_20() + CHIP_ERROR TestThReadsCollisionCountAttributeValueFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when FLDCONC.S.F04 " - @"(PEA) is not set Error: %@", - err); + [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 4UL)); + { + CollisionCountValue = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull OverrunCountValue; - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestThReadsOverrunCountAttributeValueFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - @"AttributeList Error: %@", - err); + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + { + OverrunCountValue = value; + } NextTest(); }]; @@ -31336,151 +31202,106 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_22() + CHIP_ERROR TestSendsResetCountsCommand_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - @"FLDCONC.S.F05 (AVG) is not set Error: %@", - err); + [cluster resetCountsWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Sends ResetCounts command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 6UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestThReadsPacketRxCountAttributeValueFromDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attribute LevelValue in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_24() + CHIP_ERROR TestThReadsPacketTxCountAttributeValueFromDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is not set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 10UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeEventList_25() + CHIP_ERROR TestThReadsTxErrCountAttributeValueFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintMaxValue("txErrCount", [value unsignedLongLongValue], TxErrCountValue)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestThReadsCollisionCountAttributeValueFromDut_20() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintMaxValue("collisionCount", [value unsignedLongLongValue], CollisionCountValue)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestThReadsOverrunCountAttributeValueFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintMaxValue("overrunCount", [value unsignedLongLongValue], OverrunCountValue)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -31488,11 +31309,11 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } }; -class Test_TC_FLDCONC_2_1 : public TestCommandBridge { +class Test_TC_FLW_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FLDCONC_2_1() - : TestCommandBridge("Test_TC_FLDCONC_2_1") + Test_TC_FLW_1_1() + : TestCommandBridge("Test_TC_FLW_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -31502,7 +31323,7 @@ class Test_TC_FLDCONC_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_FLDCONC_2_1() {} + ~Test_TC_FLW_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31510,11 +31331,11 @@ class Test_TC_FLDCONC_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLDCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLDCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31531,84 +31352,90 @@ class Test_TC_FLDCONC_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MinMeasuredValue attribute.\n"); - if (ShouldSkip("FLDCONC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + if (ShouldSkip("FLW.S.Afffd")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMinMeasuredValueAttribute_1(); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the MaxMeasuredValue attribute.\n"); - if (ShouldSkip("FLDCONC.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("FLW.S.Afffc")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the MeasuredValue attribute.\n"); - if (ShouldSkip("FLDCONC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("FLW.S.Afffb")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasuredValueAttribute_3(); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the PeakMeasuredValue attribute.\n"); - if (ShouldSkip("FLDCONC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(Tolerance) in AttributeList\n"); + if (ShouldSkip("FLW.S.A0003 && FLW.S.Afffb")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueAttribute_4(); + err = TestReadTheOptionalAttributeToleranceInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the DUT the PeakMeasuredValueWindow attribute.\n"); - if (ShouldSkip("FLDCONC.S.A0004")) { + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list " + "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " + "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " + "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && FLW.S.Afffb")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5(); + err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the AverageMeasuredValue attribute.\n"); - if (ShouldSkip("FLDCONC.S.A0005")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " + "the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && FLW.S.Afffa")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6(); + err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the AverageMeasuredValueWindow attribute.\n"); - if (ShouldSkip("FLDCONC.S.A0006")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && FLW.S.Afff9")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7(); + err = TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the MeasurementUnit attribute.\n"); - if (ShouldSkip("FLDCONC.S.A0008")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasurementUnitAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the MeasurementMedium attribute.\n"); - if (ShouldSkip("FLDCONC.S.A0009")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasurementMediumAttribute_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads from the DUT the LevelValue attribute.\n"); - if (ShouldSkip("FLDCONC.S.A000a")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && FLW.S.Afff8")) { NextTest(); return; } - err = TestThReadsFromTheDutTheLevelValueAttribute_10(); + err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); break; } @@ -31648,12 +31475,6 @@ class Test_TC_FLDCONC_2_1 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -31667,7 +31488,7 @@ class Test_TC_FLDCONC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -31681,87 +31502,77 @@ class Test_TC_FLDCONC_2_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMinMeasuredValueAttribute_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MinMeasuredValue attribute. Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value floatValue], 0.0f)); - } { - MinMeasuredValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MaxMeasuredValue attribute. Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value floatValue], MinMeasuredValue)); - } { - MaxMeasuredValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasuredValue attribute. Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("measuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value floatValue], MaxMeasuredValue)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -31769,26 +31580,20 @@ class Test_TC_FLDCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueAttribute_4() + CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValue attribute. Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("peakMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValue", [value floatValue], MaxMeasuredValue)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -31796,74 +31601,197 @@ class Test_TC_FLDCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5() + CHIP_ERROR + TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValueWindow attribute. Error: %@", err); + CHIP_ERROR + TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() + { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - VerifyOrReturn(CheckConstraintType("peakMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValueWindow", [value unsignedIntValue], 604800UL)); + CHIP_ERROR + TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + { - NextTest(); - }]; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR + TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } +}; - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6() +class Test_TC_FLW_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_FLW_2_1() + : TestCommandBridge("Test_TC_FLW_2_1") + , mTestIndex(0) { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + ~Test_TC_FLW_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValue attribute. Error: %@", err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_2_1\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - if (value != nil) { + Wait(); - VerifyOrReturn(CheckConstraintType("averageMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValue", [value floatValue], MaxMeasuredValue)); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: MinMeasuredValue\n"); + if (ShouldSkip("FLW.S.A0001")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeMinMeasuredValue_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MaxMeasuredValue\n"); + if (ShouldSkip("FLW.S.A0002")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeMaxMeasuredValue_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute: MeasuredValue\n"); + if (ShouldSkip("FLW.S.A0000")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeMeasuredValue_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the Tolerance attribute\n"); + if (ShouldSkip("FLW.S.A0003")) { + NextTest(); + return; } + err = TestThReadsFromTheDutTheToleranceAttribute_4(); + break; + } - NextTest(); - }]; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } - return CHIP_NO_ERROR; + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 5; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7() + CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValueWindow attribute. Error: %@", err); + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MinMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("averageMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValueWindow", [value unsignedIntValue], 604800UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65533U)); + } NextTest(); }]; @@ -31871,23 +31799,24 @@ class Test_TC_FLDCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementUnitAttribute_8() + CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementUnit attribute. Error: %@", err); + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MaxMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("measurementUnit", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementUnit", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementUnit", [value unsignedCharValue], 7U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65534U)); + } NextTest(); }]; @@ -31895,23 +31824,24 @@ class Test_TC_FLDCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementMediumAttribute_9() + CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementMedium attribute. Error: %@", err); + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("measurementMedium", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementMedium", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementMedium", [value unsignedCharValue], 2U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65535U)); + } NextTest(); }]; @@ -31919,23 +31849,21 @@ class Test_TC_FLDCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheLevelValueAttribute_10() + CHIP_ERROR TestThReadsFromTheDutTheToleranceAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the LevelValue attribute. Error: %@", err); + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the Tolerance attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("levelValue", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("levelValue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("levelValue", [value unsignedCharValue], 4U)); + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); NextTest(); }]; @@ -31944,11 +31872,11 @@ class Test_TC_FLDCONC_2_1 : public TestCommandBridge { } }; -class Test_TC_NDOCONC_1_1 : public TestCommandBridge { +class Test_TC_FLABEL_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_NDOCONC_1_1() - : TestCommandBridge("Test_TC_NDOCONC_1_1") + Test_TC_FLABEL_1_1() + : TestCommandBridge("Test_TC_FLABEL_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -31958,7 +31886,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_NDOCONC_1_1() {} + ~Test_TC_FLABEL_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31966,11 +31894,11 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_NDOCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLABEL_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_NDOCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLABEL_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31987,244 +31915,428 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("NDOCONC.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + if (ShouldSkip("FLABEL.S.Afffd")) { NextTest(); return; } - err = TestReadTheGlobalAttributeClusterRevision_1(); + err = TestThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Given NDOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip("FLABEL.S.Afffc")) { NextTest(); return; } - err = TestGivenNdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Given NDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + if (ShouldSkip("FLABEL.S.Afffb")) { NextTest(); return; } - err = TestGivenNdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given NDOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list " + "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " + "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " + "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afffb")) { NextTest(); return; } - err = TestGivenNdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); break; case 5: ChipLogProgress(chipTool, - " ***** Test Step 5 : Given NDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F01")) { + " ***** Test Step 5 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " + "the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afffa")) { NextTest(); return; } - err = TestGivenNdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given NDOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F02")) { - NextTest(); - return; - } - err = TestGivenNdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); - break; - case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Given NDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F02")) { - NextTest(); - return; - } - err = TestGivenNdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Given NDOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F03")) { + " ***** Test Step 6 : TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afff9")) { NextTest(); return; } - err = TestGivenNdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; - case 9: + case 7: ChipLogProgress(chipTool, - " ***** Test Step 9 : Given NDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F03")) { + " ***** Test Step 7 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afff8")) { NextTest(); return; } - err = TestGivenNdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Given NDOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F04")) { - NextTest(); - return; - } - err = TestGivenNdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Given NDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F04")) { - NextTest(); - return; - } - err = TestGivenNdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Given NDOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F05")) { - NextTest(); - return; - } - err = TestGivenNdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Given NDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F05")) { - NextTest(); - return; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 8; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - err = TestGivenNdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAttributeListFromDut_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; + +class Test_TC_FAN_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_FAN_1_1() + : TestCommandBridge("Test_TC_FAN_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_FAN_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb")) { + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_14(); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.A0007 && NDOCONC.S.F00")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip(" !FAN.S.F00 && !FAN.S.F01 && !FAN.S.F02 && !FAN.S.F03 && !FAN.S.F04 && !FAN.S.F05 ")) { NextTest(); return; } - err = TestReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Check the optional attribute Uncertainty is excluded from AttributeList when " - "NDOCONC.S.A0007 is not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.A0007")) { + case 3: + ChipLogProgress( + chipTool, " ***** Test Step 3 : Given FAN.S.F00(Condition) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("FAN.S.F00")) { NextTest(); return; } - err = TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_16(); + err = TestGivenFANSF00ConditionEnsureFeaturemapHasTheCorrectBitSet_3(); break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F00")) { + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Given FAN.S.F01(Warning) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("FAN.S.F01")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestGivenFANSF01WarningEnsureFeaturemapHasTheCorrectBitSet_4(); break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when NDOCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F00")) { + case 5: + ChipLogProgress( + chipTool, " ***** Test Step 5 : Given FAN.S.F02(Condition) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("FAN.S.F02")) { NextTest(); return; } - err = TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_18(); + err = TestGivenFANSF02ConditionEnsureFeaturemapHasTheCorrectBitSet_5(); break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow " - "in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F04")) { + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Given FAN.S.F03(Warning) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("FAN.S.F03")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestGivenFANSF03WarningEnsureFeaturemapHasTheCorrectBitSet_6(); break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "NDOCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F04")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Given FAN.S.F04(Warning) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("FAN.S.F04")) { NextTest(); return; } - err = TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_20(); + err = TestGivenFANSF04WarningEnsureFeaturemapHasTheCorrectBitSet_7(); break; - case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F05")) { + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Given FAN.S.F05(Warning) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("FAN.S.F05")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestGivenFANSF05WarningEnsureFeaturemapHasTheCorrectBitSet_8(); break; - case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when NDOCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F05")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_9(); + break; + case 10: + ChipLogProgress( + chipTool, " ***** Test Step 10 : Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList\n"); + if (ShouldSkip("FAN.S.F00")) { NextTest(); return; } - err = TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_22(); + err = TestReadTheFeatureDependentFansf00SpdAttributeInAttributeList_10(); break; - case 23: + case 11: ChipLogProgress( - chipTool, " ***** Test Step 23 : Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F01")) { + chipTool, " ***** Test Step 11 : Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList\n"); + if (ShouldSkip("FAN.S.F02")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); + err = TestReadTheFeatureDependentFansf02rckAttributeInAttributeList_11(); break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F01")) { + case 12: + ChipLogProgress( + chipTool, " ***** Test Step 12 : Read the feature dependent FAN.S.F03(WND) attribute in AttributeList\n"); + if (ShouldSkip("FAN.S.F03")) { NextTest(); return; } - err = TestCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_24(); + err = TestReadTheFeatureDependentFansf03wndAttributeInAttributeList_12(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read the global attribute: EventList\n"); - if (ShouldSkip("NDOCONC.S.Afffa")) { + case 13: + ChipLogProgress( + chipTool, " ***** Test Step 13 : Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList\n"); + if (ShouldSkip("FAN.S.F05")) { NextTest(); return; } - err = TestReadTheGlobalAttributeEventList_25(); + err = TestReadTheFeatureDependentFansf05dirAttributeInAttributeList_13(); break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("NDOCONC.S.Afff9")) { + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip(" !FAN.S.C00.Rsp ")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestReadTheGlobalAttributeAcceptedCommandList_14(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("NDOCONC.S.Afff8")) { + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional command (ResetCondition) in AcceptedCommandList\n"); + if (ShouldSkip("FAN.S.C00.Rsp")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestReadTheOptionalCommandResetConditionInAcceptedCommandList_15(); break; } @@ -32285,42 +32397,6 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -32334,7 +32410,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -32352,147 +32428,29 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenNdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given NDOCONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenNdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given NDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenNdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given NDOCONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenNdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given NDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestGivenNdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given NDOCONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenNdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given NDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); @@ -32501,17 +32459,15 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenNdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestGivenFANSF00ConditionEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given NDOCONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); + NSLog(@"Given FAN.S.F00(Condition) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32522,17 +32478,15 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenNdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestGivenFANSF01WarningEnsureFeaturemapHasTheCorrectBitSet_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given NDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Given FAN.S.F01(Warning) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32543,17 +32497,15 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenNdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestGivenFANSF02ConditionEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given NDOCONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); + NSLog(@"Given FAN.S.F02(Condition) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32564,17 +32516,15 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenNdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestGivenFANSF03WarningEnsureFeaturemapHasTheCorrectBitSet_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given NDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Given FAN.S.F03(Warning) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32585,17 +32535,15 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenNdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestGivenFANSF04WarningEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given NDOCONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); + NSLog(@"Given FAN.S.F04(Warning) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32606,17 +32554,15 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenNdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestGivenFANSF05WarningEnsureFeaturemapHasTheCorrectBitSet_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given NDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Given FAN.S.F05(Warning) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32627,13 +32573,11 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -32642,7 +32586,10 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -32656,182 +32603,20 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeUncertaintyInAttributeList_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute Uncertainty in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check the optional attribute Uncertainty is excluded from AttributeList when NDOCONC.S.A0007 is not set Error: " - @"%@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue and " - @"Measurement Unit in AttributeList Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are excluded " - @"from AttributeList when NDOCONC.S.F00 (MEA) is not set Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 8UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestReadTheFeatureDependentFansf00SpdAttributeInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList " - @"Error: %@", - err); + NSLog(@"Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when NDOCONC.S.F04 " - @"(PEA) is not set Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 4UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - @"AttributeList Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); @@ -32841,26 +32626,21 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_22() + CHIP_ERROR TestReadTheFeatureDependentFansf02rckAttributeInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - @"NDOCONC.S.F05 (AVG) is not set Error: %@", - err); + NSLog(@"Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); NextTest(); }]; @@ -32868,21 +32648,20 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestReadTheFeatureDependentFansf03wndAttributeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attribute LevelValue in AttributeList Error: %@", err); + NSLog(@"Read the feature dependent FAN.S.F03(WND) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); NextTest(); @@ -32891,62 +32670,32 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_24() + CHIP_ERROR TestReadTheFeatureDependentFansf05dirAttributeInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is not set Error: %@", err); + NSLog(@"Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 10UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_25() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -32966,26 +32715,21 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestReadTheOptionalCommandResetConditionInAcceptedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command (ResetCondition) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -32993,11 +32737,11 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } }; -class Test_TC_NDOCONC_2_1 : public TestCommandBridge { +class Test_TC_FAN_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_NDOCONC_2_1() - : TestCommandBridge("Test_TC_NDOCONC_2_1") + Test_TC_FAN_2_1() + : TestCommandBridge("Test_TC_FAN_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -33007,7 +32751,7 @@ class Test_TC_NDOCONC_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_NDOCONC_2_1() {} + ~Test_TC_FAN_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -33015,11 +32759,11 @@ class Test_TC_NDOCONC_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_NDOCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_NDOCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -33036,84 +32780,36 @@ class Test_TC_NDOCONC_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MinMeasuredValue attribute.\n"); - if (ShouldSkip("NDOCONC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the the FanMode attribute\n"); + if (ShouldSkip("FAN.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMinMeasuredValueAttribute_1(); + err = TestThReadsFromTheDutTheTheFanModeAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the MaxMeasuredValue attribute.\n"); - if (ShouldSkip("NDOCONC.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the the FanModeSequence attribute\n"); + if (ShouldSkip("FAN.S.A0001")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2(); + err = TestThReadsFromTheDutTheTheFanModeSequenceAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the MeasuredValue attribute.\n"); - if (ShouldSkip("NDOCONC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the the PercentSetting attribute\n"); + if (ShouldSkip("FAN.S.A0002")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasuredValueAttribute_3(); + err = TestThReadsFromTheDutTheThePercentSettingAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the PeakMeasuredValue attribute.\n"); - if (ShouldSkip("NDOCONC.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutThePeakMeasuredValueAttribute_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the DUT the PeakMeasuredValueWindow attribute.\n"); - if (ShouldSkip("NDOCONC.S.A0004")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the AverageMeasuredValue attribute.\n"); - if (ShouldSkip("NDOCONC.S.A0005")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the AverageMeasuredValueWindow attribute.\n"); - if (ShouldSkip("NDOCONC.S.A0006")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the MeasurementUnit attribute.\n"); - if (ShouldSkip("NDOCONC.S.A0008")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasurementUnitAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the MeasurementMedium attribute.\n"); - if (ShouldSkip("NDOCONC.S.A0009")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasurementMediumAttribute_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads from the DUT the LevelValue attribute.\n"); - if (ShouldSkip("NDOCONC.S.A000a")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the the PercentCurrent attribute\n"); + if (ShouldSkip("FAN.S.A0003")) { NextTest(); return; } - err = TestThReadsFromTheDutTheLevelValueAttribute_10(); + err = TestThReadsFromTheDutTheThePercentCurrentAttribute_4(); break; } @@ -33141,24 +32837,6 @@ class Test_TC_NDOCONC_2_1 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -33172,7 +32850,7 @@ class Test_TC_NDOCONC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -33186,60 +32864,44 @@ class Test_TC_NDOCONC_2_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMinMeasuredValueAttribute_1() + CHIP_ERROR TestThReadsFromTheDutTheTheFanModeAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MinMeasuredValue attribute. Error: %@", err); + [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the the FanMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value floatValue], 0.0f)); - } - { - MinMeasuredValue = value; - } + VerifyOrReturn(CheckConstraintType("fanMode", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("fanMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("fanMode", [value unsignedCharValue], 6U)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2() + CHIP_ERROR TestThReadsFromTheDutTheTheFanModeSequenceAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MaxMeasuredValue attribute. Error: %@", err); + [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the the FanModeSequence attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value floatValue], MinMeasuredValue)); - } - { - MaxMeasuredValue = value; - } + VerifyOrReturn(CheckConstraintType("fanModeSequence", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("fanModeSequence", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("fanModeSequence", [value unsignedCharValue], 5U)); NextTest(); }]; @@ -33247,25 +32909,23 @@ class Test_TC_NDOCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_3() + CHIP_ERROR TestThReadsFromTheDutTheThePercentSettingAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasuredValue attribute. Error: %@", err); + [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the the PercentSetting attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("measuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value floatValue], MaxMeasuredValue)); + VerifyOrReturn(CheckConstraintType("percentSetting", "Percent", "Percent")); + VerifyOrReturn(CheckConstraintMinValue("percentSetting", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("percentSetting", [value unsignedCharValue], 100U)); } NextTest(); @@ -33274,125 +32934,165 @@ class Test_TC_NDOCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueAttribute_4() + CHIP_ERROR TestThReadsFromTheDutTheThePercentCurrentAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValue attribute. Error: %@", err); + [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the the PercentCurrent attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("peakMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValue", [value floatValue], MaxMeasuredValue)); - } + VerifyOrReturn(CheckConstraintType("percentCurrent", "Percent", "Percent")); + VerifyOrReturn(CheckConstraintMinValue("percentCurrent", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("percentCurrent", [value unsignedCharValue], 100U)); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5() +class Test_TC_FAN_2_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_FAN_2_2() + : TestCommandBridge("Test_TC_FAN_2_2") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValueWindow attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("peakMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValueWindow", [value unsignedIntValue], 604800UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6() - { + ~Test_TC_FAN_2_2() {} - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValue attribute. Error: %@", err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_2_2\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - if (value != nil) { + Wait(); - VerifyOrReturn(CheckConstraintType("averageMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValue", [value floatValue], MaxMeasuredValue)); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the the SpeedMax attribute\n"); + if (ShouldSkip("FAN.S.A0004")) { + NextTest(); + return; } + err = TestThReadsFromTheDutTheTheSpeedMaxAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the the SpeedSetting attribute\n"); + if (ShouldSkip("FAN.S.A0005 && FAN.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheTheSpeedSettingAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the the SpeedCurrent attribute\n"); + if (ShouldSkip("FAN.S.A0006 && FAN.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheTheSpeedCurrentAttribute_3(); + break; + } - NextTest(); - }]; - - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValueWindow attribute. Error: %@", err); + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 4; - VerifyOrReturn(CheckConstraintType("averageMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValueWindow", [value unsignedIntValue], 604800UL)); + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } + NSNumber * _Nonnull SpeedMaxValue; - CHIP_ERROR TestThReadsFromTheDutTheMeasurementUnitAttribute_8() + CHIP_ERROR TestThReadsFromTheDutTheTheSpeedMaxAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementUnit attribute. Error: %@", err); + [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the the SpeedMax attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("measurementUnit", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementUnit", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementUnit", [value unsignedCharValue], 7U)); + VerifyOrReturn(CheckConstraintType("speedMax", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("speedMax", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("speedMax", [value unsignedCharValue], 100U)); + { + SpeedMaxValue = value; + } NextTest(); }]; @@ -33400,23 +33100,24 @@ class Test_TC_NDOCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementMediumAttribute_9() + CHIP_ERROR TestThReadsFromTheDutTheTheSpeedSettingAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementMedium attribute. Error: %@", err); + [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the the SpeedSetting attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("measurementMedium", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementMedium", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementMedium", [value unsignedCharValue], 2U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("speedSetting", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("speedSetting", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("speedSetting", [value unsignedCharValue], SpeedMaxValue)); + } NextTest(); }]; @@ -33424,23 +33125,21 @@ class Test_TC_NDOCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheLevelValueAttribute_10() + CHIP_ERROR TestThReadsFromTheDutTheTheSpeedCurrentAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the LevelValue attribute. Error: %@", err); + [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the the SpeedCurrent attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("levelValue", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("levelValue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("levelValue", [value unsignedCharValue], 4U)); + VerifyOrReturn(CheckConstraintType("speedCurrent", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("speedCurrent", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("speedCurrent", [value unsignedCharValue], SpeedMaxValue)); NextTest(); }]; @@ -33449,11 +33148,11 @@ class Test_TC_NDOCONC_2_1 : public TestCommandBridge { } }; -class Test_TC_OZCONC_1_1 : public TestCommandBridge { +class Test_TC_FAN_2_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OZCONC_1_1() - : TestCommandBridge("Test_TC_OZCONC_1_1") + Test_TC_FAN_2_3() + : TestCommandBridge("Test_TC_FAN_2_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -33463,7 +33162,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_OZCONC_1_1() {} + ~Test_TC_FAN_2_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -33471,11 +33170,11 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OZCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_2_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OZCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_2_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -33492,242 +33191,408 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("OZCONC.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the the RockSupport attribute\n"); + if (ShouldSkip("FAN.S.A0007")) { NextTest(); return; } - err = TestReadTheGlobalAttributeClusterRevision_1(); + err = TestThReadsFromTheDutTheTheRockSupportAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Given OZCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F00")) { - NextTest(); - return; - } - err = TestGivenOzconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Given OZCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F00")) { - NextTest(); - return; - } - err = TestGivenOzconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given OZCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F01")) { - NextTest(); - return; - } - err = TestGivenOzconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); - break; - case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : Given OZCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F01")) { - NextTest(); - return; - } - err = TestGivenOzconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given OZCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the the RockSetting attribute\n"); + if (ShouldSkip("FAN.S.A0008")) { NextTest(); return; } - err = TestGivenOzconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestThReadsFromTheDutTheTheRockSettingAttribute_2(); break; - case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Given OZCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F02")) { - NextTest(); - return; - } - err = TestGivenOzconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Given OZCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F03")) { - NextTest(); - return; - } - err = TestGivenOzconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : Given OZCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F03")) { - NextTest(); - return; - } - err = TestGivenOzconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Given OZCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F04")) { - NextTest(); - return; - } - err = TestGivenOzconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsFromTheDutTheTheRockSupportAttribute_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the the RockSupport attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("rockSupport", "bitmap8", "bitmap8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheTheRockSettingAttribute_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the the RockSetting attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("rockSetting", "bitmap8", "bitmap8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_FAN_2_4 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_FAN_2_4() + : TestCommandBridge("Test_TC_FAN_2_4") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_FAN_2_4() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_2_4\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_2_4\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Given OZCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F04")) { + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the the WindSupport attribute\n"); + if (ShouldSkip("FAN.S.A0009")) { NextTest(); return; } - err = TestGivenOzconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestThReadsFromTheDutTheTheWindSupportAttribute_1(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Given OZCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F05")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the the WindSetting attribute\n"); + if (ShouldSkip("FAN.S.A000A")) { NextTest(); return; } - err = TestGivenOzconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestThReadsFromTheDutTheTheWindSettingAttribute_2(); break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Given OZCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F05")) { - NextTest(); - return; - } - err = TestGivenOzconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb")) { + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsFromTheDutTheTheWindSupportAttribute_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the the WindSupport attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("windSupport", "bitmap8", "bitmap8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheTheWindSettingAttribute_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the the WindSetting attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("windSetting", "bitmap8", "bitmap8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_FAN_3_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_FAN_3_1() + : TestCommandBridge("Test_TC_FAN_3_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigPercentSetting", 0, UINT8_MAX, &mConfigPercentSetting); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_FAN_3_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_3_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_3_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress( + chipTool, " ***** Test Step 1 : Step 2a: TH writes a supported FanMode attribute that is other than off to DUT\n"); + if (ShouldSkip("FAN.S.A0000")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_14(); + err = TestStep2aThWritesASupportedFanModeAttributeThatIsOtherThanOffToDut_1(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.A0007 && OZCONC.S.F00")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 1000ms\n"); + if (ShouldSkip("FAN.S.A0000")) { NextTest(); return; } - err = TestReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestWait1000ms_2(); break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Check the optional attribute Uncertainty is excluded from AttributeList when OZCONC.S.A0007 " - "is not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.A0007")) { + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 2b: TH reads from the DUT the the FanMode attribute\n"); + if (ShouldSkip("FAN.S.A0000")) { NextTest(); return; } - err = TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_16(); + err = TestStep2bThReadsFromTheDutTheTheFanModeAttribute_3(); break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F00")) { + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 2.1a: TH writes the Off value of FanMode attribute to DUT\n"); + if (ShouldSkip("FAN.S.A0000")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestStep21aThWritesTheOffValueOfFanModeAttributeToDut_4(); break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when OZCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F00")) { + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1000ms\n"); + if (ShouldSkip("FAN.S.A0000")) { NextTest(); return; } - err = TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_18(); + err = TestWait1000ms_5(); break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow " - "in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F04")) { + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 2.1b: TH reads from the DUT the PercentSetting attribute\n"); + if (ShouldSkip("FAN.S.A0002")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestStep21bThReadsFromTheDutThePercentSettingAttribute_6(); break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "OZCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F04")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 2.1c: TH reads from the DUT the PercentCurrent attribute\n"); + if (ShouldSkip("FAN.S.A0003")) { NextTest(); return; } - err = TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_20(); + err = TestStep21cThReadsFromTheDutThePercentCurrentAttribute_7(); break; - case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F05")) { + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 3a: TH writes PercentSetting attribute a non-zero value to DUT\n"); + if (ShouldSkip("FAN.S.A0002")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestStep3aThWritesPercentSettingAttributeANonZeroValueToDut_8(); break; - case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when OZCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F05")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); + if (ShouldSkip("FAN.S.A0002")) { NextTest(); return; } - err = TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_22(); + err = TestWait1000ms_9(); break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F01")) { + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 3b: TH reads from the DUT the PercentCurrent attribute\n"); + if (ShouldSkip("FAN.S.A0003")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); + err = TestStep3bThReadsFromTheDutThePercentCurrentAttribute_10(); break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F01")) { + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 3c: TH reads from the DUT the PercentSetting attribute\n"); + if (ShouldSkip("FAN.S.A0002")) { NextTest(); return; } - err = TestCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_24(); + err = TestStep3cThReadsFromTheDutThePercentSettingAttribute_11(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read the global attribute: EventList\n"); - if (ShouldSkip("OZCONC.S.Afffa")) { + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 3.1a: TH writes PercentSetting attribute a zero value to DUT\n"); + if (ShouldSkip("FAN.S.A0002")) { NextTest(); return; } - err = TestReadTheGlobalAttributeEventList_25(); + err = TestStep31aThWritesPercentSettingAttributeAZeroValueToDut_12(); break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("OZCONC.S.Afff9")) { + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 1000ms\n"); + if (ShouldSkip("FAN.S.A0002")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestWait1000ms_13(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("OZCONC.S.Afff8")) { + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 3.1b: TH reads from the DUT the the FanMode attribute\n"); + if (ShouldSkip("FAN.S.A0000")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestStep31bThReadsFromTheDutTheTheFanModeAttribute_14(); break; } @@ -33785,45 +33650,6 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -33837,14 +33663,15 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 15; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mConfigPercentSetting; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -33852,306 +33679,186 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenOzconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep2aThWritesASupportedFanModeAttributeThatIsOtherThanOffToDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given OZCONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); + id fanModeArgument; + fanModeArgument = [NSNumber numberWithUnsignedChar:3U]; + [cluster + writeAttributeFanModeWithValue:fanModeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Step 2a: TH writes a supported FanMode attribute that is other than off to DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenOzconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestWait1000ms_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given OZCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestGivenOzconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep2bThReadsFromTheDutTheTheFanModeAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given OZCONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2b: TH reads from the DUT the the FanMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenOzconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given OZCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FanMode", actualValue, 3U)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenOzconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep21aThWritesTheOffValueOfFanModeAttributeToDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given OZCONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); + id fanModeArgument; + fanModeArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeFanModeWithValue:fanModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 2.1a: TH writes the Off value of FanMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenOzconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestWait1000ms_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given OZCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestGivenOzconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep21bThReadsFromTheDutThePercentSettingAttribute_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given OZCONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); + [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2.1b: TH reads from the DUT the PercentSetting attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenOzconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given OZCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("PercentSetting", actualValue)); + VerifyOrReturn(CheckValue("PercentSetting", actualValue, 0U)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenOzconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep21cThReadsFromTheDutThePercentCurrentAttribute_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given OZCONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); + [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2.1c: TH reads from the DUT the PercentCurrent attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenOzconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given OZCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("PercentCurrent", actualValue, 0U)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenOzconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3aThWritesPercentSettingAttributeANonZeroValueToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given OZCONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); + id percentSettingArgument; + percentSettingArgument = mConfigPercentSetting.HasValue() ? [NSNumber numberWithUnsignedChar:mConfigPercentSetting.Value()] + : [NSNumber numberWithUnsignedChar:30U]; + [cluster + writeAttributePercentSettingWithValue:percentSettingArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 3a: TH writes PercentSetting attribute a non-zero value to DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenOzconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestWait1000ms_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given OZCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep3bThReadsFromTheDutThePercentCurrentAttribute_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3b: TH reads from the DUT the PercentCurrent attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue( + "PercentCurrent", actualValue, mConfigPercentSetting.HasValue() ? mConfigPercentSetting.Value() : 30U)); + } NextTest(); }]; @@ -34159,22 +33866,24 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestStep3cThReadsFromTheDutThePercentSettingAttribute_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute Uncertainty in AttributeList Error: %@", err); + [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3c: TH reads from the DUT the PercentSetting attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("PercentSetting", actualValue)); + VerifyOrReturn(CheckValue( + "PercentSetting", actualValue, mConfigPercentSetting.HasValue() ? mConfigPercentSetting.Value() : 30U)); + } NextTest(); }]; @@ -34182,313 +33891,265 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_16() + CHIP_ERROR TestStep31aThWritesPercentSettingAttributeAZeroValueToDut_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog( - @"Check the optional attribute Uncertainty is excluded from AttributeList when OZCONC.S.A0007 is not set Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id percentSettingArgument; + percentSettingArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster + writeAttributePercentSettingWithValue:percentSettingArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Step 3.1a: TH writes PercentSetting attribute a zero value to DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + CHIP_ERROR TestWait1000ms_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue and " - @"Measurement Unit in AttributeList Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR - TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_18() + CHIP_ERROR TestStep31bThReadsFromTheDutTheTheFanModeAttribute_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are excluded " - @"from AttributeList when OZCONC.S.F00 (MEA) is not set Error: %@", - err); + [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3.1b: TH reads from the DUT the the FanMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 8UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FanMode", actualValue, 0U)); + } NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() +class Test_TC_FAN_3_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_FAN_3_2() + : TestCommandBridge("Test_TC_FAN_3_2") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigSpeedSetting", 0, UINT8_MAX, &mConfigSpeedSetting); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when OZCONC.S.F04 (PEA) " - @"is not set Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 4UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } + ~Test_TC_FAN_3_2() {} - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - @"AttributeList Error: %@", - err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_3_2\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_3_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + Wait(); - NextTest(); - }]; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH writes SpeedSetting attribute a valid value to DUT\n"); + if (ShouldSkip("FAN.S.A0005")) { + NextTest(); + return; + } + err = TestStep2ThWritesSpeedSettingAttributeAValidValueToDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 1000ms\n"); + if (ShouldSkip("FAN.S.A0005")) { + NextTest(); + return; + } + err = TestWait1000ms_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads from the DUT the the SpeedSetting attribute\n"); + if (ShouldSkip("FAN.S.A0005")) { + NextTest(); + return; + } + err = TestStep3ThReadsFromTheDutTheTheSpeedSettingAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads from the DUT the the SpeedCurrent attribute\n"); + if (ShouldSkip("FAN.S.A0006")) { + NextTest(); + return; + } + err = TestStep4ThReadsFromTheDutTheTheSpeedCurrentAttribute_4(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR - TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_22() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - @"OZCONC.S.F05 (AVG) is not set Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 6UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attribute LevelValue in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 5; - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mConfigSpeedSetting; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_24() + CHIP_ERROR TestStep2ThWritesSpeedSettingAttributeAValidValueToDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is not set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id speedSettingArgument; + speedSettingArgument = mConfigSpeedSetting.HasValue() ? [NSNumber numberWithUnsignedChar:mConfigSpeedSetting.Value()] + : [NSNumber numberWithUnsignedChar:50U]; + [cluster + writeAttributeSpeedSettingWithValue:speedSettingArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 2: TH writes SpeedSetting attribute a valid value to DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 10UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_25() + CHIP_ERROR TestWait1000ms_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestStep3ThReadsFromTheDutTheTheSpeedSettingAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the the SpeedSetting attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValueNonNull("SpeedSetting", actualValue)); + VerifyOrReturn( + CheckValue("SpeedSetting", actualValue, mConfigSpeedSetting.HasValue() ? mConfigSpeedSetting.Value() : 50U)); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestStep4ThReadsFromTheDutTheTheSpeedCurrentAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: TH reads from the DUT the the SpeedCurrent attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn( + CheckValue("SpeedCurrent", actualValue, mConfigSpeedSetting.HasValue() ? mConfigSpeedSetting.Value() : 50U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -34496,21 +34157,22 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { } }; -class Test_TC_OZCONC_2_1 : public TestCommandBridge { +class Test_TC_FAN_3_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OZCONC_2_1() - : TestCommandBridge("Test_TC_OZCONC_2_1") + Test_TC_FAN_3_4() + : TestCommandBridge("Test_TC_FAN_3_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigWindSetting", 0, UINT8_MAX, &mConfigWindSetting); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_OZCONC_2_1() {} + ~Test_TC_FAN_3_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -34518,11 +34180,11 @@ class Test_TC_OZCONC_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OZCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_3_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OZCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_3_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -34535,88 +34197,32 @@ class Test_TC_OZCONC_2_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MinMeasuredValue attribute.\n"); - if (ShouldSkip("OZCONC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH writes WindSetting attribute a valid value to DUT\n"); + if (ShouldSkip("FAN.S.A0008")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMinMeasuredValueAttribute_1(); + err = TestStep2ThWritesWindSettingAttributeAValidValueToDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the MaxMeasuredValue attribute.\n"); - if (ShouldSkip("OZCONC.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 1000ms\n"); + if (ShouldSkip("FAN.S.A0008")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2(); + err = TestWait1000ms_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the MeasuredValue attribute.\n"); - if (ShouldSkip("OZCONC.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasuredValueAttribute_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the PeakMeasuredValue attribute.\n"); - if (ShouldSkip("OZCONC.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutThePeakMeasuredValueAttribute_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the DUT the PeakMeasuredValueWindow attribute.\n"); - if (ShouldSkip("OZCONC.S.A0004")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the AverageMeasuredValue attribute.\n"); - if (ShouldSkip("OZCONC.S.A0005")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the AverageMeasuredValueWindow attribute.\n"); - if (ShouldSkip("OZCONC.S.A0006")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the MeasurementUnit attribute.\n"); - if (ShouldSkip("OZCONC.S.A0008")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasurementUnitAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the MeasurementMedium attribute.\n"); - if (ShouldSkip("OZCONC.S.A0009")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasurementMediumAttribute_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads from the DUT the LevelValue attribute.\n"); - if (ShouldSkip("OZCONC.S.A000a")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads from the DUT the the WindSetting attribute\n"); + if (ShouldSkip("FAN.S.A0008")) { NextTest(); return; } - err = TestThReadsFromTheDutTheLevelValueAttribute_10(); + err = TestStep3ThReadsFromTheDutTheTheWindSettingAttribute_3(); break; } @@ -34641,27 +34247,6 @@ class Test_TC_OZCONC_2_1 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -34675,43 +34260,68 @@ class Test_TC_OZCONC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mConfigWindSetting; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMinMeasuredValueAttribute_1() + CHIP_ERROR TestStep2ThWritesWindSettingAttributeAValidValueToDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MinMeasuredValue attribute. Error: %@", err); + id windSettingArgument; + windSettingArgument = mConfigWindSetting.HasValue() ? [NSNumber numberWithUnsignedChar:mConfigWindSetting.Value()] + : [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeWindSettingWithValue:windSettingArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 2: TH writes WindSetting attribute a valid value to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1000ms_2() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep3ThReadsFromTheDutTheTheWindSettingAttribute_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the the WindSetting attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value floatValue], 0.0f)); - } { - MinMeasuredValue = value; + id actualValue = value; + VerifyOrReturn( + CheckValue("WindSetting", actualValue, mConfigWindSetting.HasValue() ? mConfigWindSetting.Value() : 1U)); } NextTest(); @@ -34719,84 +34329,212 @@ class Test_TC_OZCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nullable MaxMeasuredValue; +}; + +class Test_TC_CGEN_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CGEN_1_1() + : TestCommandBridge("Test_TC_CGEN_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_CGEN_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CGEN_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: EventList\n"); + NextTest(); + return; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 7; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } - CHIP_ERROR TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MaxMeasuredValue attribute. Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value floatValue], MinMeasuredValue)); - } { - MaxMeasuredValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_3() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasuredValue attribute. Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("measuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value floatValue], MaxMeasuredValue)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueAttribute_4() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValue attribute. Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("peakMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValue", [value floatValue], MaxMeasuredValue)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -34804,23 +34542,24 @@ class Test_TC_OZCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValueWindow attribute. Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("peakMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValueWindow", [value unsignedIntValue], 604800UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); NextTest(); }]; @@ -34828,50 +34567,258 @@ class Test_TC_OZCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValue attribute. Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CGEN_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CGEN_2_1() + : TestCommandBridge("Test_TC_CGEN_2_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_CGEN_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CGEN_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); - VerifyOrReturn(CheckConstraintType("averageMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValue", [value floatValue], MaxMeasuredValue)); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH1 reads the BreadCrumb Attribute from the DUT\n"); + if (ShouldSkip("CGEN.S.A0000")) { + NextTest(); + return; + } + err = TestTh1ReadsTheBreadCrumbAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH1 writes the BreadCrumb attribute as 1 to the DUT\n"); + if (ShouldSkip("CGEN.S.A0000")) { + NextTest(); + return; + } + err = TestTh1WritesTheBreadCrumbAttributeAs1ToTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH1 reads the BreadCrumb attribute from the DUT\n"); + if (ShouldSkip("CGEN.S.A0000")) { + NextTest(); + return; + } + err = TestTh1ReadsTheBreadCrumbAttributeFromTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH1 reads the RegulatoryConfig attribute from the DUT\n"); + if (ShouldSkip("CGEN.S.A0002")) { + NextTest(); + return; + } + err = TestTh1ReadsTheRegulatoryConfigAttributeFromTheDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH1 reads the LocationCapability attribute from the DUT\n"); + if (ShouldSkip("CGEN.S.A0003")) { + NextTest(); + return; + } + err = TestTh1ReadsTheLocationCapabilityAttributeFromTheDut_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH1 reads BasicCommissioningInfo attribute from DUT and Verify that the " + "BasicCommissioningInfo attribute has the following field: FailSafeExpiryLengthSeconds field value is within a " + "duration range of 0 to 65535\n"); + if (ShouldSkip("CGEN.S.A0001")) { + NextTest(); + return; + } + err = TestTh1ReadsBasicCommissioningInfoAttributeFromDutAndVerifyThatTheBasicCommissioningInfoAttributeHasTheFollowingFieldFailSafeExpiryLengthSecondsFieldValueIsWithinADurationRangeOf0To65535_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH1 reads SupportsConcurrentConnection attribute from the DUT\n"); + if (ShouldSkip("CGEN.S.A0004")) { + NextTest(); + return; } + err = TestTh1ReadsSupportsConcurrentConnectionAttributeFromTheDut_7(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 8; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestTh1ReadsTheBreadCrumbAttributeFromTheDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH1 reads the BreadCrumb Attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("breadcrumb", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7() + CHIP_ERROR TestTh1WritesTheBreadCrumbAttributeAs1ToTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id breadcrumbArgument; + breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; + [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH1 writes the BreadCrumb attribute as 1 to the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh1ReadsTheBreadCrumbAttributeFromTheDut_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValueWindow attribute. Error: %@", err); + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH1 reads the BreadCrumb attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("averageMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValueWindow", [value unsignedIntValue], 604800UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 1ULL)); + } NextTest(); }]; @@ -34879,23 +34826,22 @@ class Test_TC_OZCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementUnitAttribute_8() + CHIP_ERROR TestTh1ReadsTheRegulatoryConfigAttributeFromTheDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementUnit attribute. Error: %@", err); + [cluster readAttributeRegulatoryConfigWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH1 reads the RegulatoryConfig attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("measurementUnit", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementUnit", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementUnit", [value unsignedCharValue], 7U)); + VerifyOrReturn(CheckConstraintMinValue("regulatoryConfig", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("regulatoryConfig", [value unsignedCharValue], 2U)); NextTest(); }]; @@ -34903,23 +34849,22 @@ class Test_TC_OZCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementMediumAttribute_9() + CHIP_ERROR TestTh1ReadsTheLocationCapabilityAttributeFromTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementMedium attribute. Error: %@", err); + [cluster readAttributeLocationCapabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH1 reads the LocationCapability attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("measurementMedium", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementMedium", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementMedium", [value unsignedCharValue], 2U)); + VerifyOrReturn(CheckConstraintMinValue("locationCapability", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("locationCapability", [value unsignedCharValue], 2U)); NextTest(); }]; @@ -34927,24 +34872,46 @@ class Test_TC_OZCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheLevelValueAttribute_10() + CHIP_ERROR + TestTh1ReadsBasicCommissioningInfoAttributeFromDutAndVerifyThatTheBasicCommissioningInfoAttributeHasTheFollowingFieldFailSafeExpiryLengthSecondsFieldValueIsWithinADurationRangeOf0To65535_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the LevelValue attribute. Error: %@", err); + [cluster readAttributeBasicCommissioningInfoWithCompletion:^( + MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable err) { + NSLog( + @"TH1 reads BasicCommissioningInfo attribute from DUT and Verify that the BasicCommissioningInfo attribute has the " + @"following field: FailSafeExpiryLengthSeconds field value is within a duration range of 0 to 65535 Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("levelValue", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("levelValue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("levelValue", [value unsignedCharValue], 4U)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh1ReadsSupportsConcurrentConnectionAttributeFromTheDut_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH1 reads SupportsConcurrentConnection attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "boolean", "boolean")); NextTest(); }]; @@ -34952,11 +34919,11 @@ class Test_TC_OZCONC_2_1 : public TestCommandBridge { } }; -class Test_TC_PMHCONC_1_1 : public TestCommandBridge { +class Test_TC_DGGEN_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PMHCONC_1_1() - : TestCommandBridge("Test_TC_PMHCONC_1_1") + Test_TC_DGGEN_1_1() + : TestCommandBridge("Test_TC_DGGEN_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -34966,7 +34933,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PMHCONC_1_1() {} + ~Test_TC_DGGEN_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -34974,11 +34941,11 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PMHCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGGEN_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PMHCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGGEN_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -34996,243 +34963,169 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PMHCONC.S.Afffd")) { + if (ShouldSkip("DGGEN.S.Afffd")) { NextTest(); return; } err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Given PMHCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("DGGEN.S.Afffc")) { NextTest(); return; } - err = TestGivenPmhconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Given PMHCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("DGGEN.S.Afffb")) { NextTest(); return; } - err = TestGivenPmhconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given PMHCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read optional attribute(UpTime) in AttributeList\n"); + if (ShouldSkip("DGGEN.S.A0002 && DGGEN.S.Afffb")) { NextTest(); return; } - err = TestGivenPmhconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestReadOptionalAttributeUpTimeInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Given PMHCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Read optional attribute(TotalOperationalHours) in AttributeList\n"); + if (ShouldSkip("DGGEN.S.A0003 && DGGEN.S.Afffb")) { NextTest(); return; } - err = TestGivenPmhconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestReadOptionalAttributeTotalOperationalHoursInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given PMHCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Read optional attribute(BootReason) in AttributeList\n"); + if (ShouldSkip("DGGEN.S.A0004 && DGGEN.S.Afffb")) { NextTest(); return; } - err = TestGivenPmhconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestReadOptionalAttributeBootReasonInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Given PMHCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Read optional attribute(ActiveHardwareFaults) in AttributeList\n"); + if (ShouldSkip("DGGEN.S.A0005 && DGGEN.S.Afffb")) { NextTest(); return; } - err = TestGivenPmhconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestReadOptionalAttributeActiveHardwareFaultsInAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Given PMHCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Read optional attribute(ActiveRadioFaults) in AttributeList\n"); + if (ShouldSkip("DGGEN.S.A0006 && DGGEN.S.Afffb")) { NextTest(); return; } - err = TestGivenPmhconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestReadOptionalAttributeActiveRadioFaultsInAttributeList_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Given PMHCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Read optional attribute(ActiveNetworkFaults) in AttributeList\n"); + if (ShouldSkip("DGGEN.S.A0007 && DGGEN.S.Afffb")) { NextTest(); return; } - err = TestGivenPmhconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestReadOptionalAttributeActiveNetworkFaultsInAttributeList_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Given PMHCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list " + "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " + "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " + "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afffb")) { NextTest(); return; } - err = TestGivenPmhconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Given PMHCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F04")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: EventList\n"); + if (ShouldSkip("DGGEN.S.Afffa")) { NextTest(); return; } - err = TestGivenPmhconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); - break; + NextTest(); + return; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Given PMHCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F05")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Read optional event(HardwareFaultChange) in EventList\n"); + if (ShouldSkip("DGGEN.S.Afffa && DGGEN.S.E00")) { NextTest(); return; } - err = TestGivenPmhconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); - break; + NextTest(); + return; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Given PMHCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F05")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Read optional event(RadioFaultChange) in EventList\n"); + if (ShouldSkip("DGGEN.S.Afffa && DGGEN.S.E01")) { NextTest(); return; } - err = TestGivenPmhconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); - break; + NextTest(); + return; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Read optional event(NetworkFaultChange) in EventList\n"); + if (ShouldSkip("DGGEN.S.Afffa && DGGEN.S.E02")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_14(); - break; + NextTest(); + return; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.A0007 && PMHCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 15 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " + "the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afffa")) { NextTest(); return; } - err = TestReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15(); break; case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Check the optional attribute Uncertainty is excluded from AttributeList when " - "PMHCONC.S.A0007 is not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("DGGEN.S.Afff9")) { NextTest(); return; } - err = TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_16(); + err = TestReadTheGlobalAttributeAcceptedCommandList_16(); break; case 17: ChipLogProgress(chipTool, - " ***** Test Step 17 : Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F00")) { + " ***** Test Step 17 : TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " + "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " + "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " + "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " + "or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afff9")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when PMHCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F00")) { - NextTest(); - return; - } - err = TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_18(); - break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow " - "in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F04")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "PMHCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F04")) { - NextTest(); - return; - } - err = TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_20(); - break; - case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F05")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); - break; - case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when PMHCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F05")) { - NextTest(); - return; - } - err = TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F01")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); - break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F01")) { - NextTest(); - return; - } - err = TestCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read the global attribute: EventList\n"); - if (ShouldSkip("PMHCONC.S.Afffa")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeEventList_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PMHCONC.S.Afff9")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PMHCONC.S.Afff8")) { + " ***** Test Step 18 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afff8")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18(); break; } @@ -35302,33 +35195,6 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -35342,7 +35208,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -35361,9 +35227,9 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -35373,7 +35239,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -35383,250 +35249,24 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmhconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMHCONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmhconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMHCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmhconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMHCONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmhconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMHCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmhconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMHCONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmhconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMHCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmhconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMHCONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmhconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMHCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmhconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMHCONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmhconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMHCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmhconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMHCONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmhconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMHCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); @@ -35635,13 +35275,13 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -35650,7 +35290,9 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -35664,22 +35306,22 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestReadOptionalAttributeUpTimeInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute Uncertainty in AttributeList Error: %@", err); + NSLog(@"Read optional attribute(UpTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); }]; @@ -35687,24 +35329,22 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_16() + CHIP_ERROR TestReadOptionalAttributeTotalOperationalHoursInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check the optional attribute Uncertainty is excluded from AttributeList when PMHCONC.S.A0007 is not set Error: " - @"%@", - err); + NSLog(@"Read optional attribute(TotalOperationalHours) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -35712,28 +35352,22 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + CHIP_ERROR TestReadOptionalAttributeBootReasonInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue and " - @"Measurement Unit in AttributeList Error: %@", - err); + NSLog(@"Read optional attribute(BootReason) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); NextTest(); }]; @@ -35741,29 +35375,22 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_18() + CHIP_ERROR TestReadOptionalAttributeActiveHardwareFaultsInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are excluded " - @"from AttributeList when PMHCONC.S.F00 (MEA) is not set Error: %@", - err); + NSLog(@"Read optional attribute(ActiveHardwareFaults) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); NextTest(); }]; @@ -35771,25 +35398,22 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestReadOptionalAttributeActiveRadioFaultsInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList " - @"Error: %@", - err); + NSLog(@"Read optional attribute(ActiveRadioFaults) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); NextTest(); }]; @@ -35797,25 +35421,22 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_20() + CHIP_ERROR TestReadOptionalAttributeActiveNetworkFaultsInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when PMHCONC.S.F04 " - @"(PEA) is not set Error: %@", - err); + NSLog(@"Read optional attribute(ActiveNetworkFaults) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); NextTest(); }]; @@ -35823,75 +35444,44 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR + TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - @"AttributeList Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } CHIP_ERROR - TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_22() + TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - @"PMHCONC.S.F05 (AVG) is not set Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 6UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attribute LevelValue in AttributeList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); }]; @@ -35899,113 +35489,34 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_24() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is not set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 10UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_25() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR + TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR + TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } }; -class Test_TC_PMHCONC_2_1 : public TestCommandBridge { +class Test_TC_DGGEN_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PMHCONC_2_1() - : TestCommandBridge("Test_TC_PMHCONC_2_1") + Test_TC_DGGEN_2_1() + : TestCommandBridge("Test_TC_DGGEN_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -36015,7 +35526,7 @@ class Test_TC_PMHCONC_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PMHCONC_2_1() {} + ~Test_TC_DGGEN_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -36023,11 +35534,11 @@ class Test_TC_PMHCONC_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PMHCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGGEN_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PMHCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGGEN_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -36044,84 +35555,134 @@ class Test_TC_PMHCONC_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MinMeasuredValue attribute.\n"); - if (ShouldSkip("PMHCONC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads NetworkInterfaces structure attribute from DUT.\n"); + if (ShouldSkip("DGGEN.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMinMeasuredValueAttribute_1(); + err = TestThReadsNetworkInterfacesStructureAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the MaxMeasuredValue attribute.\n"); - if (ShouldSkip("PMHCONC.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads a RebootCount attribute value from DUT.\n"); + if (ShouldSkip("DGGEN.S.A0001")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2(); + err = TestThReadsARebootCountAttributeValueFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the MeasuredValue attribute.\n"); - if (ShouldSkip("PMHCONC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Reboot target device\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasuredValueAttribute_3(); + err = TestRebootTargetDevice_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the PeakMeasuredValue attribute.\n"); - if (ShouldSkip("PMHCONC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reboot target device(DUT)\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueAttribute_4(); + err = TestRebootTargetDeviceDUT_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the DUT the PeakMeasuredValueWindow attribute.\n"); - if (ShouldSkip("PMHCONC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Reboot target device\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5(); + err = TestRebootTargetDevice_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the AverageMeasuredValue attribute.\n"); - if (ShouldSkip("PMHCONC.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Reboot target device(DUT)\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6(); + err = TestRebootTargetDeviceDUT_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the AverageMeasuredValueWindow attribute.\n"); - if (ShouldSkip("PMHCONC.S.A0006")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the MeasurementUnit attribute.\n"); - if (ShouldSkip("PMHCONC.S.A0008")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of " + "DUT rebooting.\n"); + if (ShouldSkip("DGGEN.S.A0002")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasurementUnitAttribute_8(); + err = TestDutRebootsAndThReadsAUpTimeAttributeValueOfDutSinceSomeArbitraryStartTimeOfDutRebooting_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the MeasurementMedium attribute.\n"); - if (ShouldSkip("PMHCONC.S.A0009")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads a TotalOperationalHours attribute value from DUT.\n"); + if (ShouldSkip("DGGEN.S.A0003")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasurementMediumAttribute_9(); + err = TestThReadsATotalOperationalHoursAttributeValueFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads from the DUT the LevelValue attribute.\n"); - if (ShouldSkip("PMHCONC.S.A000a")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Reboot target device\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestRebootTargetDevice_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Reboot target device(DUT)\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestRebootTargetDeviceDUT_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads BootReason attribute value from DUT.\n"); + if (ShouldSkip("DGGEN.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsBootReasonAttributeValueFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads ActiveHardwareFaults attribute value from DUT.\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsActiveHardwareFaultsAttributeValueFromDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads ActiveRadioFaults attribute value from DUT.\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0006")) { + NextTest(); + return; + } + err = TestThReadsActiveRadioFaultsAttributeValueFromDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads ActiveNetworkFaults attribute value from DUT.\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0007")) { + NextTest(); + return; + } + err = TestThReadsActiveNetworkFaultsAttributeValueFromDut_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads TestEventTriggersEnabled attribute value\n"); + if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0008")) { NextTest(); return; } - err = TestThReadsFromTheDutTheLevelValueAttribute_10(); + err = TestThReadsTestEventTriggersEnabledAttributeValue_17(); break; } @@ -36167,6 +35728,27 @@ class Test_TC_PMHCONC_2_1 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -36180,7 +35762,7 @@ class Test_TC_PMHCONC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -36194,60 +35776,45 @@ class Test_TC_PMHCONC_2_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMinMeasuredValueAttribute_1() + CHIP_ERROR TestThReadsNetworkInterfacesStructureAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MinMeasuredValue attribute. Error: %@", err); + [cluster readAttributeNetworkInterfacesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads NetworkInterfaces structure attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value floatValue], 0.0f)); - } - { - MinMeasuredValue = value; - } - + VerifyOrReturn(CheckConstraintType("networkInterfaces", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2() + CHIP_ERROR TestThReadsARebootCountAttributeValueFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MaxMeasuredValue attribute. Error: %@", err); + [cluster readAttributeRebootCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads a RebootCount attribute value from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value floatValue], MinMeasuredValue)); - } - { - MaxMeasuredValue = value; - } + VerifyOrReturn(CheckConstraintType("rebootCount", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("rebootCount", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("rebootCount", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -36255,104 +35822,90 @@ class Test_TC_PMHCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_3() + CHIP_ERROR TestRebootTargetDevice_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasuredValue attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("measuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value floatValue], MaxMeasuredValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueAttribute_4() + CHIP_ERROR TestRebootTargetDeviceDUT_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValue attribute. Error: %@", err); + CHIP_ERROR TestRebootTargetDevice_5() + { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } - if (value != nil) { + CHIP_ERROR TestRebootTargetDeviceDUT_6() + { - VerifyOrReturn(CheckConstraintType("peakMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValue", [value floatValue], MaxMeasuredValue)); - } + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_7() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5() + CHIP_ERROR TestDutRebootsAndThReadsAUpTimeAttributeValueOfDutSinceSomeArbitraryStartTimeOfDutRebooting_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValueWindow attribute. Error: %@", err); + [cluster readAttributeUpTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of DUT rebooting. " + @"Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("peakMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValueWindow", [value unsignedIntValue], 604800UL)); - + VerifyOrReturn(CheckConstraintType("upTime", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6() + CHIP_ERROR TestThReadsATotalOperationalHoursAttributeValueFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValue attribute. Error: %@", err); + [cluster readAttributeTotalOperationalHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads a TotalOperationalHours attribute value from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("averageMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValue", [value floatValue], MaxMeasuredValue)); - } + VerifyOrReturn(CheckConstraintType("totalOperationalHours", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("totalOperationalHours", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("totalOperationalHours", [value unsignedIntValue], 4294967294UL)); NextTest(); }]; @@ -36360,47 +35913,48 @@ class Test_TC_PMHCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7() + CHIP_ERROR TestRebootTargetDevice_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValueWindow attribute. Error: %@", err); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestRebootTargetDeviceDUT_11() + { - VerifyOrReturn(CheckConstraintType("averageMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValueWindow", [value unsignedIntValue], 604800UL)); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_12() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementUnitAttribute_8() + CHIP_ERROR TestThReadsBootReasonAttributeValueFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementUnit attribute. Error: %@", err); + [cluster readAttributeBootReasonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads BootReason attribute value from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("measurementUnit", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementUnit", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementUnit", [value unsignedCharValue], 7U)); + VerifyOrReturn(CheckConstraintMinValue("bootReason", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("bootReason", [value unsignedCharValue], 6U)); NextTest(); }]; @@ -36408,60 +35962,52 @@ class Test_TC_PMHCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementMediumAttribute_9() + CHIP_ERROR TestThReadsActiveHardwareFaultsAttributeValueFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementMedium attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("measurementMedium", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementMedium", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementMedium", [value unsignedCharValue], 2U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheLevelValueAttribute_10() + CHIP_ERROR TestThReadsActiveRadioFaultsAttributeValueFromDut_15() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the LevelValue attribute. Error: %@", err); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestThReadsActiveNetworkFaultsAttributeValueFromDut_16() + { - VerifyOrReturn(CheckConstraintType("levelValue", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("levelValue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("levelValue", [value unsignedCharValue], 4U)); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - NextTest(); - }]; + CHIP_ERROR TestThReadsTestEventTriggersEnabledAttributeValue_17() + { - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } }; -class Test_TC_PMICONC_1_1 : public TestCommandBridge { +class Test_TC_I_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PMICONC_1_1() - : TestCommandBridge("Test_TC_PMICONC_1_1") + Test_TC_I_1_1() + : TestCommandBridge("Test_TC_I_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -36471,7 +36017,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PMICONC_1_1() {} + ~Test_TC_I_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -36479,11 +36025,11 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PMICONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PMICONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -36500,244 +36046,42 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PMICONC.S.Afffd")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); + err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Given PMICONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F00")) { - NextTest(); - return; - } - err = TestGivenPmiconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); + err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Given PMICONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F00")) { - NextTest(); - return; - } - err = TestGivenPmiconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given PMICONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F01")) { - NextTest(); - return; - } - err = TestGivenPmiconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Given PMICONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional command(TriggerEffect) in AcceptedCommandList\n"); + if (ShouldSkip("I.S.C40.Rsp")) { NextTest(); return; } - err = TestGivenPmiconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestReadTheOptionalCommandTriggerEffectInAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given PMICONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F02")) { - NextTest(); - return; - } - err = TestGivenPmiconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Given PMICONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F02")) { - NextTest(); - return; - } - err = TestGivenPmiconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Given PMICONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F03")) { - NextTest(); - return; - } - err = TestGivenPmiconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Given PMICONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F03")) { - NextTest(); - return; - } - err = TestGivenPmiconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); - break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Given PMICONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F04")) { - NextTest(); - return; - } - err = TestGivenPmiconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Given PMICONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F04")) { - NextTest(); - return; - } - err = TestGivenPmiconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); - break; - case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Given PMICONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F05")) { - NextTest(); - return; - } - err = TestGivenPmiconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Given PMICONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F05")) { - NextTest(); - return; - } - err = TestGivenPmiconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.A0007 && PMICONC.S.F00")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeUncertaintyInAttributeList_15(); - break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Check the optional attribute Uncertainty is excluded from AttributeList when " - "PMICONC.S.A0007 is not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.A0007")) { - NextTest(); - return; - } - err = TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F00")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); - break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when PMICONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F00")) { - NextTest(); - return; - } - err = TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_18(); - break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow " - "in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F04")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "PMICONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F04")) { - NextTest(); - return; - } - err = TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_20(); - break; - case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F05")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); - break; - case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when PMICONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F05")) { - NextTest(); - return; - } - err = TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F01")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); - break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F01")) { - NextTest(); - return; - } - err = TestCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read the global attribute: EventList\n"); - if (ShouldSkip("PMICONC.S.Afffa")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeEventList_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PMICONC.S.Afff9")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PMICONC.S.Afff8")) { + " ***** Test Step 7 : Read EventList attribute from the DUT. For this cluster the list is usually empty but it can " + "contain manufacturer specific event IDs.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestReadEventListAttributeFromTheDutForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); break; } @@ -36774,66 +36118,6 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -36847,7 +36131,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -36862,23 +36146,21 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -36888,40 +36170,22 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmiconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMICONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmiconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMICONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); @@ -36930,371 +36194,233 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmiconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMICONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmiconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMICONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmiconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMICONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmiconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMICONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmiconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestReadTheOptionalCommandTriggerEffectInAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMICONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(TriggerEffect) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmiconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMICONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 64UL)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmiconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMICONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPmiconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMICONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmiconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR + TestReadEventListAttributeFromTheDutForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMICONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } +}; - CHIP_ERROR TestGivenPmiconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() +class Test_TC_I_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_I_2_1() + : TestCommandBridge("Test_TC_I_2_1") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMICONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } + ~Test_TC_I_2_1() {} - CHIP_ERROR TestReadTheOptionalAttributeUncertaintyInAttributeList_15() + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute Uncertainty in AttributeList Error: %@", err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_1\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + Wait(); - NextTest(); - }]; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the IdentifyTime attribute from the DUT\n"); + if (ShouldSkip("I.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheIdentifyTimeAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the IdentifyType attribute from the DUT\n"); + if (ShouldSkip("I.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsTheIdentifyTypeAttributeFromTheDut_2(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_16() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check the optional attribute Uncertainty is excluded from AttributeList when PMICONC.S.A0007 is not set Error: " - @"%@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR - TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + chip::System::Clock::Timeout GetWaitDuration() const override { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue and " - @"Measurement Unit in AttributeList Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); } - CHIP_ERROR - TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are excluded " - @"from AttributeList when PMICONC.S.F00 (MEA) is not set Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 8UL)); + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestThReadsTheIdentifyTimeAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList " - @"Error: %@", - err); + [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the IdentifyTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintType("identifyTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -37302,242 +36428,61 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_20() + CHIP_ERROR TestThReadsTheIdentifyTypeAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when PMICONC.S.F04 " - @"(PEA) is not set Error: %@", - err); + [cluster readAttributeIdentifyTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the IdentifyType attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintType("identifyType", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("identifyType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyType", [value unsignedCharValue], 5U)); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() +class Test_TC_I_2_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_I_2_2() + : TestCommandBridge("Test_TC_I_2_2") + , mTestIndex(0) { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - @"AttributeList Error: %@", - err); + ~Test_TC_I_2_2() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_2\n"); + } - NextTest(); - }]; + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - return CHIP_NO_ERROR; - } - - CHIP_ERROR - TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_22() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - @"PMICONC.S.F05 (AVG) is not set Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 6UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attribute LevelValue in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_24() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is not set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 10UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_25() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_26() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_27() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PMICONC_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PMICONC_2_1() - : TestCommandBridge("Test_TC_PMICONC_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_PMICONC_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PMICONC_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PMICONC_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); + Wait(); // Ensure we increment mTestIndex before we start running the relevant // command. That way if we lose the timeslice after we send the message @@ -37549,84 +36494,81 @@ class Test_TC_PMICONC_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MinMeasuredValue attribute.\n"); - if (ShouldSkip("PMICONC.S.A0001")) { + ChipLogProgress(chipTool, + " ***** Test Step 1 : TH sends Identify command to DUT, with the IdentifyTime field set to 0x003c (60s).\n"); + if (ShouldSkip("I.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMinMeasuredValueAttribute_1(); + err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the MaxMeasuredValue attribute.\n"); - if (ShouldSkip("PMICONC.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads immediately IdentifyTime attribute from DUT\n"); + if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2(); + err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the MeasuredValue attribute.\n"); - if (ShouldSkip("PMICONC.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasuredValueAttribute_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 10000ms\n"); + err = TestWait10000ms_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the PeakMeasuredValue attribute.\n"); - if (ShouldSkip("PMICONC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : After 10 seconds, the TH reads IdentifyTime attribute from DUT\n"); + if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueAttribute_4(); + err = TestAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the DUT the PeakMeasuredValueWindow attribute.\n"); - if (ShouldSkip("PMICONC.S.A0004")) { + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH sends IdentifyQuery command to DUT and Verify IdentifyQueryResponse command to TH,with " + "the Timeout field set to a value in the range 0x0000 to 0x0032\n"); + if (ShouldSkip("PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5(); + err = TestThSendsIdentifyQueryCommandToDutAndVerifyIdentifyQueryResponseCommandToTHwithTheTimeoutFieldSetToAValueInTheRange0x0000To0x0032_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the AverageMeasuredValue attribute.\n"); - if (ShouldSkip("PMICONC.S.A0005")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH sends Identify command to DUT, with the IdentifyTime field set to 0x0000 (stop " + "identifying).\n"); + if (ShouldSkip("I.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6(); + err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the AverageMeasuredValueWindow attribute.\n"); - if (ShouldSkip("PMICONC.S.A0006")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads immediately IdentifyTime attribute from DUT\n"); + if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7(); + err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the MeasurementUnit attribute.\n"); - if (ShouldSkip("PMICONC.S.A0008")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT\n"); + if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasurementUnitAttribute_8(); + err = TestThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the MeasurementMedium attribute.\n"); - if (ShouldSkip("PMICONC.S.A0009")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasurementMediumAttribute_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 5000ms\n"); + err = TestWait5000ms_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads from the DUT the LevelValue attribute.\n"); - if (ShouldSkip("PMICONC.S.A000a")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : After 5 seconds, the TH reads IdentifyTime attribute from DUT\n"); + if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheLevelValueAttribute_10(); + err = TestAfter5SecondsTheThReadsIdentifyTimeAttributeFromDut_10(); break; } @@ -37699,60 +36641,43 @@ class Test_TC_PMICONC_2_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMinMeasuredValueAttribute_1() + CHIP_ERROR TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MinMeasuredValue attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[MTRIdentifyClusterIdentifyParams alloc] init]; + params.identifyTime = [NSNumber numberWithUnsignedShort:60U]; + [cluster + identifyWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Identify command to DUT, with the IdentifyTime field set to 0x003c (60s). Error: %@", err); - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value floatValue], 0.0f)); - } - { - MinMeasuredValue = value; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2() + CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MaxMeasuredValue attribute. Error: %@", err); + [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads immediately IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value floatValue], MinMeasuredValue)); - } - { - MaxMeasuredValue = value; - } + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 51U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 69U)); NextTest(); }]; @@ -37760,53 +36685,28 @@ class Test_TC_PMICONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_3() + CHIP_ERROR TestWait10000ms_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasuredValue attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("measuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value floatValue], MaxMeasuredValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueAttribute_4() + CHIP_ERROR TestAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValue attribute. Error: %@", err); + [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After 10 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("peakMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValue", [value floatValue], MaxMeasuredValue)); - } + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 42U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 58U)); NextTest(); }]; @@ -37814,74 +36714,56 @@ class Test_TC_PMICONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5() + CHIP_ERROR + TestThSendsIdentifyQueryCommandToDutAndVerifyIdentifyQueryResponseCommandToTHwithTheTimeoutFieldSetToAValueInTheRange0x0000To0x0032_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValueWindow attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("peakMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValueWindow", [value unsignedIntValue], 604800UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6() + CHIP_ERROR TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValue attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[MTRIdentifyClusterIdentifyParams alloc] init]; + params.identifyTime = [NSNumber numberWithUnsignedShort:0U]; + [cluster identifyWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Identify command to DUT, with the IdentifyTime field set to 0x0000 (stop " + @"identifying). Error: %@", + err); - VerifyOrReturn(CheckConstraintType("averageMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValue", [value floatValue], MaxMeasuredValue)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7() + CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValueWindow attribute. Error: %@", err); + [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads immediately IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("averageMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValueWindow", [value unsignedIntValue], 604800UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("IdentifyTime", actualValue, 0U)); + } NextTest(); }]; @@ -37889,71 +36771,50 @@ class Test_TC_PMICONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementUnitAttribute_8() + CHIP_ERROR TestThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementUnit attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id identifyTimeArgument; + identifyTimeArgument = [NSNumber numberWithUnsignedShort:15U]; + [cluster writeAttributeIdentifyTimeWithValue:identifyTimeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT Error: %@", + err); - VerifyOrReturn(CheckConstraintType("measurementUnit", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementUnit", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementUnit", [value unsignedCharValue], 7U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementMediumAttribute_9() + CHIP_ERROR TestWait5000ms_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementMedium attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("measurementMedium", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementMedium", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementMedium", [value unsignedCharValue], 2U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheLevelValueAttribute_10() + CHIP_ERROR TestAfter5SecondsTheThReadsIdentifyTimeAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the LevelValue attribute. Error: %@", err); + [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After 5 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("levelValue", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("levelValue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("levelValue", [value unsignedCharValue], 4U)); + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 5U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 15U)); NextTest(); }]; @@ -37962,11 +36823,11 @@ class Test_TC_PMICONC_2_1 : public TestCommandBridge { } }; -class Test_TC_PMKCONC_1_1 : public TestCommandBridge { +class Test_TC_I_2_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PMKCONC_1_1() - : TestCommandBridge("Test_TC_PMKCONC_1_1") + Test_TC_I_2_3() + : TestCommandBridge("Test_TC_I_2_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -37976,7 +36837,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PMKCONC_1_1() {} + ~Test_TC_I_2_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -37984,11 +36845,11 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PMKCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PMKCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -38001,248 +36862,188 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : 1.Wait for the commissioned device to be retrieved\n"); + err = Test1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PMKCONC.S.Afffd")) { + ChipLogProgress(chipTool, + " ***** Test Step 1 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink and " + "the effect variant field set to 0x00 default\n"); + if (ShouldSkip("I.S.C40.Rsp")) { NextTest(); return; } - err = TestReadTheGlobalAttributeClusterRevision_1(); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x00Default_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Given PMKCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : DUT executes a blink effect\n"); + if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { NextTest(); return; } - err = TestGivenPmkconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestDutExecutesABlinkEffect_2(); break; case 3: ChipLogProgress(chipTool, - " ***** Test Step 3 : Given PMKCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F00")) { + " ***** Test Step 3 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe " + "and the effect variant field set to 0x00 default\n"); + if (ShouldSkip("I.S.C40.Rsp")) { NextTest(); return; } - err = TestGivenPmkconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given PMKCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : DUT executes a breathe effect\n"); + if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { NextTest(); return; } - err = TestGivenPmkconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestDutExecutesABreatheEffect_4(); break; case 5: ChipLogProgress(chipTool, - " ***** Test Step 5 : Given PMKCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F01")) { + " ***** Test Step 5 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x02 okay and " + "the effect variant field set to 0x00 default\n"); + if (ShouldSkip("I.S.C40.Rsp")) { NextTest(); return; } - err = TestGivenPmkconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x02OkayAndTheEffectVariantFieldSetTo0x00Default_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given PMKCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : DUT executes an okay effect\n"); + if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { NextTest(); return; } - err = TestGivenPmkconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestDutExecutesAnOkayEffect_6(); break; case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Given PMKCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F02")) { + " ***** Test Step 7 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x0b channel " + "change and the effect variant field set to 0x00 default\n"); + if (ShouldSkip("I.S.C40.Rsp")) { NextTest(); return; } - err = TestGivenPmkconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x0bChannelChangeAndTheEffectVariantFieldSetTo0x00Default_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Given PMKCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : DUT executes a channel change effect\n"); + if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { NextTest(); return; } - err = TestGivenPmkconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestDutExecutesAChannelChangeEffect_8(); break; case 9: ChipLogProgress(chipTool, - " ***** Test Step 9 : Given PMKCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F03")) { + " ***** Test Step 9 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe " + "and the effect variant field set to 0x00 default\n"); + if (ShouldSkip("I.S.C40.Rsp")) { NextTest(); return; } - err = TestGivenPmkconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Given PMKCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F04")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : DUT executes a breathe effect\n"); + if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { NextTest(); return; } - err = TestGivenPmkconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestDutExecutesABreatheEffect_10(); break; case 11: ChipLogProgress(chipTool, - " ***** Test Step 11 : Given PMKCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F04")) { + " ***** Test Step 11 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0xfe finish " + "effect and the effect variant field set to 0x00 default\n"); + if (ShouldSkip("I.S.C40.Rsp")) { NextTest(); return; } - err = TestGivenPmkconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xfeFinishEffectAndTheEffectVariantFieldSetTo0x00Default_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Given PMKCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F05")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : DUT stops the breathe effect after the current effect sequence\n"); + if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { NextTest(); return; } - err = TestGivenPmkconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestDutStopsTheBreatheEffectAfterTheCurrentEffectSequence_12(); break; case 13: ChipLogProgress(chipTool, - " ***** Test Step 13 : Given PMKCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F05")) { + " ***** Test Step 13 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe " + "and the effect variant field set to 0x00 default\n"); + if (ShouldSkip("I.S.C40.Rsp")) { NextTest(); return; } - err = TestGivenPmkconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : DUT executes a breathe effect\n"); + if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_14(); + err = TestDutExecutesABreatheEffect_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.A0007 && PMKCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 15 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " + "effect and the effect variant field set to 0x00 default\n"); + if (ShouldSkip("I.S.C40.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_15(); break; case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Check the optional attribute Uncertainty is excluded from AttributeList when " - "PMKCONC.S.A0007 is not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : DUT stops the breathe effect as soon as possible.\n"); + if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { NextTest(); return; } - err = TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_16(); + err = TestDutStopsTheBreatheEffectAsSoonAsPossible_16(); break; case 17: ChipLogProgress(chipTool, - " ***** Test Step 17 : Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F00")) { + " ***** Test Step 17 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink " + "and the effect variant field set to 0x42 unknown\n"); + if (ShouldSkip("I.S.C40.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x42Unknown_17(); break; case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when PMKCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : Check DUT executes a blink effect.\n"); + if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { NextTest(); return; } - err = TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_18(); + err = TestCheckDutExecutesABlinkEffect_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow " - "in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F04")) { + " ***** Test Step 19 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " + "effect and the effect variant field set to 0x00 default\n"); + if (ShouldSkip("I.S.C40.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_19(); break; case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "PMKCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F04")) { - NextTest(); - return; - } - err = TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_20(); - break; - case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F05")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); - break; - case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when PMKCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F05")) { - NextTest(); - return; - } - err = TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F01")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); - break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F01")) { - NextTest(); - return; - } - err = TestCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read the global attribute: EventList\n"); - if (ShouldSkip("PMKCONC.S.Afffa")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeEventList_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PMKCONC.S.Afff9")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PMKCONC.S.Afff8")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : DUT stops any effect that may be still running as soon as possible\n"); + if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestDutStopsAnyEffectThatMayBeStillRunningAsSoonAsPossible_20(); break; } @@ -38318,27 +37119,6 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -38352,14 +37132,14 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR Test1WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -38367,277 +37147,556 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x00Default_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:0U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink " + @"and the effect variant field set to 0x00 default Error: %@", + err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmkconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestDutExecutesABlinkEffect_2() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMKCONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); + __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 " + @"breathe and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmkconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestDutExecutesABreatheEffect_4() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x02OkayAndTheEffectVariantFieldSetTo0x00Default_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMKCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); + __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:2U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x02 okay " + @"and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmkconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestDutExecutesAnOkayEffect_6() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x0bChannelChangeAndTheEffectVariantFieldSetTo0x00Default_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMKCONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); + __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:11U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x0b " + @"channel change and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmkconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestDutExecutesAChannelChangeEffect_8() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMKCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); + __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 " + @"breathe and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmkconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestDutExecutesABreatheEffect_10() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xfeFinishEffectAndTheEffectVariantFieldSetTo0x00Default_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMKCONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); + __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:254U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xfe " + @"finish effect and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmkconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestDutStopsTheBreatheEffectAfterTheCurrentEffectSequence_12() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMKCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); + __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 " + @"breathe and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmkconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestDutExecutesABreatheEffect_14() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMKCONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); + __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:255U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " + @"effect and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmkconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestDutStopsTheBreatheEffectAsSoonAsPossible_16() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x42Unknown_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMKCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); + __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:0U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:66U]; + [cluster triggerEffectWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink " + @"and the effect variant field set to 0x42 unknown Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmkconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestCheckDutExecutesABlinkEffect_18() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_19() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMKCONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); + __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:255U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " + @"effect and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmkconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestDutStopsAnyEffectThatMayBeStillRunningAsSoonAsPossible_20() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMKCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); +class Test_TC_ILL_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_ILL_1_1() + : TestCommandBridge("Test_TC_ILL_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + ~Test_TC_ILL_1_1() {} - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - return CHIP_NO_ERROR; + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(Tolerance) in AttributeList\n"); + if (ShouldSkip("ILL.S.A0003")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeToleranceInAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(LightSensorType) in AttributeList\n"); + if (ShouldSkip("ILL.S.A0004")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeLightSensorTypeInAttributeList_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " + "contain manufacturer specific event IDs.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_8(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 9; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestGivenPmkconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMKCONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPmkconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PMKCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -38645,13 +37704,13 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -38660,7 +37719,9 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -38674,22 +37735,22 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute Uncertainty in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -38697,24 +37758,22 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_16() + CHIP_ERROR TestReadTheOptionalAttributeLightSensorTypeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check the optional attribute Uncertainty is excluded from AttributeList when PMKCONC.S.A0007 is not set Error: " - @"%@", - err); + NSLog(@"Read the optional attribute(LightSensorType) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); NextTest(); }]; @@ -38723,185 +37782,228 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue and " - @"Measurement Unit in AttributeList Error: %@", - err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_18() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are excluded " - @"from AttributeList when PMKCONC.S.F00 (MEA) is not set Error: %@", - err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 8UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; +class Test_TC_ILL_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_ILL_2_1() + : TestCommandBridge("Test_TC_ILL_2_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_20() - { + ~Test_TC_ILL_2_1() {} - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when PMKCONC.S.F04 " - @"(PEA) is not set Error: %@", - err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_2_1\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 4UL)); + Wait(); - NextTest(); - }]; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads MinMeasuredValue attribute from DUT\n"); + if (ShouldSkip("ILL.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsMinMeasuredValueAttributeFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads MaxMeasuredValue attribute from DUT\n"); + if (ShouldSkip("ILL.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsMaxMeasuredValueAttributeFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads MeasuredValue attribute from DUT\n"); + if (ShouldSkip("ILL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsMeasuredValueAttributeFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads Tolerance attribute from DUT\n"); + if (ShouldSkip("ILL.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsToleranceAttributeFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads LightSensorType attribute from DUT\n"); + if (ShouldSkip("ILL.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsLightSensorTypeAttributeFromDut_5(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - @"AttributeList Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR - TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_22() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - @"PMKCONC.S.F05 (AVG) is not set Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 6; - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 6UL)); + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestThReadsMinMeasuredValueAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attribute LevelValue in AttributeList Error: %@", err); + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MinMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65533U)); + } NextTest(); }]; @@ -38909,22 +38011,26 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_24() + CHIP_ERROR TestThReadsMaxMeasuredValueAttributeFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is not set Error: %@", err); + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 10UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 2U)); + VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65534U)); + } NextTest(); }]; @@ -38932,78 +38038,78 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_25() + CHIP_ERROR TestThReadsMeasuredValueAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65534U)); } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestThReadsToleranceAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Tolerance attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestThReadsLightSensorTypeAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads LightSensorType attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("lightSensorType", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("lightSensorType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("lightSensorType", [value unsignedCharValue], 254U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -39011,11 +38117,11 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } }; -class Test_TC_PMKCONC_2_1 : public TestCommandBridge { +class Test_TC_ILL_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PMKCONC_2_1() - : TestCommandBridge("Test_TC_PMKCONC_2_1") + Test_TC_ILL_2_2() + : TestCommandBridge("Test_TC_ILL_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -39025,7 +38131,7 @@ class Test_TC_PMKCONC_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PMKCONC_2_1() {} + ~Test_TC_ILL_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -39033,11 +38139,11 @@ class Test_TC_PMKCONC_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PMKCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PMKCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -39054,84 +38160,60 @@ class Test_TC_PMKCONC_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MinMeasuredValue attribute.\n"); - if (ShouldSkip("PMKCONC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads MinMeasuredValue attribute from DUT\n"); + if (ShouldSkip("ILL.S.A0001")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMinMeasuredValueAttribute_1(); + err = TestThReadsMinMeasuredValueAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the MaxMeasuredValue attribute.\n"); - if (ShouldSkip("PMKCONC.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads MaxMeasuredValue attribute from DUT\n"); + if (ShouldSkip("ILL.S.A0002")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2(); + err = TestThReadsMaxMeasuredValueAttributeFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the MeasuredValue attribute.\n"); - if (ShouldSkip("PMKCONC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Cover the sensor or darken the room\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasuredValueAttribute_3(); + err = TestCoverTheSensorOrDarkenTheRoom_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the PeakMeasuredValue attribute.\n"); - if (ShouldSkip("PMKCONC.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutThePeakMeasuredValueAttribute_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 1s\n"); + err = TestWait1s_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the DUT the PeakMeasuredValueWindow attribute.\n"); - if (ShouldSkip("PMKCONC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : After a few seconds, TH reads MeasuredValue attribute from DUT.\n"); + if (ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5(); + err = TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the AverageMeasuredValue attribute.\n"); - if (ShouldSkip("PMKCONC.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Expose the sensor again to light\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6(); + err = TestExposeTheSensorAgainToLight_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the AverageMeasuredValueWindow attribute.\n"); - if (ShouldSkip("PMKCONC.S.A0006")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1s\n"); + err = TestWait1s_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the MeasurementUnit attribute.\n"); - if (ShouldSkip("PMKCONC.S.A0008")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasurementUnitAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the MeasurementMedium attribute.\n"); - if (ShouldSkip("PMKCONC.S.A0009")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasurementMediumAttribute_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads from the DUT the LevelValue attribute.\n"); - if (ShouldSkip("PMKCONC.S.A000a")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : After a few seconds, TH reads MeasuredValue attribute from DUT.\n"); + if (ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThReadsFromTheDutTheLevelValueAttribute_10(); + err = TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_8(); break; } @@ -39171,12 +38253,6 @@ class Test_TC_PMKCONC_2_1 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -39190,7 +38266,7 @@ class Test_TC_PMKCONC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -39206,24 +38282,23 @@ class Test_TC_PMKCONC_2_1 : public TestCommandBridge { } NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMinMeasuredValueAttribute_1() + CHIP_ERROR TestThReadsMinMeasuredValueAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MinMeasuredValue attribute. Error: %@", err); + NSLog(@"TH reads MinMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value floatValue], 0.0f)); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); } { MinMeasuredValue = value; @@ -39236,24 +38311,23 @@ class Test_TC_PMKCONC_2_1 : public TestCommandBridge { } NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2() + CHIP_ERROR TestThReadsMaxMeasuredValueAttributeFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MaxMeasuredValue attribute. Error: %@", err); + NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value floatValue], MinMeasuredValue)); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); } { MaxMeasuredValue = value; @@ -39265,103 +38339,42 @@ class Test_TC_PMKCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasuredValue attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("measuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value floatValue], MaxMeasuredValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueAttribute_4() + CHIP_ERROR TestCoverTheSensorOrDarkenTheRoom_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValue attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("peakMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValue", [value floatValue], MaxMeasuredValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for Successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5() + CHIP_ERROR TestWait1s_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValueWindow attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("peakMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValueWindow", [value unsignedIntValue], 604800UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6() + CHIP_ERROR TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValue attribute. Error: %@", err); + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After a few seconds, TH reads MeasuredValue attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("averageMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValue", [value floatValue], MaxMeasuredValue)); + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); } NextTest(); @@ -39370,95 +38383,43 @@ class Test_TC_PMKCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7() + CHIP_ERROR TestExposeTheSensorAgainToLight_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValueWindow attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("averageMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValueWindow", [value unsignedIntValue], 604800UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for Successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementUnitAttribute_8() + CHIP_ERROR TestWait1s_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementUnit attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("measurementUnit", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementUnit", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementUnit", [value unsignedCharValue], 7U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementMediumAttribute_9() + CHIP_ERROR TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementMedium attribute. Error: %@", err); + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After a few seconds, TH reads MeasuredValue attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("measurementMedium", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementMedium", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementMedium", [value unsignedCharValue], 2U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheLevelValueAttribute_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the LevelValue attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { - VerifyOrReturn(CheckConstraintType("levelValue", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("levelValue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("levelValue", [value unsignedCharValue], 4U)); + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65534U)); + } NextTest(); }]; @@ -39467,11 +38428,11 @@ class Test_TC_PMKCONC_2_1 : public TestCommandBridge { } }; -class Test_TC_RNCONC_1_1 : public TestCommandBridge { +class Test_TC_LVL_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_RNCONC_1_1() - : TestCommandBridge("Test_TC_RNCONC_1_1") + Test_TC_LVL_1_1() + : TestCommandBridge("Test_TC_LVL_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -39481,7 +38442,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_RNCONC_1_1() {} + ~Test_TC_LVL_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -39489,11 +38450,11 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_RNCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RNCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -39511,242 +38472,132 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("RNCONC.S.Afffd")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Given RNCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip(" !LVL.S.F00 && !LVL.S.F01 && !LVL.S.F02 ")) { NextTest(); return; } - err = TestGivenRnconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Given RNCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Given LVL.S.F00(OO) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("LVL.S.F00")) { NextTest(); return; } - err = TestGivenRnconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestGivenLvlsf00ooEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given RNCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Given LVL.S.F01(LT) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("LVL.S.F01")) { NextTest(); return; } - err = TestGivenRnconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestGivenLvlsf01ltEnsureFeaturemapHasTheCorrectBitSet_4(); break; case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : Given RNCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Given LVL.S.F02(FQ) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("LVL.S.F02")) { NextTest(); return; } - err = TestGivenRnconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestGivenLvlsf02fqEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given RNCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F02")) { - NextTest(); - return; - } - err = TestGivenRnconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Given RNCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList\n"); + if (ShouldSkip("LVL.S.F01")) { NextTest(); return; } - err = TestGivenRnconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Given RNCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in " + "AttributeList\n"); + if (ShouldSkip("LVL.S.F02")) { NextTest(); return; } - err = TestGivenRnconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_8(); break; case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : Given RNCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(MinLevel) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestGivenRnconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestReadTheOptionalAttributeMinLevelInAttributeList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Given RNCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F04")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(MaxLevel) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestGivenRnconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestReadTheOptionalAttributeMaxLevelInAttributeList_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Given RNCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F04")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute(OnOffTransitionTime) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestGivenRnconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Given RNCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F05")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Read the optional attribute(OnTransitionTime) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0012")) { NextTest(); return; } - err = TestGivenRnconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestReadTheOptionalAttributeOnTransitionTimeInAttributeList_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Given RNCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F05")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional attribute(OffTransitionTime) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0013")) { NextTest(); return; } - err = TestGivenRnconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestReadTheOptionalAttributeOffTransitionTimeInAttributeList_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the optional attribute(DefaultMoveRate) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0014")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_14(); + err = TestReadTheOptionalAttributeDefaultMoveRateInAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.A0007 && RNCONC.S.F00")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeUncertaintyInAttributeList_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_15(); break; case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Check the optional attribute Uncertainty is excluded from AttributeList when RNCONC.S.A0007 " - "is not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.A0007")) { + ChipLogProgress( + chipTool, " ***** Test Step 16 : Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList\n"); + if (ShouldSkip("LVL.S.F02")) { NextTest(); return; } - err = TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_16(); + err = TestReadTheFeatureDependentLVLSF02CommandInAcceptedCommandList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F00")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_17(); break; case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when RNCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F00")) { - NextTest(); - return; - } - err = TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_18(); - break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow " - "in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F04")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "RNCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F04")) { - NextTest(); - return; - } - err = TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_20(); - break; - case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F05")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); - break; - case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when RNCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F05")) { - NextTest(); - return; - } - err = TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F01")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); - break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F01")) { - NextTest(); - return; - } - err = TestCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read the global attribute: EventList\n"); - if (ShouldSkip("RNCONC.S.Afffa")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeEventList_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("RNCONC.S.Afff9")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("RNCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeGeneratedCommandList_27(); - break; + ChipLogProgress(chipTool, " ***** Test Step 18 : Read the global attribute: EventList\n"); + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -39815,33 +38666,6 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -39855,7 +38679,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -39874,9 +38698,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -39886,7 +38708,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -39896,187 +38718,22 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenRnconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given RNCONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenRnconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given RNCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenRnconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given RNCONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenRnconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given RNCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenRnconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given RNCONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenRnconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given RNCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenRnconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given RNCONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenRnconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given RNCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenRnconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given RNCONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); @@ -40085,17 +38742,15 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenRnconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestGivenLvlsf00ooEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given RNCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Given LVL.S.F00(OO) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40106,17 +38761,15 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenRnconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestGivenLvlsf01ltEnsureFeaturemapHasTheCorrectBitSet_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given RNCONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); + NSLog(@"Given LVL.S.F01(LT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40127,17 +38780,15 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenRnconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestGivenLvlsf02fqEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given RNCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Given LVL.S.F02(FQ) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40148,13 +38799,11 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -40163,7 +38812,9 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -40177,22 +38828,21 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute Uncertainty in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); NextTest(); }]; @@ -40200,24 +38850,22 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_16() + CHIP_ERROR TestReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog( - @"Check the optional attribute Uncertainty is excluded from AttributeList when RNCONC.S.A0007 is not set Error: %@", - err); + NSLog(@"Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); NextTest(); }]; @@ -40225,58 +38873,20 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + CHIP_ERROR TestReadTheOptionalAttributeMinLevelInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue and " - @"Measurement Unit in AttributeList Error: %@", - err); + NSLog(@"Read the optional attribute(MinLevel) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are excluded " - @"from AttributeList when RNCONC.S.F00 (MEA) is not set Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 8UL)); NextTest(); }]; @@ -40284,51 +38894,20 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestReadTheOptionalAttributeMaxLevelInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList " - @"Error: %@", - err); + NSLog(@"Read the optional attribute(MaxLevel) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when RNCONC.S.F04 (PEA) " - @"is not set Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 4UL)); NextTest(); }]; @@ -40336,25 +38915,20 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - @"AttributeList Error: %@", - err); + NSLog(@"Read the optional attribute(OnOffTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); NextTest(); }]; @@ -40362,26 +38936,20 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_22() + CHIP_ERROR TestReadTheOptionalAttributeOnTransitionTimeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - @"RNCONC.S.F05 (AVG) is not set Error: %@", - err); + NSLog(@"Read the optional attribute(OnTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); NextTest(); }]; @@ -40389,22 +38957,20 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestReadTheOptionalAttributeOffTransitionTimeInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attribute LevelValue in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(OffTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); NextTest(); }]; @@ -40412,22 +38978,20 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_24() + CHIP_ERROR TestReadTheOptionalAttributeDefaultMoveRateInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is not set Error: %@", err); + NSLog(@"Read the optional attribute(DefaultMoveRate) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); NextTest(); }]; @@ -40435,65 +38999,60 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_25() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestReadTheFeatureDependentLVLSF02CommandInAcceptedCommandList_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -40514,11 +39073,11 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { } }; -class Test_TC_RNCONC_2_1 : public TestCommandBridge { +class Test_TC_LVL_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_RNCONC_2_1() - : TestCommandBridge("Test_TC_RNCONC_2_1") + Test_TC_LVL_2_1() + : TestCommandBridge("Test_TC_LVL_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -40528,7 +39087,7 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_RNCONC_2_1() {} + ~Test_TC_LVL_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -40536,11 +39095,11 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_RNCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RNCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -40557,84 +39116,164 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MinMeasuredValue attribute.\n"); - if (ShouldSkip("RNCONC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentLevel attribute\n"); + if (ShouldSkip("LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMinMeasuredValueAttribute_1(); + err = TestReadsTheCurrentLevelAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the MaxMeasuredValue attribute.\n"); - if (ShouldSkip("RNCONC.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the RemainingTime attribute\n"); + if (ShouldSkip("LVL.S.A0001")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2(); + err = TestReadsTheRemainingTimeAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the MeasuredValue attribute.\n"); - if (ShouldSkip("RNCONC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the MinLevel attribute\n"); + if (ShouldSkip("LVL.S.A0002 && LVL.S.F01")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasuredValueAttribute_3(); + err = TestReadsTheMinLevelAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the PeakMeasuredValue attribute.\n"); - if (ShouldSkip("RNCONC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the MinLevel attribute\n"); + if (ShouldSkip("LVL.S.A0002 && !LVL.S.F01")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueAttribute_4(); + err = TestReadsTheMinLevelAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the DUT the PeakMeasuredValueWindow attribute.\n"); - if (ShouldSkip("RNCONC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MaxLevel attribute\n"); + if (ShouldSkip("LVL.S.A0003 && LVL.S.F01")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5(); + err = TestReadsTheMaxLevelAttribute_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the AverageMeasuredValue attribute.\n"); - if (ShouldSkip("RNCONC.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the MaxLevel attribute\n"); + if (ShouldSkip("LVL.S.A0003 && !LVL.S.F01")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6(); + err = TestReadsTheMaxLevelAttribute_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the AverageMeasuredValueWindow attribute.\n"); - if (ShouldSkip("RNCONC.S.A0006")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4b & 4C Reads the CurrentLevel attribute\n"); + if (ShouldSkip("LVL.S.F01 && LVL.S.A0002 && LVL.S.A0003")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7(); + err = TestStep4b4cReadsTheCurrentLevelAttribute_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the MeasurementUnit attribute.\n"); - if (ShouldSkip("RNCONC.S.A0008")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4b & 4C Reads the CurrentLevel attribute\n"); + if (ShouldSkip("LVL.S.A0002 && LVL.S.A0003 && !LVL.S.F01")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasurementUnitAttribute_8(); + err = TestStep4b4cReadsTheCurrentLevelAttribute_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the MeasurementMedium attribute.\n"); - if (ShouldSkip("RNCONC.S.A0009")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the CurrentFrequency attribute\n"); + if (ShouldSkip("LVL.S.A0004")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasurementMediumAttribute_9(); + err = TestReadsTheCurrentFrequencyAttribute_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads from the DUT the LevelValue attribute.\n"); - if (ShouldSkip("RNCONC.S.A000a")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the MinFrequency attribute\n"); + if (ShouldSkip("LVL.S.A0005")) { + NextTest(); + return; + } + err = TestReadsTheMinFrequencyAttribute_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the MaxFrequency attribute\n"); + if (ShouldSkip("LVL.S.A0006")) { + NextTest(); + return; + } + err = TestReadsTheMaxFrequencyAttribute_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7b & 7C Reads the CurrentFrequency attribute\n"); + if (ShouldSkip("LVL.S.A0004 && LVL.S.A0005 && LVL.S.A0006")) { + NextTest(); + return; + } + err = TestStep7b7cReadsTheCurrentFrequencyAttribute_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0010")) { + NextTest(); + return; + } + err = TestReadsTheOnOffTransitionTimeAttribute_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the OnLevel attribute \n"); + if (ShouldSkip("LVL.S.F01 && LVL.S.A0011")) { + NextTest(); + return; + } + err = TestReadsTheOnLevelAttribute_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the OnLevel attribute \n"); + if (ShouldSkip("LVL.S.A0011 && !LVL.S.F01")) { + NextTest(); + return; + } + err = TestReadsTheOnLevelAttribute_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Reads the OnTransitionTime attribute \n"); + if (ShouldSkip("LVL.S.A0012")) { + NextTest(); + return; + } + err = TestReadsTheOnTransitionTimeAttribute_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Reads the OffTransitionTime attribute \n"); + if (ShouldSkip("LVL.S.A0013")) { + NextTest(); + return; + } + err = TestReadsTheOffTransitionTimeAttribute_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Reads the DefaultMoveRate attribute \n"); + if (ShouldSkip("LVL.S.A0014")) { + NextTest(); + return; + } + err = TestReadsTheDefaultMoveRateAttribute_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Reads the Options attribute \n"); + if (ShouldSkip("LVL.S.A000f")) { + NextTest(); + return; + } + err = TestReadsTheOptionsAttribute_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Reads the StartUpCurrentLevel attribute \n"); + if (ShouldSkip("LVL.S.A4000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheLevelValueAttribute_10(); + err = TestReadsTheStartUpCurrentLevelAttribute_20(); break; } @@ -40680,25 +39319,55 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 21; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { @@ -40707,29 +39376,28 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nullable MinMeasuredValue; + NSNumber * _Nullable CurrentLevelValue; - CHIP_ERROR TestThReadsFromTheDutTheMinMeasuredValueAttribute_1() + CHIP_ERROR TestReadsTheCurrentLevelAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MinMeasuredValue attribute. Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value floatValue], 0.0f)); + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 254U)); } { - MinMeasuredValue = value; + CurrentLevelValue = value; } NextTest(); @@ -40737,29 +39405,50 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2() + CHIP_ERROR TestReadsTheRemainingTimeAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MaxMeasuredValue attribute. Error: %@", err); + [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the RemainingTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + VerifyOrReturn(CheckConstraintType("remainingTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("remainingTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("remainingTime", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull MinLevelValue; - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value floatValue], MinMeasuredValue)); + CHIP_ERROR TestReadsTheMinLevelAttribute_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the MinLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("MinLevel", actualValue, 1U)); } + + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); { - MaxMeasuredValue = value; + MinLevelValue = value; } NextTest(); @@ -40767,26 +39456,107 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull MinLevelFeatureMapNotSupportedValue; - CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_3() + CHIP_ERROR TestReadsTheMinLevelAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasuredValue attribute. Error: %@", err); + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the MinLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 254U)); + { + MinLevelFeatureMapNotSupportedValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull MaxLevelValue; + + CHIP_ERROR TestReadsTheMaxLevelAttribute_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the MaxLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("MaxLevel", actualValue, 254U)); + } + + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], MinLevelValue)); + { + MaxLevelValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull MaxLevelFeatureMapNotSupportedValue; + + CHIP_ERROR TestReadsTheMaxLevelAttribute_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the MaxLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); + VerifyOrReturn( + CheckConstraintMinValue("maxLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); + VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); + { + MaxLevelFeatureMapNotSupportedValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b & 4C Reads the CurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("measuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value floatValue], MaxMeasuredValue)); + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], MinLevelValue)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], MaxLevelValue)); } NextTest(); @@ -40795,25 +39565,25 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueAttribute_4() + CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValue attribute. Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b & 4C Reads the CurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("peakMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValue", [value floatValue], MaxMeasuredValue)); + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue( + "currentLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentLevel", [value unsignedCharValue], MaxLevelFeatureMapNotSupportedValue)); } NextTest(); @@ -40822,49 +39592,141 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5() + CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValueWindow attribute. Error: %@", err); + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentFrequency attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("peakMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValueWindow", [value unsignedIntValue], 604800UL)); + VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], 65535U)); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull MinFrequencyValue; - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6() + CHIP_ERROR TestReadsTheMinFrequencyAttribute_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the MinFrequency attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("minFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("minFrequency", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minFrequency", [value unsignedShortValue], 65535U)); + { + MinFrequencyValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull MaxFrequencyValue; + + CHIP_ERROR TestReadsTheMaxFrequencyAttribute_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the MaxFrequency attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("maxFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("maxFrequency", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxFrequency", [value unsignedShortValue], 65535U)); + { + MaxFrequencyValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep7b7cReadsTheCurrentFrequencyAttribute_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7b & 7C Reads the CurrentFrequency attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], MinFrequencyValue)); + VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], MaxFrequencyValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnOffTransitionTime attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheOnLevelAttribute_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValue attribute. Error: %@", err); + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("averageMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValue", [value floatValue], MaxMeasuredValue)); + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], MinLevelValue)); + VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], MaxLevelValue)); } NextTest(); @@ -40873,23 +39735,51 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7() + CHIP_ERROR TestReadsTheOnLevelAttribute_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); + VerifyOrReturn( + CheckConstraintMinValue("onLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); + VerifyOrReturn( + CheckConstraintMaxValue("onLevel", [value unsignedCharValue], MaxLevelFeatureMapNotSupportedValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValueWindow attribute. Error: %@", err); + [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("averageMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValueWindow", [value unsignedIntValue], 604800UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("onTransitionTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("onTransitionTime", [value unsignedShortValue], 65535U)); + } NextTest(); }]; @@ -40897,23 +39787,24 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementUnitAttribute_8() + CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementUnit attribute. Error: %@", err); + [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OffTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("measurementUnit", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementUnit", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementUnit", [value unsignedCharValue], 7U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("offTransitionTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("offTransitionTime", [value unsignedShortValue], 65535U)); + } NextTest(); }]; @@ -40921,23 +39812,24 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementMediumAttribute_9() + CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementMedium attribute. Error: %@", err); + [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the DefaultMoveRate attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("measurementMedium", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementMedium", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementMedium", [value unsignedCharValue], 2U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); + } NextTest(); }]; @@ -40945,23 +39837,43 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheLevelValueAttribute_10() + CHIP_ERROR TestReadsTheOptionsAttribute_19() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("options", "bitmap8", "bitmap8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheStartUpCurrentLevelAttribute_20() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the LevelValue attribute. Error: %@", err); + [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the StartUpCurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("levelValue", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("levelValue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("levelValue", [value unsignedCharValue], 4U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("startUpCurrentLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("startUpCurrentLevel", [value unsignedCharValue], 255U)); + } NextTest(); }]; @@ -40970,21 +39882,27 @@ class Test_TC_RNCONC_2_1 : public TestCommandBridge { } }; -class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { +class Test_TC_LVL_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TVOCCONC_1_1() - : TestCommandBridge("Test_TC_TVOCCONC_1_1") + Test_TC_LVL_2_2() + : TestCommandBridge("Test_TC_LVL_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("OnOffTransitionTimeConfigValue", 0, UINT16_MAX, &mOnOffTransitionTimeConfigValue); + AddArgument("OnLevelConfigValue", 0, UINT8_MAX, &mOnLevelConfigValue); + AddArgument("OnTransitionTimeConfigValue", 0, UINT16_MAX, &mOnTransitionTimeConfigValue); + AddArgument("OffTransitionTimeConfigValue", 0, UINT16_MAX, &mOffTransitionTimeConfigValue); + AddArgument("DefaultMoveRateConfigValue", 0, UINT8_MAX, &mDefaultMoveRateConfigValue); + AddArgument("StartUpCurrentLevelConfigValue", 0, UINT8_MAX, &mStartUpCurrentLevelConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_TVOCCONC_1_1() {} + ~Test_TC_LVL_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -40992,11 +39910,11 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TVOCCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TVOCCONC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -41013,246 +39931,156 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("TVOCCONC.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OnOffTransitionTime attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestReadTheGlobalAttributeClusterRevision_1(); + err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : writes the OnOffTransitionTime attribute on the DUT\n"); + if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestGivenTvocconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestWritesTheOnOffTransitionTimeAttributeOnTheDut_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Given TVOCCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the OnOffTransitionTime attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestGivenTvocconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given TVOCCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the OnLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0011")) { NextTest(); return; } - err = TestGivenTvocconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestReadsTheOnLevelAttributeFromTheDut_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Given TVOCCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : writes the OnLevel attribute on the DUT\n"); + if (ShouldSkip("LVL.S.A0011")) { NextTest(); return; } - err = TestGivenTvocconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestWritesTheOnLevelAttributeOnTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given TVOCCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the OnLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0011")) { NextTest(); return; } - err = TestGivenTvocconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestReadsTheOnLevelAttributeFromTheDut_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Given TVOCCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the OnTransitionTime attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0012")) { NextTest(); return; } - err = TestGivenTvocconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestReadsTheOnTransitionTimeAttributeFromTheDut_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Given TVOCCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Writes the OnTransitionTime attribute on the DUT\n"); + if (ShouldSkip("LVL.S.A0012")) { NextTest(); return; } - err = TestGivenTvocconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestWritesTheOnTransitionTimeAttributeOnTheDut_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Given TVOCCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the OnTransitionTime attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0012")) { NextTest(); return; } - err = TestGivenTvocconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestReadsTheOnTransitionTimeAttributeFromTheDut_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Given TVOCCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F04")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OffTransitionTime attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0013")) { NextTest(); return; } - err = TestGivenTvocconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestReadsTheOffTransitionTimeAttributeFromTheDut_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Given TVOCCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F04")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Writes the OffTransitionTime attribute on the DUT\n"); + if (ShouldSkip("LVL.S.A0013")) { NextTest(); return; } - err = TestGivenTvocconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestWritesTheOffTransitionTimeAttributeOnTheDut_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Given TVOCCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F05")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the OffTransitionTime attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0013")) { NextTest(); return; } - err = TestGivenTvocconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestReadsTheOffTransitionTimeAttributeFromTheDut_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Given TVOCCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F05")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the DefaultMoveRate attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0014")) { NextTest(); return; } - err = TestGivenTvocconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestReadsTheDefaultMoveRateAttributeFromTheDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Writes the DefaultMoveRate attribute on the DUT\n"); + if (ShouldSkip("LVL.S.A0014")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_14(); + err = TestWritesTheDefaultMoveRateAttributeOnTheDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.A0007 && TVOCCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the DefaultMoveRate attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0014")) { NextTest(); return; } - err = TestReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestReadsTheDefaultMoveRateAttributeFromTheDut_15(); break; case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Check the optional attribute Uncertainty is excluded from AttributeList when " - "TVOCCONC.S.A0007 is not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Reads the StartUpCurrentLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A4000")) { NextTest(); return; } - err = TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_16(); + err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : writes the StartUpCurrentLevel attribute on the DUT\n"); + if (ShouldSkip("LVL.S.A4000")) { NextTest(); return; } - err = TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestWritesTheStartUpCurrentLevelAttributeOnTheDut_17(); break; case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when TVOCCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : reads the StartUpCurrentLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A4000")) { NextTest(); return; } - err = TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_18(); + err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_18(); break; case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow " - "in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F04")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "TVOCCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F04")) { - NextTest(); - return; - } - err = TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_20(); - break; - case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F05")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); - break; - case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when TVOCCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F05")) { - NextTest(); - return; - } - err = TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F01")) { - NextTest(); - return; - } - err = TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); - break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is not " - "set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F01")) { - NextTest(); - return; - } - err = TestCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read the global attribute: EventList\n"); - if (ShouldSkip("TVOCCONC.S.Afffa")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeEventList_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("TVOCCONC.S.Afff9")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("TVOCCONC.S.Afff8")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : writes back default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestWritesBackDefaultValueOfOnOffTransitionTimeAttribute_19(); break; } @@ -41325,30 +40153,6 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -41362,11 +40166,17 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mOnOffTransitionTimeConfigValue; + chip::Optional mOnLevelConfigValue; + chip::Optional mOnTransitionTimeConfigValue; + chip::Optional mOffTransitionTimeConfigValue; + chip::Optional mDefaultMoveRateConfigValue; + chip::Optional mStartUpCurrentLevelConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -41376,371 +40186,268 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSNumber * _Nonnull OnOffTransitionTimeValue; - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + OnOffTransitionTimeValue = value; } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenTvocconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestWritesTheOnOffTransitionTimeAttributeOnTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = mOnOffTransitionTimeConfigValue.HasValue() + ? [NSNumber numberWithUnsignedShort:mOnOffTransitionTimeConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:10U]; + [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"writes the OnOffTransitionTime attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenTvocconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TVOCCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); + [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenTvocconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TVOCCONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOffTransitionTime", actualValue, + mOnOffTransitionTimeConfigValue.HasValue() ? mOnOffTransitionTimeConfigValue.Value() : 10U)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintNotValue("onOffTransitionTime", value, OnOffTransitionTimeValue)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable OnLevelValue; - CHIP_ERROR TestGivenTvocconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestReadsTheOnLevelAttributeFromTheDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TVOCCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenTvocconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TVOCCONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], 254U)); + } + { + OnLevelValue = value; + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenTvocconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestWritesTheOnLevelAttributeOnTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TVOCCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); + id onLevelArgument; + onLevelArgument = mOnLevelConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mOnLevelConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:5U]; + [cluster writeAttributeOnLevelWithValue:onLevelArgument + completion:^(NSError * _Nullable err) { + NSLog(@"writes the OnLevel attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenTvocconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestReadsTheOnLevelAttributeFromTheDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TVOCCONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenTvocconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TVOCCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("OnLevel", actualValue)); + VerifyOrReturn( + CheckValue("OnLevel", actualValue, mOnLevelConfigValue.HasValue() ? mOnLevelConfigValue.Value() : 5U)); + } + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); + } + VerifyOrReturn(CheckConstraintNotValue("onLevel", value, OnLevelValue)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable OnTransitionTimeValue; - CHIP_ERROR TestGivenTvocconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestReadsTheOnTransitionTimeAttributeFromTheDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TVOCCONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); + [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenTvocconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TVOCCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("onTransitionTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("onTransitionTime", [value unsignedShortValue], 65535U)); + } + { + OnTransitionTimeValue = value; + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenTvocconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestWritesTheOnTransitionTimeAttributeOnTheDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TVOCCONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); + id onTransitionTimeArgument; + onTransitionTimeArgument = mOnTransitionTimeConfigValue.HasValue() + ? [NSNumber numberWithUnsignedShort:mOnTransitionTimeConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:5U]; + [cluster writeAttributeOnTransitionTimeWithValue:onTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Writes the OnTransitionTime attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenTvocconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestReadsTheOnTransitionTimeAttributeFromTheDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TVOCCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); + [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("OnTransitionTime", actualValue)); + VerifyOrReturn(CheckValue("OnTransitionTime", actualValue, + mOnTransitionTimeConfigValue.HasValue() ? mOnTransitionTimeConfigValue.Value() : 5U)); + } + if (value != nil) { - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); + } + VerifyOrReturn(CheckConstraintNotValue("onTransitionTime", value, OnTransitionTimeValue)); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable OffTransitionTimeValue; - CHIP_ERROR TestReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestReadsTheOffTransitionTimeAttributeFromTheDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute Uncertainty in AttributeList Error: %@", err); + [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check the optional attribute Uncertainty is excluded from AttributeList when TVOCCONC.S.A0007 is not set " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("offTransitionTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("offTransitionTime", [value unsignedShortValue], 65535U)); + } + { + OffTransitionTimeValue = value; + } NextTest(); }]; @@ -41748,114 +40455,81 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + CHIP_ERROR TestWritesTheOffTransitionTimeAttributeOnTheDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue and " - @"Measurement Unit in AttributeList Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id offTransitionTimeArgument; + offTransitionTimeArgument = mOffTransitionTimeConfigValue.HasValue() + ? [NSNumber numberWithUnsignedShort:mOffTransitionTimeConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:10U]; + [cluster writeAttributeOffTransitionTimeWithValue:offTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Writes the OffTransitionTime attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_18() + CHIP_ERROR TestReadsTheOffTransitionTimeAttributeFromTheDut_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are excluded " - @"from AttributeList when TVOCCONC.S.F00 (MEA) is not set Error: %@", - err); + [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 8UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("OffTransitionTime", actualValue)); + VerifyOrReturn(CheckValue("OffTransitionTime", actualValue, + mOffTransitionTimeConfigValue.HasValue() ? mOffTransitionTimeConfigValue.Value() : 10U)); + } + if (value != nil) { - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); + } + VerifyOrReturn(CheckConstraintNotValue("offTransitionTime", value, OffTransitionTimeValue)); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable DefaultMoveRatevalue; - CHIP_ERROR TestCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_20() + CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when TVOCCONC.S.F04 " - @"(PEA) is not set Error: %@", - err); + [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the DefaultMoveRate attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 4UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); + } + { + DefaultMoveRatevalue = value; + } NextTest(); }]; @@ -41863,78 +40537,81 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestWritesTheDefaultMoveRateAttributeOnTheDut_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - @"AttributeList Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id defaultMoveRateArgument; + defaultMoveRateArgument = mDefaultMoveRateConfigValue.HasValue() + ? [NSNumber numberWithUnsignedChar:mDefaultMoveRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:111U]; + [cluster writeAttributeDefaultMoveRateWithValue:defaultMoveRateArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Writes the DefaultMoveRate attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_22() + CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - @"TVOCCONC.S.F05 (AVG) is not set Error: %@", - err); + [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the DefaultMoveRate attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 6UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("DefaultMoveRate", actualValue)); + VerifyOrReturn(CheckValue("DefaultMoveRate", actualValue, + mDefaultMoveRateConfigValue.HasValue() ? mDefaultMoveRateConfigValue.Value() : 111U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); + } + VerifyOrReturn(CheckConstraintNotValue("defaultMoveRate", value, DefaultMoveRatevalue)); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable StartUpCurrentLevelValue; - CHIP_ERROR TestReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional, feature dependent attribute LevelValue in AttributeList Error: %@", err); + [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("startUpCurrentLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("startUpCurrentLevel", [value unsignedCharValue], 255U)); + } + { + StartUpCurrentLevelValue = value; + } NextTest(); }]; @@ -41942,117 +40619,87 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_24() + CHIP_ERROR TestWritesTheStartUpCurrentLevelAttributeOnTheDut_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is not set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id startUpCurrentLevelArgument; + startUpCurrentLevelArgument = mStartUpCurrentLevelConfigValue.HasValue() + ? [NSNumber numberWithUnsignedChar:mStartUpCurrentLevelConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:5U]; + [cluster writeAttributeStartUpCurrentLevelWithValue:startUpCurrentLevelArgument + completion:^(NSError * _Nullable err) { + NSLog(@"writes the StartUpCurrentLevel attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 10UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_25() + CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValueNonNull("StartUpCurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("StartUpCurrentLevel", actualValue, + mStartUpCurrentLevelConfigValue.HasValue() ? mStartUpCurrentLevelConfigValue.Value() : 5U)); } + if (value != nil) { - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_26() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); } + VerifyOrReturn(CheckConstraintNotValue("startUpCurrentLevel", value, StartUpCurrentLevelValue)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestWritesBackDefaultValueOfOnOffTransitionTimeAttribute_19() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"writes back default value of OnOffTransitionTime attribute Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_TVOCCONC_2_1 : public TestCommandBridge { +class Test_TC_LVL_3_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TVOCCONC_2_1() - : TestCommandBridge("Test_TC_TVOCCONC_2_1") + Test_TC_LVL_3_1() + : TestCommandBridge("Test_TC_LVL_3_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -42062,7 +40709,7 @@ class Test_TC_TVOCCONC_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_TVOCCONC_2_1() {} + ~Test_TC_LVL_3_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -42070,11 +40717,11 @@ class Test_TC_TVOCCONC_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TVOCCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_3_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TVOCCONC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_3_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -42091,84 +40738,361 @@ class Test_TC_TVOCCONC_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MinMeasuredValue attribute.\n"); - if (ShouldSkip("TVOCCONC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition Send On Command\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMinMeasuredValueAttribute_1(); + err = TestPreconditionSendOnCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the MaxMeasuredValue attribute.\n"); - if (ShouldSkip("TVOCCONC.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2(); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the MeasuredValue attribute.\n"); - if (ShouldSkip("TVOCCONC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasuredValueAttribute_3(); + err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the PeakMeasuredValue attribute.\n"); - if (ShouldSkip("TVOCCONC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueAttribute_4(); + err = TestThWrites0ToTheOptionsAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the DUT the PeakMeasuredValueWindow attribute.\n"); - if (ShouldSkip("TVOCCONC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH writes NULL to the OnLevel attribute\n"); + if (ShouldSkip("LVL.S.A0011")) { NextTest(); return; } - err = TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5(); + err = TestThWritesNullToTheOnLevelAttribute_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the AverageMeasuredValue attribute.\n"); - if (ShouldSkip("TVOCCONC.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Off command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6(); + err = TestThSendsOffCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the AverageMeasuredValueWindow attribute.\n"); - if (ShouldSkip("TVOCCONC.S.A0006")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 " + "(immediate)\n"); + if (ShouldSkip("LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7(); + err = TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the MeasurementUnit attribute.\n"); - if (ShouldSkip("TVOCCONC.S.A0008")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); + if (ShouldSkip("OO.S.A0000 && LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasurementUnitAttribute_8(); + err = TestThReadsOnOffAttributeOnOffClusterFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the MeasurementMedium attribute.\n"); - if (ShouldSkip("TVOCCONC.S.A0009")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheMeasurementMediumAttribute_9(); + err = TestThReadsCurrentLevelAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads from the DUT the LevelValue attribute.\n"); - if (ShouldSkip("TVOCCONC.S.A000a")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends On command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestThSendsOnCommandToDut_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 s). " + "This means the level should increase by 150 units in 30s, so 5 units/s\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10000ms\n"); + err = TestWait10000ms_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10000ms\n"); + err = TestWait10000ms_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 10000ms\n"); + err = TestWait10000ms_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 5000ms\n"); + err = TestWait5000ms_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { + NextTest(); + return; + } + err = TestThWrites0ToTheOptionsAttribute_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { + NextTest(); + return; + } + err = TestThReadsOptionsAttribute_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestThSendsOnCommandToDut_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAMoveToLevelCommandToTheDutWith_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsOffCommandToDut_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAMoveToLevelCommandToTheDutWith_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAMoveToLevelCommandToTheDutWith_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAMoveToLevelCommandToTheDutWith_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : TH writes 1 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { + NextTest(); + return; + } + err = TestThWrites1ToTheOptionsAttribute_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { + NextTest(); + return; + } + err = TestThReadsOptionsAttribute_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestThSendsOnCommandToDut_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAMoveToLevelCommandToTheDutWith_38(); + break; + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheLevelValueAttribute_10(); + err = TestThReadsCurrentLevelAttributeFromDut_39(); + break; + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsOffCommandToDut_40(); + break; + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAMoveToLevelCommandToTheDutWith_41(); + break; + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_42(); + break; + case 43: + ChipLogProgress(chipTool, " ***** Test Step 43 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAMoveToLevelCommandToTheDutWith_43(); + break; + case 44: + ChipLogProgress(chipTool, " ***** Test Step 44 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_44(); + break; + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAMoveToLevelCommandToTheDutWith_45(); + break; + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_46(); break; } @@ -42214,6 +41138,114 @@ class Test_TC_TVOCCONC_2_1 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -42227,7 +41259,7 @@ class Test_TC_TVOCCONC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 47; chip::Optional mNodeId; chip::Optional mCluster; @@ -42241,61 +41273,40 @@ class Test_TC_TVOCCONC_2_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMinMeasuredValueAttribute_1() + CHIP_ERROR TestPreconditionSendOnCommand_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MinMeasuredValue attribute. Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Precondition Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value floatValue], 0.0f)); - } - { - MinMeasuredValue = value; - } - NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestThReadsFromTheDutTheMaxMeasuredValueAttribute_2() + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MaxMeasuredValue attribute. Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value floatValue], MinMeasuredValue)); - } { - MaxMeasuredValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } NextTest(); @@ -42304,55 +41315,83 @@ class Test_TC_TVOCCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_3() + CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasuredValue attribute. Error: %@", err); + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("measuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value floatValue], MaxMeasuredValue)); - } + return CHIP_NO_ERROR; + } - NextTest(); - }]; + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueAttribute_4() + CHIP_ERROR TestThWritesNullToTheOnLevelAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValue attribute. Error: %@", err); + id onLevelArgument; + onLevelArgument = nil; + [cluster writeAttributeOnLevelWithValue:onLevelArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes NULL to the OnLevel attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("peakMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValue", [value floatValue], MaxMeasuredValue)); - } + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsOffCommandToDut_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends Off command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); NextTest(); }]; @@ -42360,51 +41399,47 @@ class Test_TC_TVOCCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutThePeakMeasuredValueWindowAttribute_5() + CHIP_ERROR TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the PeakMeasuredValueWindow attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithOnOffWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime " + @"=0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckConstraintType("peakMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("peakMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("peakMeasuredValueWindow", [value unsignedIntValue], 604800UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueAttribute_6() + CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValue attribute. Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("averageMeasuredValue", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValue", [value floatValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValue", [value floatValue], MaxMeasuredValue)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } NextTest(); @@ -42413,24 +41448,23 @@ class Test_TC_TVOCCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAverageMeasuredValueWindowAttribute_7() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AverageMeasuredValueWindow attribute. Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("averageMeasuredValueWindow", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("averageMeasuredValueWindow", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("averageMeasuredValueWindow", [value unsignedIntValue], 604800UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); + } NextTest(); }]; @@ -42438,366 +41472,247 @@ class Test_TC_TVOCCONC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementUnitAttribute_8() + CHIP_ERROR TestThSendsOnCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementUnit attribute. Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("measurementUnit", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementUnit", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementUnit", [value unsignedCharValue], 7U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheMeasurementMediumAttribute_9() + CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasurementMedium attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog( + @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckConstraintType("measurementMedium", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("measurementMedium", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measurementMedium", [value unsignedCharValue], 2U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheLevelValueAttribute_10() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = - [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the LevelValue attribute. Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("levelValue", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("levelValue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("levelValue", [value unsignedCharValue], 4U)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); + } NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_OPCREDS_1_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OPCREDS_1_2() - : TestCommandBridge("Test_TC_OPCREDS_1_2") - , mTestIndex(0) + CHIP_ERROR + TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_13() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:200U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 " + @"s). This means the level should increase by 150 units in 30s, so 5 units/s Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_OPCREDS_1_2() {} + CHIP_ERROR TestWait10000ms_14() + { - /////////// TestCommand Interface ///////// - void NextTest() override + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_15() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OPCREDS_1_2\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OPCREDS_1_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("OPCREDS.S.Afffd")) { - NextTest(); - return; - } - err = TestThReadsTheClusterRevisionFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("OPCREDS.S.Afffc")) { - NextTest(); - return; - } - err = TestThReadsTheFeatureMapFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); - if (ShouldSkip("OPCREDS.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsAttributeListFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list " - "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " - "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " - "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); - break; - case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " - "the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afffa")) { - NextTest(); - return; - } - err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("OPCREDS.S.Afff9")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afff9")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads GeneratedCommandList from DUT\n"); - if (ShouldSkip("OPCREDS.S.Afff8")) { - NextTest(); - return; - } - err = TestThReadsGeneratedCommandListFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afff8")) { - NextTest(); - return; + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); } - err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); - break; - } - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + NextTest(); + }]; + + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestWait10000ms_16() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_17() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 127U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 173U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10000ms_18() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 170U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 200U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestWait5000ms_20() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAttributeListFromDut_3() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AttributeList from DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); + } NextTest(); }]; @@ -42805,88 +41720,109 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_23() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + CHIP_ERROR TestThReadsOptionsAttribute_24() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Options", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_6() + CHIP_ERROR TestThSendsOnCommandToDut_25() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 11UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_26() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:100U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsGeneratedCommandListFromDut_8() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_27() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 8UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); + } NextTest(); }]; @@ -42894,423 +41830,113 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; - -class Test_TC_BINFO_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_BINFO_1_1() - : TestCommandBridge("Test_TC_BINFO_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_BINFO_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestThSendsOffCommandToDut_28() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_BINFO_1_1\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BINFO_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends Off command to DUT Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("BINFO.S.Afffd")) { - NextTest(); - return; - } - err = TestThReadsTheClusterRevisionFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("BINFO.S.Afffc")) { - NextTest(); - return; - } - err = TestThReadsTheFeatureMapFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); - if (ShouldSkip("BINFO.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsAttributeListFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads optional attribute(ManufacturingDate) in attributeList\n"); - if (ShouldSkip("BINFO.S.A000b && BINFO.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeManufacturingDateInAttributeList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads optional attribute(PartNumber) in attributeList\n"); - if (ShouldSkip("BINFO.S.A000c && BINFO.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributePartNumberInAttributeList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads optional attribute(ProductURL) in attributeList\n"); - if (ShouldSkip("BINFO.S.A000d && BINFO.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeProductURLInAttributeList_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads optional attribute(ProductLabel) in attributeList\n"); - if (ShouldSkip("BINFO.S.A000e && BINFO.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeProductLabelInAttributeList_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads optional attribute(SerialNumber) in attributeList\n"); - if (ShouldSkip("BINFO.S.A000f && BINFO.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeSerialNumberInAttributeList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads optional attribute(LocalConfigDisabled) in attributeList\n"); - if (ShouldSkip("BINFO.S.A0010 && BINFO.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeLocalConfigDisabledInAttributeList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads optional attribute(Reachable) in attributeList\n"); - if (ShouldSkip("BINFO.S.A0011 && BINFO.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeReachableInAttributeList_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads optional attribute(UniqueID) in attributeList\n"); - if (ShouldSkip("BINFO.S.A0012 && BINFO.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeUniqueIDInAttributeList_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list " - "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " - "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " - "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH1 reads EventList from DUT\n"); - if (ShouldSkip(" BINFO.S.Afffa && !BINFO.S.E00 && !BINFO.S.E01 && !BINFO.S.E02 && !BINFO.S.A0011 ")) { - NextTest(); - return; - } - err = TestTh1ReadsEventListFromDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read BINFO.S.E00(StartUp) event in EventList\n"); - if (ShouldSkip("BINFO.S.E00 && BINFO.S.Afffa")) { - NextTest(); - return; - } - err = TestReadBINFOSE00StartUpEventInEventList_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read BINFO.S.E01(ShutDown) event in EventList\n"); - if (ShouldSkip("BINFO.S.E01 && BINFO.S.Afffa")) { - NextTest(); - return; - } - err = TestReadBINFOSE01ShutDownEventInEventList_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read BINFO.S.E02(Leave) event in EventList\n"); - if (ShouldSkip("BINFO.S.E02 && BINFO.S.Afffa")) { - NextTest(); - return; - } - err = TestReadBINFOSE02LeaveEventInEventList_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read (ReachableChanged) event in EventList\n"); - if (ShouldSkip("BINFO.S.A0011 && BINFO.S.Afffa")) { - NextTest(); - return; - } - err = TestReadReachableChangedEventInEventList_17(); - break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values " - "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " - "the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afffa")) { - NextTest(); - return; - } - err = TestThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18(); - break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afff9")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afff8")) { - NextTest(); - return; - } - err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); - break; - } + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_29() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 21; + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:120U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_30() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_31() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:140U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAttributeListFromDut_3() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_32() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AttributeList from DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); + } NextTest(); }]; @@ -43318,41 +41944,47 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeManufacturingDateInAttributeList_4() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_33() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(ManufacturingDate) in attributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:160U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributePartNumberInAttributeList_5() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_34() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(PartNumber) in attributeList Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 160U)); + } NextTest(); }]; @@ -43360,41 +41992,43 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeProductURLInAttributeList_6() + CHIP_ERROR TestThWrites1ToTheOptionsAttribute_35() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(ProductURL) in attributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 1 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 13UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeProductLabelInAttributeList_7() + CHIP_ERROR TestThReadsOptionsAttribute_36() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(ProductLabel) in attributeList Error: %@", err); + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("Options", actualValue, 1U)); + } NextTest(); }]; @@ -43402,62 +42036,65 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeSerialNumberInAttributeList_8() + CHIP_ERROR TestThSendsOnCommandToDut_37() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(SerialNumber) in attributeList Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeLocalConfigDisabledInAttributeList_9() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_38() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(LocalConfigDisabled) in attributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:100U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeReachableInAttributeList_10() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_39() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(Reachable) in attributeList Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); + } NextTest(); }]; @@ -43465,97 +42102,113 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeUniqueIDInAttributeList_11() + CHIP_ERROR TestThSendsOffCommandToDut_40() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(UniqueID) in attributeList Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_41() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:120U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1ReadsEventListFromDut_13() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_42() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads EventList from DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 120U)); } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBINFOSE00StartUpEventInEventList_14() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_43() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read BINFO.S.E00(StartUp) event in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:140U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 0UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBINFOSE01ShutDownEventInEventList_15() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_44() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read BINFO.S.E01(ShutDown) event in EventList Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 120U)); + } NextTest(); }]; @@ -43563,87 +42216,60 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBINFOSE02LeaveEventInEventList_16() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_45() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read BINFO.S.E02(Leave) event in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:160U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 2UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadReachableChangedEventInEventList_17() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_46() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read (ReachableChanged) event in EventList Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 3UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 160U)); + } NextTest(); }]; return CHIP_NO_ERROR; } - - CHIP_ERROR - TestThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; -class Test_TC_CNET_1_3 : public TestCommandBridge { +class Test_TC_LVL_4_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CNET_1_3() - : TestCommandBridge("Test_TC_CNET_1_3") + Test_TC_LVL_4_1() + : TestCommandBridge("Test_TC_LVL_4_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -43653,7 +42279,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CNET_1_3() {} + ~Test_TC_LVL_4_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -43661,11 +42287,11 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CNET_1_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_4_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CNET_1_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_4_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -43682,190 +42308,187 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("CNET.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition Send On Command\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestReadTheGlobalAttributeClusterRevision_1(); + err = TestPreconditionSendOnCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !CNET.S.F00 && !CNET.S.F01 && !CNET.S.F02 && CNET.S.Afffc")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMap_2(); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap when CNET.S.F00 is set\n"); - if (ShouldSkip("CNET.S.F00 && CNET.S.Afffc")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMapWhenCnetsf00IsSet_3(); + err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: FeatureMap when CNET.S.F01 is set\n"); - if (ShouldSkip("CNET.S.F01 && CNET.S.Afffc")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMapWhenCnetsf01IsSet_4(); + err = TestThWrites0ToTheOptionsAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: FeatureMap when CNET.S.F02 is set\n"); - if (ShouldSkip("CNET.S.F02 && CNET.S.Afffc")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the MaxLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMapWhenCnetsf02IsSet_5(); + err = TestThReadsTheMaxLevelAttributeFromTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("CNET.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp && LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_6(); + err = TestThSendsOffCommandToDut_6(); break; case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read mandatory attributes in AttributeList if CNET.S.F00(WI)/CNET.S.F01(TH)/CNET.S.F02(ET) " - "is true\n"); - if (ShouldSkip("CNET.S.F00 || CNET.S.F01 || CNET.S.F02 && CNET.S.Afffb")) { + " ***** Test Step 7 : TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 (units/s)\n"); + if (ShouldSkip("LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestReadMandatoryAttributesInAttributeListIfCnetsf00wiCnetsf01thCnetsf02etIsTrue_7(); + err = TestThSendsAMoveWithOnOffCommandToDutWithMoveMode0x00UpAndRate10UnitsS_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(ScanMaxTimeSeconds): AttributeList\n"); - if (ShouldSkip("CNET.S.A0002 && CNET.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); + if (ShouldSkip("OO.S.A0000 && LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalAttributeScanMaxTimeSecondsAttributeList_8(); + err = TestThReadsOnOffAttributeOnOffClusterFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reading optional attribute(ConnectMaxTimeSeconds) in AttributeList\n"); - if (ShouldSkip("CNET.S.A0003 && CNET.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadingOptionalAttributeConnectMaxTimeSecondsInAttributeList_9(); + err = TestThReadsCurrentLevelAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list " - "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " - "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " - "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && CNET.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 5000ms\n"); + err = TestWait5000ms_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " - "the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && CNET.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11(); + err = TestThReadsCurrentLevelAttributeFromDut_11(); break; case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Read AcceptedCommandList If DUT supports Wi-Fi/Thread related features " - "CNET.S.F00(WI),CNET.S.F01(TH)\n"); - if (ShouldSkip("( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_12(); + err = TestThSendsOnCommandToDut_12(); break; case 13: ChipLogProgress(chipTool, - " ***** Test Step 13 : Read AcceptedCommandList If DUT supports Wi-Fi related features (CNET.S.F00(WI) is true)\n"); - if (ShouldSkip("CNET.S.F00 && CNET.S.Afff9")) { + " ***** Test Step 13 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_13(); + err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_13(); break; case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : Read AcceptedCommandList If DUT supports Thread related features(CNET.S.F01(TH) is true)\n"); - if (ShouldSkip("CNET.S.F01 && CNET.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_14(); + err = TestThReadsCurrentLevelAttributeFromDut_14(); break; case 15: ChipLogProgress(chipTool, - " ***** Test Step 15 : Read AcceptedCommandList If DUT supports Ethernet related features(CNET.S.F02(TH) is " - "true)\n"); - if (ShouldSkip("CNET.S.F02 && CNET.S.Afff9")) { + " ***** Test Step 15 : TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s)\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { NextTest(); return; } - err = TestReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_15(); + err = TestThSendsAMoveCommandToTheDutWithMoveMode0x00UpAndRate5UnitsS_15(); break; case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " - "or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && CNET.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10s\n"); + err = TestWait10s_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); + err = TestThReadsCurrentLevelAttributeFromDut_17(); break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Read the GeneratedCommandList If DUT supports Wi-Fi/Thread related features(CNET.S.F00(WI) " - "or CNET.S.F01(TH) is true)\n"); - if (ShouldSkip("( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff8")) { + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 10s\n"); + err = TestWait10s_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadTheGeneratedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCNETSF00WIOrCnetsf01thIsTrue_17(); + err = TestThReadsCurrentLevelAttributeFromDut_19(); break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Read the GeneratedCommandList If DUT supports Ethernet related features(CNET.S.F02(ET) must " - "be true)\n"); - if (ShouldSkip("CNET.S.F02 && CNET.S.Afff8")) { + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 10s\n"); + err = TestWait10s_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadTheGeneratedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02ETMustBeTrue_18(); + err = TestThReadsCurrentLevelAttributeFromDut_21(); break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && CNET.S.Afff8")) { + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 19s\n"); + err = TestWait19s_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); + err = TestThReadsCurrentLevelAttributeFromDut_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Precondition send Off Command\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestPreconditionSendOffCommand_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Check on/off attribute value is false after off command\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_25(); break; } @@ -43938,6 +42561,24 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -43951,7 +42592,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 26; chip::Optional mNodeId; chip::Optional mCluster; @@ -43966,49 +42607,39 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestPreconditionSendOnCommand_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Precondition Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } NextTest(); @@ -44017,74 +42648,66 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMapWhenCnetsf00IsSet_3() + CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap when CNET.S.F00 is set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMapWhenCnetsf01IsSet_4() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap when CNET.S.F01 is set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 2UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMapWhenCnetsf02IsSet_5() + CHIP_ERROR TestThReadsTheMaxLevelAttributeFromTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap when CNET.S.F02 is set Error: %@", err); + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the MaxLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 4UL)); - } + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -44092,102 +42715,93 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_6() + CHIP_ERROR TestThSendsOffCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadMandatoryAttributesInAttributeListIfCnetsf00wiCnetsf01thCnetsf02etIsTrue_7() + CHIP_ERROR TestThSendsAMoveWithOnOffCommandToDutWithMoveMode0x00UpAndRate10UnitsS_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read mandatory attributes in AttributeList if CNET.S.F00(WI)/CNET.S.F01(TH)/CNET.S.F02(ET) is true Error: %@", - err); + __auto_type * params = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedChar:10U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveWithOnOffWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 (units/s) " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeScanMaxTimeSecondsAttributeList_8() + CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(ScanMaxTimeSeconds): AttributeList Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable CurrentLevelValue; - CHIP_ERROR TestReadingOptionalAttributeConnectMaxTimeSecondsInAttributeList_9() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reading optional attribute(ConnectMaxTimeSeconds) in AttributeList Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); + } + { + CurrentLevelValue = value; + } NextTest(); }]; @@ -44195,48 +42809,31 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11() + CHIP_ERROR TestWait5000ms_10() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_12() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read AcceptedCommandList If DUT supports Wi-Fi/Thread related features CNET.S.F00(WI),CNET.S.F01(TH) Error: %@", - err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 254U)); + } NextTest(); }]; @@ -44244,69 +42841,67 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_13() + CHIP_ERROR TestThSendsOnCommandToDut_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read AcceptedCommandList If DUT supports Wi-Fi related features (CNET.S.F00(WI) is true) Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_14() + CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read AcceptedCommandList If DUT supports Thread related features(CNET.S.F01(TH) is true) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog( + @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_15() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read AcceptedCommandList If DUT supports Ethernet related features(CNET.S.F02(TH) is true) Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); } NextTest(); @@ -44315,62 +42910,54 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGeneratedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCNETSF00WIOrCnetsf01thIsTrue_17() + CHIP_ERROR TestThSendsAMoveCommandToTheDutWithMoveMode0x00UpAndRate5UnitsS_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the GeneratedCommandList If DUT supports Wi-Fi/Thread related features(CNET.S.F00(WI) or CNET.S.F01(TH) " - @"is true) Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedChar:5U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s) Error: %@", err); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 7UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGeneratedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02ETMustBeTrue_18() + CHIP_ERROR TestWait10s_16() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the GeneratedCommandList If DUT supports Ethernet related features(CNET.S.F02(ET) must be true) Error: %@", - err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); } NextTest(); @@ -44379,328 +42966,149 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() + CHIP_ERROR TestWait10s_18() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); } -}; -class Test_TC_DESC_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DESC_1_1() - : TestCommandBridge("Test_TC_DESC_1_1") - , mTestIndex(0) + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_19() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DESC_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DESC_1_1\n"); - } + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DESC_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + if (value != nil) { - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("DESC.S.Afffd")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("DESC.S.Afffc")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("DESC.S.Afffb")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list " - "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " - "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " - "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); - break; - case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " - "the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afffa")) { - NextTest(); - return; - } - err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afff9")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afff8")) { - NextTest(); - return; + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 127U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 173U)); } - err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + NextTest(); + }]; - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + return CHIP_NO_ERROR; } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestWait10s_20() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 170U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 230U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestWait19s_22() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 19000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_23() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 254U)); } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestPreconditionSendOffCommand_24() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Precondition send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_25() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() - { + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); - CHIP_ERROR - TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() - { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } - CHIP_ERROR - TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() - { + NextTest(); + }]; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + return CHIP_NO_ERROR; } }; -class Test_TC_DLOG_1_1 : public TestCommandBridge { +class Test_TC_LVL_5_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DLOG_1_1() - : TestCommandBridge("Test_TC_DLOG_1_1") + Test_TC_LVL_5_1() + : TestCommandBridge("Test_TC_LVL_5_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -44710,7 +43118,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DLOG_1_1() {} + ~Test_TC_LVL_5_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -44718,11 +43126,11 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DLOG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_5_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DLOG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_5_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -44739,98 +43147,170 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("DLOG.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition Send On Command\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsTheClusterRevisionFromDut_1(); + err = TestPreconditionSendOnCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("DLOG.S.Afffc")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestThReadsTheFeatureMapFromDut_2(); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); - if (ShouldSkip("DLOG.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestThReadsAttributeListFromDut_3(); + err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list " - "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " - "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " - "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); + err = TestThWrites0ToTheOptionsAttribute_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " - "the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp && LVL.S.C06.Rsp")) { NextTest(); return; } - err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); + err = TestThSendsOffCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("DLOG.S.Afff9")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 and " + "TransitionTime =0 (immediate)\n"); + if (ShouldSkip("LVL.S.C06.Rsp")) { NextTest(); return; } - err = TestThReadsAcceptedCommandListFromDut_6(); + err = TestThSendsAStepWithOnOffCommandToDutWithStepMode0x00UpStepSize50AndTransitionTime0Immediate_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); + if (ShouldSkip("OO.S.A0000 && LVL.S.C06.Rsp")) { NextTest(); return; } - err = TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); + err = TestThReadsOnOffAttributeOnOffClusterFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads GeneratedCommandList from DUT\n"); - if (ShouldSkip("DLOG.S.Afff8")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsGeneratedCommandListFromDut_8(); + err = TestThSendsOnCommandToDut_8(); break; case 9: ChipLogProgress(chipTool, - " ***** Test Step 9 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afff8")) { + " ***** Test Step 9 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); + err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and " + "TransitionTime =300\n"); + if (ShouldSkip("LVL.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAStepCommandToTheDutWithStepMode0x00UpStepSize150AndTransitionTime300_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10s\n"); + err = TestWait10s_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10s\n"); + err = TestWait10s_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10s\n"); + err = TestWait10s_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 5000ms\n"); + err = TestWait5000ms_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_19(); + break; + case 20: + ChipLogProgress(chipTool, + " ***** Test Step 20 : TH reads CurrentLevel attribute from DUT (after DUT has finished the transition)\n"); + if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDutAfterDutHasFinishedTheTransition_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Precondition send Off Command\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestPreconditionSendOffCommand_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); break; } @@ -44873,6 +43353,45 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -44886,7 +43405,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; @@ -44901,408 +43420,624 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestPreconditionSendOnCommand_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Precondition Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAttributeListFromDut_3() + CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AttributeList from DUT Error: %@", err); + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + NextTest(); + }]; - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() + CHIP_ERROR TestThSendsOffCommandToDut_5() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends Off command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + CHIP_ERROR TestThSendsAStepWithOnOffCommandToDutWithStepMode0x00UpStepSize50AndTransitionTime0Immediate_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:0U]; + params.stepSize = [NSNumber numberWithUnsignedChar:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stepWithOnOffWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 and " + @"TransitionTime =0 (immediate) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_6() + CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + CHIP_ERROR TestThSendsOnCommandToDut_8() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends On command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsGeneratedCommandListFromDut_8() + CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog( + @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads current level attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9() + CHIP_ERROR TestThSendsAStepCommandToTheDutWithStepMode0x00UpStepSize150AndTransitionTime300_11() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRLevelControlClusterStepParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:0U]; + params.stepSize = [NSNumber numberWithUnsignedChar:150U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stepWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and TransitionTime " + @"=300 Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } -}; -class Test_TC_DGETH_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGETH_1_1() - : TestCommandBridge("Test_TC_DGETH_1_1") - , mTestIndex(0) + CHIP_ERROR TestWait10s_12() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DGETH_1_1() {} + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_13() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_1_1\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("DGETH.S.Afffd")) { - NextTest(); - return; - } - err = TestThReadsTheClusterRevisionFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - if (ShouldSkip(" !DGETH.S.F00 && !DGETH.S.F01 && DGETH.S.Afffc")) { - NextTest(); - return; + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); } - err = TestThReadsTheFeatureMapFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given DGETH.S.F00 ensure featuremap has the correct bit set\n"); - if (ShouldSkip("DGETH.S.F00 && DGETH.S.Afffc")) { + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_14() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 127U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 173U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_16() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 170U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 200U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait5000ms_18() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_19() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDutAfterDutHasFinishedTheTransition_20() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT (after DUT has finished the transition) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestPreconditionSendOffCommand_21() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Precondition send Off Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LVL_6_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LVL_6_1() + : TestCommandBridge("Test_TC_LVL_6_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_LVL_6_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_6_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_6_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: write default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestGivenDgethsf00EnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { + NextTest(); + return; + } + err = TestThWrites0ToTheOptionsAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestThSendsOnCommandToDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given DGETH.S.F01 ensure featuremap has the correct bit set\n"); - if (ShouldSkip("DGETH.S.F01 && DGETH.S.Afffc")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestGivenDgethsf01EnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads AttributeList from DUT\n"); - if (ShouldSkip("DGETH.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsAttributeListFromDut_5(); + err = TestThReadsCurrentLevelAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads optional attribute(PHYRate) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0000 && DGETH.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the " + "Rate field set to 0x05 (5 units/s)\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsOptionalAttributePHYRateInAttributeList_6(); + err = TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads optional attribute(FullDuplex) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0001 && DGETH.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeFullDuplexInAttributeList_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 5000ms\n"); + err = TestWait5000ms_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in " - "AttributeList\n"); - if (ShouldSkip("DGETH.S.A0002 && DGETH.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Sends stop command to DUT\n"); + if (ShouldSkip("LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_8(); + err = TestSendsStopCommandToDut_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in " - "AttributeList\n"); - if (ShouldSkip("DGETH.S.A0003 && DGETH.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Physically verify that the device has stopped transitioning\n"); + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_9(); + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9(); break; case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in " - "AttributeList\n"); - if (ShouldSkip("DGETH.S.A0004 && DGETH.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_10(); + err = TestThReadsCurrentLevelAttributeFromDut_10(); break; case 11: ChipLogProgress(chipTool, - " ***** Test Step 11 : TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in " - "AttributeList\n"); - if (ShouldSkip("DGETH.S.A0005 && DGETH.S.Afffb")) { + " ***** Test Step 11 : TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the " + "Rate field set to 0x05 (5 units/s)\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_11(); + err = TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_11(); break; case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in " - "AttributeList\n"); - if (ShouldSkip("DGETH.S.A0006 && DGETH.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 5000ms\n"); + err = TestWait5000ms_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads optional attribute(CarrierDetect) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0007 && DGETH.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends a StopWithOnOff command to the DUT\n"); + if (ShouldSkip("LVL.S.C07.Rsp")) { NextTest(); return; } - err = TestThReadsOptionalAttributeCarrierDetectInAttributeList_13(); + err = TestThSendsAStopWithOnOffCommandToTheDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads optional attribute(TimeSinceReset) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0008 && DGETH.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Physically verify that the device has stopped transitioning\n"); + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C07.Rsp")) { NextTest(); return; } - err = TestThReadsOptionalAttributeTimeSinceResetInAttributeList_14(); + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14(); break; case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list " - "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " - "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " - "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15(); + err = TestReadsCurrentLevelAttributeFromDut_15(); break; case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " - "the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Precondition send Off Command\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); + err = TestPreconditionSendOffCommand_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("( DGETH.S.F00 || DGETH.S.F01 ) && DGETH.S.Afff9")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListFromDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("DGETH.S.Afff9 && !DGETH.S.F00 && !DGETH.S.F01")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListFromDut_18(); - break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " - "or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afff9")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afff8")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Check on/off attribute value is false after off command\n"); + if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17(); break; } @@ -45369,15 +44104,6 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -45391,7 +44117,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 21; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -45406,121 +44132,113 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenDgethsf00EnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestThSendsOnCommandToDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given DGETH.S.F00 ensure featuremap has the correct bit set Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenDgethsf01EnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given DGETH.S.F01 ensure featuremap has the correct bit set Error: %@", err); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog( + @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAttributeListFromDut_5() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AttributeList from DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); + } NextTest(); }]; @@ -45528,120 +44246,89 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributePHYRateInAttributeList_6() + CHIP_ERROR TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(PHYRate) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedChar:5U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the Rate " + @"field set to 0x05 (5 units/s) Error: %@", + err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeFullDuplexInAttributeList_7() + CHIP_ERROR TestWait5000ms_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(FullDuplex) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_8() + CHIP_ERROR TestSendsStopCommandToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog( - @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterStopParams alloc] init]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stopWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Sends stop command to DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_9() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog( - @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_10() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog( - @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList Error: %@", - err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 64U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 86U)); + } NextTest(); }]; @@ -45649,95 +44336,89 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_11() + CHIP_ERROR TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog( - @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedChar:5U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the Rate " + @"field set to 0x05 (5 units/s) Error: %@", + err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_12() + CHIP_ERROR TestWait5000ms_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog( - @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsOptionalAttributeCarrierDetectInAttributeList_13() + CHIP_ERROR TestThSendsAStopWithOnOffCommandToTheDut_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(CarrierDetect) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stopWithOnOffWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a StopWithOnOff command to the DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeTimeSinceResetInAttributeList_14() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(TimeSinceReset) in AttributeList Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); + } NextTest(); }]; @@ -45745,115 +44426,65 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_17() + CHIP_ERROR TestPreconditionSendOffCommand_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Precondition send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_18() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - - CHIP_ERROR - TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; -class Test_TC_DGETH_2_1 : public TestCommandBridge { +class Test_TC_LVL_7_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGETH_2_1() - : TestCommandBridge("Test_TC_DGETH_2_1") + Test_TC_LVL_7_1() + : TestCommandBridge("Test_TC_LVL_7_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RandomLevelValue", 0, UINT8_MAX, &mRandomLevelValue); + AddArgument("RandomFrequencyValue", 0, UINT16_MAX, &mRandomFrequencyValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DGETH_2_1() {} + ~Test_TC_LVL_7_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -45861,11 +44492,11 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_7_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_7_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -45882,146 +44513,160 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read PHYRate attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: write default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestReadPHYRateAttributeConstraints_1(); + err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read FullDuplex attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 0a: TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadFullDuplexAttributeConstraints_2(); + err = TestStep0aThWrites0ToTheOptionsAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read PacketRxCount attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 0b: TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestReadPacketRxCountAttributeConstraints_3(); + err = TestStep0bThSendsOnCommandToDut_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read PacketRxCount value from DUT and verify the number of packets received on ethernet " - "network interface\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 1a: TH reads the MinLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestReadPacketRxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_4(); + err = TestStep1aThReadsTheMinLevelAttributeFromTheDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read PacketTxCount attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 1b: TH reads the MaxLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestReadPacketTxCountAttributeConstraints_5(); + err = TestStep1bThReadsTheMaxLevelAttributeFromTheDut_5(); break; case 6: ChipLogProgress(chipTool, - " ***** Test Step 6 : Read PacketTxCount value from DUT and verify the number of packets received on ethernet " - "network interface\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0003")) { + " ***** Test Step 6 : Step 1c: TH sends a MoveToLevel command to DUT, with the Level field set to a value between " + "the MinLevel and MaxLevel values (if present, otherwise between 0x01 and 0xFE) and the TransitionTime field set " + "to 0x0000 (move immediately).\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestReadPacketTxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_6(); + err = TestStep1cThSendsAMoveToLevelCommandToDutWithTheLevelFieldSetToAValueBetweenTheMinLevelAndMaxLevelValuesIfPresentOtherwiseBetween0x01And0xFEAndTheTransitionTimeFieldSetTo0x0000MoveImmediately_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read TxErrCount attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0004")) { - NextTest(); - return; - } - err = TestReadTxErrCountAttributeConstraints_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 100ms\n"); + err = TestWait100ms_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Read TxErrCount value from DUT and verify value indicates the number of failed packet " - "transmission on ethernet network interface\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 1d: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadTxErrCountValueFromDutAndVerifyValueIndicatesTheNumberOfFailedPacketTransmissionOnEthernetNetworkInterface_8(); + err = TestStep1dThReadsCurrentLevelAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read CollisionCount attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 2a: TH reads the CurrentFrequency attribute.\n"); + if (ShouldSkip("LVL.S.A0004")) { NextTest(); return; } - err = TestReadCollisionCountAttributeConstraints_9(); + err = TestStep2aThReadsTheCurrentFrequencyAttribute_9(); break; case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Read CollisionCount value from DUT and verify value indicates the number of collision " - "occurred while transmitting packets on ethernet network interface\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 2b: TH reads the MinFrequency attribute.\n"); + if (ShouldSkip("LVL.S.A0005")) { NextTest(); return; } - err = TestReadCollisionCountValueFromDutAndVerifyValueIndicatesTheNumberOfCollisionOccurredWhileTransmittingPacketsOnEthernetNetworkInterface_10(); + err = TestStep2bThReadsTheMinFrequencyAttribute_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read OverrunCount attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0006")) { + ChipLogProgress(chipTool, + " ***** Test Step 11 : Step 2c: TH reads the MaxFrequency attribute and check, if fmax < fmin, FAIL the test.\n"); + if (ShouldSkip("LVL.S.A0006")) { NextTest(); return; } - err = TestReadOverrunCountAttributeConstraints_11(); + err = TestStep2cThReadsTheMaxFrequencyAttributeAndCheckIfFmaxFminFailTheTest_11(); break; case 12: ChipLogProgress(chipTool, - " ***** Test Step 12 : Read OverrunCount value from DUT and verify value indicates the number of packets dropped " - "due to lack of buffer memory on ethernet network interface\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0006")) { + " ***** Test Step 12 : Step 2d: sanity check on values read in steps 2a..2c, if fc < fmin, FAIL the test and fc > " + "fmax, FAIL the test\n"); + if (ShouldSkip("LVL.S.A0004")) { NextTest(); return; } - err = TestReadOverrunCountValueFromDutAndVerifyValueIndicatesTheNumberOfPacketsDroppedDueToLackOfBufferMemoryOnEthernetNetworkInterface_12(); + err = TestStep2dSanityCheckOnValuesReadInSteps2a2cIfFcFminFailTheTestAndFcFmaxFailTheTest_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read CarrierDetect attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0007")) { + ChipLogProgress(chipTool, + " ***** Test Step 13 : Step 3a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to " + "a random value frand, chosen such that: fmin < frand < fmax\n"); + if (ShouldSkip("LVL.S.C08.Rsp")) { NextTest(); return; } - err = TestReadCarrierDetectAttributeConstraints_13(); + err = TestStep3aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToARandomValueFrandChosenSuchThatFminFrandFmax_13(); break; case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 100ms\n"); + err = TestWait100ms_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 3b: TH reads the CurrentFrequency attribute.\n"); + if (ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004")) { + NextTest(); + return; + } + err = TestStep3bThReadsTheCurrentFrequencyAttribute_15(); + break; + case 16: ChipLogProgress(chipTool, - " ***** Test Step 14 : Read CarrierDetect value from DUT and verify value indicates the presence of carrier detect " - "control signal on ethernet network interface\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0007")) { + " ***** Test Step 16 : Step 4a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to " + "fmax + 1\n"); + if (ShouldSkip("LVL.S.C08.Rsp && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadCarrierDetectValueFromDutAndVerifyValueIndicatesThePresenceOfCarrierDetectControlSignalOnEthernetNetworkInterface_14(); + err = TestStep4aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmax1_16(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read TimeSinceReset attribute constraints\n"); - if (ShouldSkip("DGETH.S.A0008")) { + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: TH reads the CurrentFrequency attribute.\n"); + if (ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadTimeSinceResetAttributeConstraints_15(); + err = TestStep4bThReadsTheCurrentFrequencyAttribute_17(); break; - case 16: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 16 : Read TimeSinceReset value from DUT and verify the value indicates the duration of time, in " - "minutes\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0008")) { + " ***** Test Step 18 : Step 5a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to " + "fmin - 1\n"); + if (ShouldSkip("LVL.S.C08.Rsp && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadTimeSinceResetValueFromDutAndVerifyTheValueIndicatesTheDurationOfTimeInMinutes_16(); + err = TestStep5aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmin1_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 5b: TH reads the CurrentFrequency attribute.\n"); + if (ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004 && PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestStep5bThReadsTheCurrentFrequencyAttribute_19(); break; } @@ -46085,6 +44730,15 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -46098,11 +44752,13 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRandomLevelValue; + chip::Optional mRandomFrequencyValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -46113,199 +44769,279 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadPHYRateAttributeConstraints_1() + CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PHYRate attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); - VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFullDuplexAttributeConstraints_2() + CHIP_ERROR TestStep0aThWrites0ToTheOptionsAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFullDuplexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read FullDuplex attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 0a: TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckConstraintType("fullDuplex", "boolean", "boolean")); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadPacketRxCountAttributeConstraints_3() + CHIP_ERROR TestStep0bThSendsOnCommandToDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PacketRxCount attribute constraints Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Step 0b: TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetRxCount", "int64u", "int64u")); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull minLevelValue; - CHIP_ERROR TestReadPacketRxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_4() + CHIP_ERROR TestStep1aThReadsTheMinLevelAttributeFromTheDut_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1a: TH reads the MinLevel attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 254U)); + { + minLevelValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } + NSNumber * _Nonnull maxLevelValue; - CHIP_ERROR TestReadPacketTxCountAttributeConstraints_5() + CHIP_ERROR TestStep1bThReadsTheMaxLevelAttributeFromTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PacketTxCount attribute constraints Error: %@", err); + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1b: TH reads the MaxLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetTxCount", "int64u", "int64u")); + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); + { + maxLevelValue = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadPacketTxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_6() + CHIP_ERROR + TestStep1cThSendsAMoveToLevelCommandToDutWithTheLevelFieldSetToAValueBetweenTheMinLevelAndMaxLevelValuesIfPresentOtherwiseBetween0x01And0xFEAndTheTransitionTimeFieldSetTo0x0000MoveImmediately_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = mRandomLevelValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRandomLevelValue.Value()] + : [NSNumber numberWithUnsignedChar:100U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 1c: TH sends a MoveToLevel command to DUT, with the Level field set to a value " + @"between the MinLevel and MaxLevel values (if present, otherwise between 0x01 and 0xFE) and " + @"the TransitionTime field set to 0x0000 (move immediately). Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTxErrCountAttributeConstraints_7() + CHIP_ERROR TestWait100ms_7() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep1dThReadsCurrentLevelAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read TxErrCount attribute constraints Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1d: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("txErrCount", "int64u", "int64u")); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn( + CheckValue("CurrentLevel", actualValue, mRandomLevelValue.HasValue() ? mRandomLevelValue.Value() : 100U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentFrequencyValue; - CHIP_ERROR - TestReadTxErrCountValueFromDutAndVerifyValueIndicatesTheNumberOfFailedPacketTransmissionOnEthernetNetworkInterface_8() + CHIP_ERROR TestStep2aThReadsTheCurrentFrequencyAttribute_9() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2a: TH reads the CurrentFrequency attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], 65535U)); + { + CurrentFrequencyValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } + NSNumber * _Nonnull MinFrequencyValue; - CHIP_ERROR TestReadCollisionCountAttributeConstraints_9() + CHIP_ERROR TestStep2bThReadsTheMinFrequencyAttribute_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read CollisionCount attribute constraints Error: %@", err); + [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2b: TH reads the MinFrequency attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("collisionCount", "int64u", "int64u")); + VerifyOrReturn(CheckConstraintType("minFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("minFrequency", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minFrequency", [value unsignedShortValue], 65535U)); + { + MinFrequencyValue = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull MaxFrequencyValue; - CHIP_ERROR - TestReadCollisionCountValueFromDutAndVerifyValueIndicatesTheNumberOfCollisionOccurredWhileTransmittingPacketsOnEthernetNetworkInterface_10() + CHIP_ERROR TestStep2cThReadsTheMaxFrequencyAttributeAndCheckIfFmaxFminFailTheTest_11() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2c: TH reads the MaxFrequency attribute and check, if fmax < fmin, FAIL the test. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("maxFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("maxFrequency", [value unsignedShortValue], MinFrequencyValue)); + VerifyOrReturn(CheckConstraintMaxValue("maxFrequency", [value unsignedShortValue], 65535U)); + { + MaxFrequencyValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOverrunCountAttributeConstraints_11() + CHIP_ERROR TestStep2dSanityCheckOnValuesReadInSteps2a2cIfFcFminFailTheTestAndFcFmaxFailTheTest_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read OverrunCount attribute constraints Error: %@", err); + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2d: sanity check on values read in steps 2a..2c, if fc < fmin, FAIL the test and fc > fmax, FAIL the test " + @"Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("overrunCount", "int64u", "int64u")); + VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], MinFrequencyValue)); + VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], MaxFrequencyValue)); + NextTest(); }]; @@ -46313,33 +45049,55 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { } CHIP_ERROR - TestReadOverrunCountValueFromDutAndVerifyValueIndicatesTheNumberOfPacketsDroppedDueToLackOfBufferMemoryOnEthernetNetworkInterface_12() + TestStep3aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToARandomValueFrandChosenSuchThatFminFrandFmax_13() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; + params.frequency = mRandomFrequencyValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRandomFrequencyValue.Value()] + : [NSNumber numberWithUnsignedShort:30000U]; + [cluster + moveToClosestFrequencyWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 3a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field " + @"set to a random value frand, chosen such that: fmin < frand < fmax Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadCarrierDetectAttributeConstraints_13() + CHIP_ERROR TestWait100ms_14() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep3bThReadsTheCurrentFrequencyAttribute_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCarrierDetectWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read CarrierDetect attribute constraints Error: %@", err); + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3b: TH reads the CurrentFrequency attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("carrierDetect", "boolean", "boolean")); + { + id actualValue = value; + VerifyOrReturn(CheckValue( + "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); } NextTest(); @@ -46348,8 +45106,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadCarrierDetectValueFromDutAndVerifyValueIndicatesThePresenceOfCarrierDetectControlSignalOnEthernetNetworkInterface_14() + CHIP_ERROR TestStep4aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmax1_16() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -46359,28 +45116,31 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTimeSinceResetAttributeConstraints_15() + CHIP_ERROR TestStep4bThReadsTheCurrentFrequencyAttribute_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTimeSinceResetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read TimeSinceReset attribute constraints Error: %@", err); + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: TH reads the CurrentFrequency attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("timeSinceReset", "int64u", "int64u")); + { + id actualValue = value; + VerifyOrReturn(CheckValue( + "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTimeSinceResetValueFromDutAndVerifyTheValueIndicatesTheDurationOfTimeInMinutes_16() + CHIP_ERROR TestStep5aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmin1_18() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -46389,13 +45149,37 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } + + CHIP_ERROR TestStep5bThReadsTheCurrentFrequencyAttribute_19() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5b: TH reads the CurrentFrequency attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue( + "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; -class Test_TC_DGETH_2_2 : public TestCommandBridge { +class Test_TC_LCFG_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGETH_2_2() - : TestCommandBridge("Test_TC_DGETH_2_2") + Test_TC_LCFG_1_1() + : TestCommandBridge("Test_TC_LCFG_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -46405,7 +45189,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DGETH_2_2() {} + ~Test_TC_LCFG_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -46413,11 +45197,11 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LCFG_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LCFG_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -46434,172 +45218,28 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads PHYRate attribute from DUT\n"); - if (ShouldSkip("DGETH.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsPHYRateAttributeFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads PHYRate attribute from DUT\n"); - if (ShouldSkip("DGETH.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsPHYRateAttributeFromDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads PHYRate attribute from DUT\n"); - if (ShouldSkip("DGETH.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsPHYRateAttributeFromDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads PHYRate attribute from DUT\n"); - if (ShouldSkip("DGETH.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsPHYRateAttributeFromDut_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: EventList\n"); + NextTest(); + return; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads PHYRate attribute from DUT\n"); - if (ShouldSkip("DGETH.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsPHYRateAttributeFromDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads PHYRate attribute from DUT\n"); - if (ShouldSkip("DGETH.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsPHYRateAttributeFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads PHYRate attribute from DUT\n"); - if (ShouldSkip("DGETH.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsPHYRateAttributeFromDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads PHYRate attribute from DUT\n"); - if (ShouldSkip("DGETH.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsPHYRateAttributeFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads PHYRate attribute from DUT\n"); - if (ShouldSkip("DGETH.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsPHYRateAttributeFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads PHYRate attribute from DUT\n"); - if (ShouldSkip("DGETH.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsPHYRateAttributeFromDut_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads PacketRxCount attribute value from DUT\n"); - if (ShouldSkip("DGETH.S.A0002")) { - NextTest(); - return; - } - err = TestThReadsPacketRxCountAttributeValueFromDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads PacketTxCount attribute value from DUT\n"); - if (ShouldSkip("DGETH.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsPacketTxCountAttributeValueFromDut_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads TxErrCount attribute value from DUT\n"); - if (ShouldSkip("DGETH.S.A0004")) { - NextTest(); - return; - } - err = TestThReadsTxErrCountAttributeValueFromDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CollisionCount attribute value from DUT\n"); - if (ShouldSkip("DGETH.S.A0005")) { - NextTest(); - return; - } - err = TestThReadsCollisionCountAttributeValueFromDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads OverrunCount attribute value from DUT\n"); - if (ShouldSkip("DGETH.S.A0006")) { - NextTest(); - return; - } - err = TestThReadsOverrunCountAttributeValueFromDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Sends ResetCounts command\n"); - if (ShouldSkip("DGETH.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestSendsResetCountsCommand_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads PacketRxCount attribute value from DUT\n"); - if (ShouldSkip("DGETH.S.A0002 && PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThReadsPacketRxCountAttributeValueFromDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads PacketTxCount attribute value from DUT\n"); - if (ShouldSkip("DGETH.S.A0003 && PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThReadsPacketTxCountAttributeValueFromDut_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads TxErrCount attribute value from DUT\n"); - if (ShouldSkip("DGETH.S.A0004")) { - NextTest(); - return; - } - err = TestThReadsTxErrCountAttributeValueFromDut_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CollisionCount attribute value from DUT\n"); - if (ShouldSkip("DGETH.S.A0005")) { - NextTest(); - return; - } - err = TestThReadsCollisionCountAttributeValueFromDut_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads OverrunCount attribute value from DUT\n"); - if (ShouldSkip("DGETH.S.A0006")) { - NextTest(); - return; - } - err = TestThReadsOverrunCountAttributeValueFromDut_21(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_6(); break; } @@ -46633,51 +45273,6 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -46691,7 +45286,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 22; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -46706,80 +45301,81 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsPHYRateAttributeFromDut_1() + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsPHYRateAttributeFromDut_2() + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsPHYRateAttributeFromDut_3() + CHIP_ERROR TestThReadsAttributeListFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -46787,454 +45383,421 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsPHYRateAttributeFromDut_4() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsPHYRateAttributeFromDut_5() + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestThReadsPHYRateAttributeFromDut_6() +class Test_TC_LUNIT_1_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LUNIT_1_2() + : TestCommandBridge("Test_TC_LUNIT_1_2") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestThReadsPHYRateAttributeFromDut_7() - { + ~Test_TC_LUNIT_1_2() {} - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LUNIT_1_2\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_1_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - if (value != nil) { + Wait(); - VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + if (ShouldSkip("LUNIT.S.Afffd")) { + NextTest(); + return; + } + err = TestThReadsTheClusterRevisionFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip("LUNIT.S.Afffc && !LUNIT.S.F00")) { + NextTest(); + return; + } + err = TestThReadsTheFeatureMapFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("LUNIT.S.Afffc && LUNIT.S.F00")) { + NextTest(); + return; + } + err = TestGivenLunitsf00tempEnsureFeaturemapHasTheCorrectBitSet_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AttributeList from DUT\n"); + if (ShouldSkip("LUNIT.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsAttributeListFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList\n"); + if (ShouldSkip("LUNIT.S.Afffb && LUNIT.S.F00")) { + NextTest(); + return; + } + err = TestThReadsFeatureDependentLUNITSF00AttributeInAttributeList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads EventList from DUT\n"); + if (ShouldSkip("LUNIT.S.Afffa")) { + NextTest(); + return; } - NextTest(); - }]; + return; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip("LUNIT.S.Afff9")) { + NextTest(); + return; + } + err = TestThReadsAcceptedCommandListFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads GeneratedCommandList from DUT\n"); + if (ShouldSkip("LUNIT.S.Afff8")) { + NextTest(); + return; + } + err = TestThReadsGeneratedCommandListFromDut_8(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestThReadsPHYRateAttributeFromDut_8() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - if (value != nil) { +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 9; - VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsPHYRateAttributeFromDut_9() + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsPHYRateAttributeFromDut_10() + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull PacketRxCountValue; - CHIP_ERROR TestThReadsPacketRxCountAttributeValueFromDut_11() + CHIP_ERROR TestGivenLunitsf00tempEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads PacketRxCount attribute value from DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - PacketRxCountValue = value; - } - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull PacketTxCountValue; - CHIP_ERROR TestThReadsPacketTxCountAttributeValueFromDut_12() + CHIP_ERROR TestThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads PacketTxCount attribute value from DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - PacketTxCountValue = value; - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull TxErrCountValue; - CHIP_ERROR TestThReadsTxErrCountAttributeValueFromDut_13() + CHIP_ERROR TestThReadsFeatureDependentLUNITSF00AttributeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - TxErrCountValue = value; - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull CollisionCountValue; - CHIP_ERROR TestThReadsCollisionCountAttributeValueFromDut_14() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - CollisionCountValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull OverrunCountValue; - CHIP_ERROR TestThReadsOverrunCountAttributeValueFromDut_15() + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - OverrunCountValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestSendsResetCountsCommand_16() +class Test_TC_LUNIT_3_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LUNIT_3_1() + : TestCommandBridge("Test_TC_LUNIT_3_1") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster resetCountsWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Sends ResetCounts command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestThReadsPacketRxCountAttributeValueFromDut_17() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + ~Test_TC_LUNIT_3_1() {} - CHIP_ERROR TestThReadsPacketTxCountAttributeValueFromDut_18() + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsTxErrCountAttributeValueFromDut_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMaxValue("txErrCount", [value unsignedLongLongValue], TxErrCountValue)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsCollisionCountAttributeValueFromDut_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMaxValue("collisionCount", [value unsignedLongLongValue], CollisionCountValue)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOverrunCountAttributeValueFromDut_21() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMaxValue("overrunCount", [value unsignedLongLongValue], OverrunCountValue)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLW_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FLW_1_1() - : TestCommandBridge("Test_TC_FLW_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_FLW_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_1_1\n"); - } + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LUNIT_3_1\n"); + } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_3_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -47251,90 +45814,68 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("FLW.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads TemperatureUnit attribute from DUT\n"); + if (ShouldSkip("LUNIT.S.A0000")) { NextTest(); return; } - err = TestReadTheGlobalAttributeClusterRevision_1(); + err = TestThReadsTemperatureUnitAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("FLW.S.Afffc")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes 0 (Fahrenheit) to TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMap_2(); + err = TestThWrites0FahrenheitToTemperatureUnitAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("FLW.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_3(); + err = TestThReadsTemperatureUnitAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(Tolerance) in AttributeList\n"); - if (ShouldSkip("FLW.S.A0003 && FLW.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH writes 1 (Celsius) to TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius")) { NextTest(); return; } - err = TestReadTheOptionalAttributeToleranceInAttributeList_4(); + err = TestThWrites1CelsiusToTemperatureUnitAttribute_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list " - "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " - "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " - "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLW.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius")) { NextTest(); return; } - err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); + err = TestThReadsTemperatureUnitAttribute_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " - "the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLW.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH writes 2 (Kelvin) to TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin")) { NextTest(); return; } - err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); + err = TestThWrites2KelvinToTemperatureUnitAttribute_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLW.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin")) { NextTest(); return; } - err = TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); + err = TestThReadsTemperatureUnitAttribute_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLW.S.Afff8")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH writes 5 to TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000")) { NextTest(); return; } - err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); + err = TestThWrites5ToTemperatureUnitAttribute_8(); break; } @@ -47372,7 +45913,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; } @@ -47402,97 +45943,106 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsTemperatureUnitAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TemperatureUnit attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintType("temperatureUnit", "enum8", "enum8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestThWrites0FahrenheitToTemperatureUnitAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + id temperatureUnitArgument; + temperatureUnitArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 (Fahrenheit) to TemperatureUnit attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTemperatureUnitAttribute_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TemperatureUnit attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestThWrites1CelsiusToTemperatureUnitAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id temperatureUnitArgument; + temperatureUnitArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 1 (Celsius) to TemperatureUnit attribute Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() + CHIP_ERROR TestThReadsTemperatureUnitAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TemperatureUnit attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 1U)); + } NextTest(); }]; @@ -47500,56 +46050,81 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + CHIP_ERROR TestThWrites2KelvinToTemperatureUnitAttribute_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() - { + id temperatureUnitArgument; + temperatureUnitArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 2 (Kelvin) to TemperatureUnit attribute Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + CHIP_ERROR TestThReadsTemperatureUnitAttribute_7() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TemperatureUnit attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() + CHIP_ERROR TestThWrites5ToTemperatureUnitAttribute_8() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id temperatureUnitArgument; + temperatureUnitArgument = [NSNumber numberWithUnsignedChar:5U]; + [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 5 to TemperatureUnit attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_FLW_2_1 : public TestCommandBridge { +class Test_TC_LTIME_1_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FLW_2_1() - : TestCommandBridge("Test_TC_FLW_2_1") + Test_TC_LTIME_1_2() + : TestCommandBridge("Test_TC_LTIME_1_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -47559,7 +46134,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_FLW_2_1() {} + ~Test_TC_LTIME_1_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -47567,11 +46142,11 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LTIME_1_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LTIME_1_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -47588,36 +46163,70 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: MinMeasuredValue\n"); - if (ShouldSkip("FLW.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + if (ShouldSkip("LTIME.S.Afffd")) { NextTest(); return; } - err = TestReadTheMandatoryAttributeMinMeasuredValue_1(); + err = TestThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MaxMeasuredValue\n"); - if (ShouldSkip("FLW.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip("LTIME.S.Afffc")) { NextTest(); return; } - err = TestReadTheMandatoryAttributeMaxMeasuredValue_2(); + err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute: MeasuredValue\n"); - if (ShouldSkip("FLW.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + if (ShouldSkip("LTIME.S.Afffb")) { NextTest(); return; } - err = TestReadTheMandatoryAttributeMeasuredValue_3(); + err = TestThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the Tolerance attribute\n"); - if (ShouldSkip("FLW.S.A0003")) { + ChipLogProgress( + chipTool, " ***** Test Step 4 : TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT\n"); + if (ShouldSkip("LTIME.S.Afffb && LTIME.S.A0001")) { NextTest(); return; } - err = TestThReadsFromTheDutTheToleranceAttribute_4(); + err = TestThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_4(); + break; + case 5: + ChipLogProgress( + chipTool, " ***** Test Step 5 : TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT\n"); + if (ShouldSkip("LTIME.S.Afffb && LTIME.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads EventList from DUT\n"); + if (ShouldSkip("LTIME.S.Afffa")) { + NextTest(); + return; + } + NextTest(); + return; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip("LTIME.S.Afff9")) { + NextTest(); + return; + } + err = TestThReadsAcceptedCommandListFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads GeneratedCommandList from DUT\n"); + if (ShouldSkip("LTIME.S.Afff8")) { + NextTest(); + return; + } + err = TestThReadsGeneratedCommandListFromDut_8(); break; } @@ -47645,6 +46254,18 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -47658,7 +46279,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -47673,49 +46294,78 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_1() + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: MinMeasuredValue Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65533U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_2() + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: MaxMeasuredValue Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 1UL)); - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65534U)); - } + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAttributeListFromDut_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -47723,47 +46373,98 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_3() + CHIP_ERROR TestThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: MeasuredValue Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65535U)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheToleranceAttribute_4() + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the Tolerance attribute Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -47771,11 +46472,11 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { } }; -class Test_TC_FLABEL_1_1 : public TestCommandBridge { +class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FLABEL_1_1() - : TestCommandBridge("Test_TC_FLABEL_1_1") + Test_TC_LOWPOWER_1_1() + : TestCommandBridge("Test_TC_LOWPOWER_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -47785,7 +46486,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_FLABEL_1_1() {} + ~Test_TC_LOWPOWER_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -47793,11 +46494,11 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLABEL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LOWPOWER_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLABEL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LOWPOWER_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -47814,82 +46515,29 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("FLABEL.S.Afffd")) { - NextTest(); - return; - } - err = TestThReadsTheClusterRevisionFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("FLABEL.S.Afffc")) { - NextTest(); - return; - } - err = TestThReadsTheFeatureMapFromDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); - if (ShouldSkip("FLABEL.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsAttributeListFromDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list " - "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " - "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " - "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " - "the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afffa")) { - NextTest(); - return; - } - err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afff9")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afff8")) { - NextTest(); - return; - } - err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: EventList\n"); + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -47922,9 +46570,6 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -47938,7 +46583,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -47953,15 +46598,15 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47977,15 +46622,15 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48001,83 +46646,91 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAttributeListFromDut_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AttributeList from DUT Error: %@", err); + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(6))); + VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65530UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65533UL)); + } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() - { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR - TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() - { + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_FAN_1_1 : public TestCommandBridge { +class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FAN_1_1() - : TestCommandBridge("Test_TC_FAN_1_1") + Test_TC_KEYPADINPUT_1_2() + : TestCommandBridge("Test_TC_KEYPADINPUT_1_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -48087,7 +46740,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_FAN_1_1() {} + ~Test_TC_KEYPADINPUT_1_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -48095,11 +46748,11 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_KEYPADINPUT_1_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_KEYPADINPUT_1_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -48117,126 +46770,56 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !FAN.S.F00 && !FAN.S.F01 && !FAN.S.F02 && !FAN.S.F03 && !FAN.S.F04 && !FAN.S.F05 ")) { + if (ShouldSkip(" !KEYPADINPUT.S.F00 && KEYPADINPUT.S.F01 && !KEYPADINPUT.S.F02 ")) { NextTest(); return; } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Given FAN.S.F00(Condition) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FAN.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Given (KEYPADINPUT.S.F00(NV)) FeatureMap bit mask is set or not\n"); + if (ShouldSkip("KEYPADINPUT.S.F00")) { NextTest(); return; } - err = TestGivenFANSF00ConditionEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestGivenKeypadinputsf00nvFeatureMapBitMaskIsSetOrNot_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given FAN.S.F01(Warning) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FAN.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Given (KEYPADINPUT.S.F01(LK)) FeatureMap bit mask is set or not\n"); + if (ShouldSkip("KEYPADINPUT.S.F01")) { NextTest(); return; } - err = TestGivenFANSF01WarningEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestGivenKeypadinputsf01lkFeatureMapBitMaskIsSetOrNot_4(); break; case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : Given FAN.S.F02(Condition) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FAN.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Given (KEYPADINPUT.S.F02(NK)) FeatureMap bit mask is set or not\n"); + if (ShouldSkip("KEYPADINPUT.S.F02")) { NextTest(); return; } - err = TestGivenFANSF02ConditionEnsureFeaturemapHasTheCorrectBitSet_5(); + err = TestGivenKeypadinputsf02nkFeatureMapBitMaskIsSetOrNot_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given FAN.S.F03(Warning) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FAN.S.F03")) { - NextTest(); - return; - } - err = TestGivenFANSF03WarningEnsureFeaturemapHasTheCorrectBitSet_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Given FAN.S.F04(Warning) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FAN.S.F04")) { - NextTest(); - return; - } - err = TestGivenFANSF04WarningEnsureFeaturemapHasTheCorrectBitSet_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Given FAN.S.F05(Warning) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FAN.S.F05")) { - NextTest(); - return; - } - err = TestGivenFANSF05WarningEnsureFeaturemapHasTheCorrectBitSet_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_9(); - break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList\n"); - if (ShouldSkip("FAN.S.F00")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentFansf00SpdAttributeInAttributeList_10(); - break; - case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList\n"); - if (ShouldSkip("FAN.S.F02")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentFansf02rckAttributeInAttributeList_11(); - break; - case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Read the feature dependent FAN.S.F03(WND) attribute in AttributeList\n"); - if (ShouldSkip("FAN.S.F03")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentFansf03wndAttributeInAttributeList_12(); - break; - case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList\n"); - if (ShouldSkip("FAN.S.F05")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentFansf05dirAttributeInAttributeList_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip(" !FAN.S.C00.Rsp ")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional command (ResetCondition) in AcceptedCommandList\n"); - if (ShouldSkip("FAN.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestReadTheOptionalCommandResetConditionInAcceptedCommandList_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: EventList\n"); + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -48278,24 +46861,6 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -48309,7 +46874,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -48325,88 +46890,45 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenFANSF00ConditionEnsureFeaturemapHasTheCorrectBitSet_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FAN.S.F00(Condition) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenFANSF01WarningEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FAN.S.F01(Warning) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenFANSF02ConditionEnsureFeaturemapHasTheCorrectBitSet_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FAN.S.F02(Condition) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); @@ -48415,15 +46937,15 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenFANSF03WarningEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestGivenKeypadinputsf00nvFeatureMapBitMaskIsSetOrNot_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FAN.S.F03(Warning) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Given (KEYPADINPUT.S.F00(NV)) FeatureMap bit mask is set or not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48434,15 +46956,15 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenFANSF04WarningEnsureFeaturemapHasTheCorrectBitSet_7() + CHIP_ERROR TestGivenKeypadinputsf01lkFeatureMapBitMaskIsSetOrNot_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FAN.S.F04(Warning) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Given (KEYPADINPUT.S.F01(LK)) FeatureMap bit mask is set or not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48453,15 +46975,15 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenFANSF05WarningEnsureFeaturemapHasTheCorrectBitSet_8() + CHIP_ERROR TestGivenKeypadinputsf02nkFeatureMapBitMaskIsSetOrNot_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given FAN.S.F05(Warning) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Given (KEYPADINPUT.S.F02(NK)) FeatureMap bit mask is set or not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48472,11 +46994,11 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_9() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -48485,10 +47007,6 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -48502,22 +47020,20 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentFansf00SpdAttributeInAttributeList_10() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); }]; @@ -48525,109 +47041,20 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentFansf02rckAttributeInAttributeList_11() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentFansf03wndAttributeInAttributeList_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent FAN.S.F03(WND) attribute in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentFansf05dirAttributeInAttributeList_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalCommandResetConditionInAcceptedCommandList_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command (ResetCondition) in AcceptedCommandList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); NextTest(); }]; @@ -48636,11 +47063,11 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { } }; -class Test_TC_FAN_2_1 : public TestCommandBridge { +class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FAN_2_1() - : TestCommandBridge("Test_TC_FAN_2_1") + Test_TC_APPLAUNCHER_1_3() + : TestCommandBridge("Test_TC_APPLAUNCHER_1_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -48650,7 +47077,7 @@ class Test_TC_FAN_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_FAN_2_1() {} + ~Test_TC_APPLAUNCHER_1_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -48658,11 +47085,11 @@ class Test_TC_FAN_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_APPLAUNCHER_1_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APPLAUNCHER_1_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -48679,37 +47106,57 @@ class Test_TC_FAN_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the the FanMode attribute\n"); - if (ShouldSkip("FAN.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheTheFanModeAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the the FanModeSequence attribute\n"); - if (ShouldSkip("FAN.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("APPLAUNCHER.S.F00")) { NextTest(); return; } - err = TestThReadsFromTheDutTheTheFanModeSequenceAttribute_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the the PercentSetting attribute\n"); - if (ShouldSkip("FAN.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip(" !APPLAUNCHER.S.F00 ")) { NextTest(); return; } - err = TestThReadsFromTheDutTheThePercentSettingAttribute_3(); + err = TestReadTheGlobalAttributeFeatureMap_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the the PercentCurrent attribute\n"); - if (ShouldSkip("FAN.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(CatalogList) in AttributeList\n"); + if (ShouldSkip("APPLAUNCHER.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheThePercentCurrentAttribute_4(); + err = TestReadTheOptionalAttributeCatalogListInAttributeList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(CurrentApp) in AttributeList\n"); + if (ShouldSkip("APPLAUNCHER.S.A0001")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeCurrentAppInAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_8(); break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: EventList\n"); + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -48736,6 +47183,21 @@ class Test_TC_FAN_2_1 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -48749,7 +47211,7 @@ class Test_TC_FAN_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -48764,90 +47226,199 @@ class Test_TC_FAN_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheTheFanModeAttribute_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the the FanMode attribute Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("fanMode", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("fanMode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("fanMode", [value unsignedCharValue], 6U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheTheFanModeSequenceAttribute_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the the FanModeSequence attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("fanModeSequence", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("fanModeSequence", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("fanModeSequence", [value unsignedCharValue], 5U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheThePercentSettingAttribute_3() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the the PercentSetting attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("percentSetting", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("percentSetting", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("percentSetting", [value unsignedCharValue], 100U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheThePercentCurrentAttribute_4() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the the PercentCurrent attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("percentCurrent", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("percentCurrent", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("percentCurrent", [value unsignedCharValue], 100U)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeCatalogListInAttributeList_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(CatalogList) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeCurrentAppInAttributeList_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(CurrentApp) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); NextTest(); }]; @@ -48856,11 +47427,11 @@ class Test_TC_FAN_2_1 : public TestCommandBridge { } }; -class Test_TC_FAN_2_2 : public TestCommandBridge { +class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FAN_2_2() - : TestCommandBridge("Test_TC_FAN_2_2") + Test_TC_MEDIAINPUT_1_4() + : TestCommandBridge("Test_TC_MEDIAINPUT_1_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -48870,7 +47441,7 @@ class Test_TC_FAN_2_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_FAN_2_2() {} + ~Test_TC_MEDIAINPUT_1_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -48878,11 +47449,11 @@ class Test_TC_FAN_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAINPUT_1_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAINPUT_1_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -48899,29 +47470,58 @@ class Test_TC_FAN_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the the SpeedMax attribute\n"); - if (ShouldSkip("FAN.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip(" !MEDIAINPUT.S.F00 ")) { NextTest(); return; } - err = TestThReadsFromTheDutTheTheSpeedMaxAttribute_1(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the the SpeedSetting attribute\n"); - if (ShouldSkip("FAN.S.A0005 && FAN.S.A0004")) { + case 3: + ChipLogProgress( + chipTool, " ***** Test Step 3 : Given MEDIAINPUT.S.F00(NU) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("MEDIAINPUT.S.F00")) { NextTest(); return; } - err = TestThReadsFromTheDutTheTheSpeedSettingAttribute_2(); + err = TestGivenMediainputsf00nuEnsureFeaturemapHasTheCorrectBitSet_3(); break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the the SpeedCurrent attribute\n"); - if (ShouldSkip("FAN.S.A0006 && FAN.S.A0004")) { + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(InputList) in AttributeList\n"); + if (ShouldSkip("MEDIAINPUT.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheTheSpeedCurrentAttribute_3(); + err = TestReadTheOptionalAttributeInputListInAttributeList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(CurrentInput) in AttributeList\n"); + if (ShouldSkip("MEDIAINPUT.S.A0001")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeCurrentInputInAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_8(); break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: EventList\n"); + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -48945,6 +47545,24 @@ class Test_TC_FAN_2_2 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -48958,7 +47576,7 @@ class Test_TC_FAN_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -48972,219 +47590,184 @@ class Test_TC_FAN_2_2 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nonnull SpeedMaxValue; - CHIP_ERROR TestThReadsFromTheDutTheTheSpeedMaxAttribute_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the the SpeedMax attribute Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("speedMax", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("speedMax", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("speedMax", [value unsignedCharValue], 100U)); { - SpeedMaxValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheTheSpeedSettingAttribute_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the the SpeedSetting attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("speedSetting", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("speedSetting", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("speedSetting", [value unsignedCharValue], SpeedMaxValue)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheTheSpeedCurrentAttribute_3() + CHIP_ERROR TestGivenMediainputsf00nuEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the the SpeedCurrent attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given MEDIAINPUT.S.F00(NU) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("speedCurrent", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("speedCurrent", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("speedCurrent", [value unsignedCharValue], SpeedMaxValue)); - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_FAN_2_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FAN_2_3() - : TestCommandBridge("Test_TC_FAN_2_3") - , mTestIndex(0) + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_FAN_2_3() {} - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_2_3\n"); - } + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_2_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the the RockSupport attribute\n"); - if (ShouldSkip("FAN.S.A0007")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheTheRockSupportAttribute_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the the RockSetting attribute\n"); - if (ShouldSkip("FAN.S.A0008")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheTheRockSettingAttribute_2(); - break; - } + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadTheOptionalAttributeInputListInAttributeList_5() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(InputList) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestReadTheOptionalAttributeCurrentInputInAttributeList_6() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(CurrentInput) in AttributeList Error: %@", err); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheTheRockSupportAttribute_1() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the the RockSupport attribute Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("rockSupport", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheTheRockSettingAttribute_2() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the the RockSetting attribute Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("rockSetting", "bitmap8", "bitmap8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -49192,11 +47775,11 @@ class Test_TC_FAN_2_3 : public TestCommandBridge { } }; -class Test_TC_FAN_2_4 : public TestCommandBridge { +class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FAN_2_4() - : TestCommandBridge("Test_TC_FAN_2_4") + Test_TC_WAKEONLAN_1_5() + : TestCommandBridge("Test_TC_WAKEONLAN_1_5") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -49206,7 +47789,7 @@ class Test_TC_FAN_2_4 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_FAN_2_4() {} + ~Test_TC_WAKEONLAN_1_5() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -49214,11 +47797,11 @@ class Test_TC_FAN_2_4 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_2_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WAKEONLAN_1_5\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_2_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WAKEONLAN_1_5\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -49235,21 +47818,37 @@ class Test_TC_FAN_2_4 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the the WindSupport attribute\n"); - if (ShouldSkip("FAN.S.A0009")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheTheWindSupportAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the the WindSetting attribute\n"); - if (ShouldSkip("FAN.S.A000A")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(MACAddress) in AttributeList\n"); + if (ShouldSkip("WAKEONLAN.S.A0000")) { NextTest(); return; } - err = TestThReadsFromTheDutTheTheWindSettingAttribute_2(); + err = TestReadTheOptionalAttributeMACAddressInAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: EventList\n"); + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -49270,6 +47869,21 @@ class Test_TC_FAN_2_4 : public TestCommandBridge { case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -49283,7 +47897,7 @@ class Test_TC_FAN_2_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -49298,153 +47912,143 @@ class Test_TC_FAN_2_4 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheTheWindSupportAttribute_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the the WindSupport attribute Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("windSupport", "bitmap8", "bitmap8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheTheWindSettingAttribute_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the the WindSetting attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("windSetting", "bitmap8", "bitmap8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_FAN_2_5 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FAN_2_5() - : TestCommandBridge("Test_TC_FAN_2_5") - , mTestIndex(0) + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_FAN_2_5() {} - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_2_5\n"); - } + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_2_5\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the the AirflowDirection attribute\n"); - if (ShouldSkip("FAN.S.F05")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheTheAirflowDirectionAttribute_1(); - break; - } + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadTheOptionalAttributeMACAddressInAttributeList_4() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(MACAddress) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheTheAirflowDirectionAttribute_1() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAirflowDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the the AirflowDirection attribute Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("airflowDirection", "enum8", "enum8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -49452,22 +48056,21 @@ class Test_TC_FAN_2_5 : public TestCommandBridge { } }; -class Test_TC_FAN_3_1 : public TestCommandBridge { +class Test_TC_CHANNEL_1_6 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FAN_3_1() - : TestCommandBridge("Test_TC_FAN_3_1") + Test_TC_CHANNEL_1_6() + : TestCommandBridge("Test_TC_CHANNEL_1_6") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigPercentSetting", 0, UINT8_MAX, &mConfigPercentSetting); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_FAN_3_1() {} + ~Test_TC_CHANNEL_1_6() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -49475,11 +48078,11 @@ class Test_TC_FAN_3_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_3_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CHANNEL_1_6\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_3_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CHANNEL_1_6\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -49492,122 +48095,110 @@ class Test_TC_FAN_3_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); - err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : Step 2a: TH writes a supported FanMode attribute that is other than off to DUT\n"); - if (ShouldSkip("FAN.S.A0000")) { - NextTest(); - return; - } - err = TestStep2aThWritesASupportedFanModeAttributeThatIsOtherThanOffToDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 1000ms\n"); - if (ShouldSkip("FAN.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("( !CHANNEL.S.F00 && !CHANNEL.S.F01 )")) { NextTest(); return; } - err = TestWait1000ms_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 2b: TH reads from the DUT the the FanMode attribute\n"); - if (ShouldSkip("FAN.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Given CCHANNEL.S.F00(CL) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CHANNEL.S.F00")) { NextTest(); return; } - err = TestStep2bThReadsFromTheDutTheTheFanModeAttribute_3(); + err = TestGivenCchannelsf00clEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 2.1a: TH writes the Off value of FanMode attribute to DUT\n"); - if (ShouldSkip("FAN.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Given CHANNEL.S.F01(LI) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CHANNEL.S.F01")) { NextTest(); return; } - err = TestStep21aThWritesTheOffValueOfFanModeAttributeToDut_4(); + err = TestGivenChannelsf01liEnsureFeaturemapHasTheCorrectBitSet_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1000ms\n"); - if (ShouldSkip("FAN.S.A0000")) { - NextTest(); - return; - } - err = TestWait1000ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 2.1b: TH reads from the DUT the PercentSetting attribute\n"); - if (ShouldSkip("FAN.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(ChannelList): AttributeList\n"); + if (ShouldSkip("CHANNEL.S.A0000")) { NextTest(); return; } - err = TestStep21bThReadsFromTheDutThePercentSettingAttribute_6(); + err = TestReadTheOptionalAttributeChannelListAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 2.1c: TH reads from the DUT the PercentCurrent attribute\n"); - if (ShouldSkip("FAN.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Reading optional attribute(Lineup) in AttributeList\n"); + if (ShouldSkip("CHANNEL.S.A0001")) { NextTest(); return; } - err = TestStep21cThReadsFromTheDutThePercentCurrentAttribute_7(); + err = TestReadingOptionalAttributeLineupInAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 3a: TH writes PercentSetting attribute a non-zero value to DUT\n"); - if (ShouldSkip("FAN.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(CurrentChannel): AttributeList\n"); + if (ShouldSkip("CHANNEL.S.A0002")) { NextTest(); return; } - err = TestStep3aThWritesPercentSettingAttributeANonZeroValueToDut_8(); + err = TestReadTheOptionalAttributeCurrentChannelAttributeList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); - if (ShouldSkip("FAN.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional command(ChangeChannel) in AcceptedCommandList\n"); + if (ShouldSkip("CHANNEL.S.C00.Rsp")) { NextTest(); return; } - err = TestWait1000ms_9(); + err = TestReadTheOptionalCommandChangeChannelInAcceptedCommandList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 3b: TH reads from the DUT the PercentCurrent attribute\n"); - if (ShouldSkip("FAN.S.A0003")) { + ChipLogProgress( + chipTool, " ***** Test Step 10 : Read the optional command(ChangeChannelByNumber) in AcceptedCommandList\n"); + if (ShouldSkip("CHANNEL.S.C02.Rsp")) { NextTest(); return; } - err = TestStep3bThReadsFromTheDutThePercentCurrentAttribute_10(); + err = TestReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 3c: TH reads from the DUT the PercentSetting attribute\n"); - if (ShouldSkip("FAN.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional command(SkipChannel) in AcceptedCommandList\n"); + if (ShouldSkip("CHANNEL.S.C03.Rsp")) { NextTest(); return; } - err = TestStep3cThReadsFromTheDutThePercentSettingAttribute_11(); + err = TestReadTheOptionalCommandSkipChannelInAcceptedCommandList_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 3.1a: TH writes PercentSetting attribute a zero value to DUT\n"); - if (ShouldSkip("FAN.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip("( !CHANNEL.S.F00 && !CHANNEL.S.F01 )")) { NextTest(); return; } - err = TestStep31aThWritesPercentSettingAttributeAZeroValueToDut_12(); + err = TestReadTheGlobalAttributeGeneratedCommandList_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 1000ms\n"); - if (ShouldSkip("FAN.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip("CHANNEL.S.F00 || CHANNEL.S.F01")) { NextTest(); return; } - err = TestWait1000ms_13(); + err = TestReadTheGlobalAttributeGeneratedCommandList_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 3.1b: TH reads from the DUT the the FanMode attribute\n"); - if (ShouldSkip("FAN.S.A0000")) { - NextTest(); - return; - } - err = TestStep31bThReadsFromTheDutTheTheFanModeAttribute_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: EventList\n"); + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -49682,10 +48273,9 @@ class Test_TC_FAN_3_1 : public TestCommandBridge { chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mConfigPercentSetting; chip::Optional mTimeout; - CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -49693,107 +48283,111 @@ class Test_TC_FAN_3_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep2aThWritesASupportedFanModeAttributeThatIsOtherThanOffToDut_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id fanModeArgument; - fanModeArgument = [NSNumber numberWithUnsignedChar:3U]; - [cluster - writeAttributeFanModeWithValue:fanModeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Step 2a: TH writes a supported FanMode attribute that is other than off to DUT Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - return CHIP_NO_ERROR; - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } - CHIP_ERROR TestWait1000ms_2() - { + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2bThReadsFromTheDutTheTheFanModeAttribute_3() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2b: TH reads from the DUT the the FanMode attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FanMode", actualValue, 3U)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep21aThWritesTheOffValueOfFanModeAttributeToDut_4() + CHIP_ERROR TestGivenCchannelsf00clEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id fanModeArgument; - fanModeArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeFanModeWithValue:fanModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 2.1a: TH writes the Off value of FanMode attribute to DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given CCHANNEL.S.F00(CL) ensure featuremap has the correct bit set Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_5() + CHIP_ERROR TestGivenChannelsf01liEnsureFeaturemapHasTheCorrectBitSet_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given CHANNEL.S.F01(LI) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep21bThReadsFromTheDutThePercentSettingAttribute_6() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2.1b: TH reads from the DUT the PercentSetting attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("PercentSetting", actualValue)); - VerifyOrReturn(CheckValue("PercentSetting", actualValue, 0U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -49801,22 +48395,20 @@ class Test_TC_FAN_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep21cThReadsFromTheDutThePercentCurrentAttribute_7() + CHIP_ERROR TestReadTheOptionalAttributeChannelListAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2.1c: TH reads from the DUT the PercentCurrent attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(ChannelList): AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("PercentCurrent", actualValue, 0U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); }]; @@ -49824,55 +48416,62 @@ class Test_TC_FAN_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThWritesPercentSettingAttributeANonZeroValueToDut_8() + CHIP_ERROR TestReadingOptionalAttributeLineupInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id percentSettingArgument; - percentSettingArgument = mConfigPercentSetting.HasValue() ? [NSNumber numberWithUnsignedChar:mConfigPercentSetting.Value()] - : [NSNumber numberWithUnsignedChar:30U]; - [cluster - writeAttributePercentSettingWithValue:percentSettingArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 3a: TH writes PercentSetting attribute a non-zero value to DUT Error: %@", - err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reading optional attribute(Lineup) in AttributeList Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_9() + CHIP_ERROR TestReadTheOptionalAttributeCurrentChannelAttributeList_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(CurrentChannel): AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bThReadsFromTheDutThePercentCurrentAttribute_10() + CHIP_ERROR TestReadTheOptionalCommandChangeChannelInAcceptedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3b: TH reads from the DUT the PercentCurrent attribute Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(ChangeChannel) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue( - "PercentCurrent", actualValue, mConfigPercentSetting.HasValue() ? mConfigPercentSetting.Value() : 30U)); - } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); }]; @@ -49880,24 +48479,20 @@ class Test_TC_FAN_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cThReadsFromTheDutThePercentSettingAttribute_11() + CHIP_ERROR TestReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3c: TH reads from the DUT the PercentSetting attribute Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(ChangeChannelByNumber) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("PercentSetting", actualValue)); - VerifyOrReturn(CheckValue( - "PercentSetting", actualValue, mConfigPercentSetting.HasValue() ? mConfigPercentSetting.Value() : 30U)); - } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); NextTest(); }]; @@ -49905,53 +48500,65 @@ class Test_TC_FAN_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep31aThWritesPercentSettingAttributeAZeroValueToDut_12() + CHIP_ERROR TestReadTheOptionalCommandSkipChannelInAcceptedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id percentSettingArgument; - percentSettingArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster - writeAttributePercentSettingWithValue:percentSettingArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Step 3.1a: TH writes PercentSetting attribute a zero value to DUT Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(SkipChannel) in AcceptedCommandList Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_13() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep31bThReadsFromTheDutTheTheFanModeAttribute_14() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3.1b: TH reads from the DUT the the FanMode attribute Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FanMode", actualValue, 0U)); - } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); NextTest(); }]; @@ -49960,22 +48567,21 @@ class Test_TC_FAN_3_1 : public TestCommandBridge { } }; -class Test_TC_FAN_3_2 : public TestCommandBridge { +class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FAN_3_2() - : TestCommandBridge("Test_TC_FAN_3_2") + Test_TC_MEDIAPLAYBACK_1_7() + : TestCommandBridge("Test_TC_MEDIAPLAYBACK_1_7") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigSpeedSetting", 0, UINT8_MAX, &mConfigSpeedSetting); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_FAN_3_2() {} + ~Test_TC_MEDIAPLAYBACK_1_7() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -49983,11 +48589,11 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_3_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAPLAYBACK_1_7\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_3_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAPLAYBACK_1_7\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -50000,41 +48606,167 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); - err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH writes SpeedSetting attribute a valid value to DUT\n"); - if (ShouldSkip("FAN.S.A0005")) { - NextTest(); - return; - } - err = TestStep2ThWritesSpeedSettingAttributeAValidValueToDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 1000ms\n"); - if (ShouldSkip("FAN.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip(" !MEDIAPLAYBACK.S.F00 && !MEDIAPLAYBACK.S.F01 ")) { NextTest(); return; } - err = TestWait1000ms_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads from the DUT the the SpeedSetting attribute\n"); - if (ShouldSkip("FAN.S.A0005")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Given MEDIAPLAYBACK.S.F00(AS) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.F00")) { NextTest(); return; } - err = TestStep3ThReadsFromTheDutTheTheSpeedSettingAttribute_3(); + err = TestGivenMediaplaybacksf00asEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads from the DUT the the SpeedCurrent attribute\n"); - if (ShouldSkip("FAN.S.A0006")) { + ChipLogProgress( + chipTool, " ***** Test Step 4 : Given MEDIAPLAYBACK.S.F01(VS) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.F01")) { NextTest(); return; } - err = TestStep4ThReadsFromTheDutTheTheSpeedCurrentAttribute_4(); + err = TestGivenMediaplaybacksf01vsEnsureFeaturemapHasTheCorrectBitSet_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(StartTime) in AttributeList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0001")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeStartTimeInAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(Duration) in AttributeList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0002")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeDurationInAttributeList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(SampledPosition) in AttributeList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0003")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeSampledPositionInAttributeList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(PlaybackSpeed) in AttributeList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0004")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributePlaybackSpeedInAttributeList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(SeekRangeEnd) in AttributeList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0005")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeSeekRangeEndInAttributeList_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute(SeekRangeStart) in AttributeList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0006")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeSeekRangeStartInAttributeList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional command(StartOver) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandStartOverInAcceptedCommandList_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the optional command(Previous) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandPreviousInAcceptedCommandList_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional command(Next) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C05.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandNextInAcceptedCommandList_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read the optional command(Rewind) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandRewindInAcceptedCommandList_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Read the optional command(FastForward) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandFastForwardInAcceptedCommandList_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Read the optional command(SkipForward) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C08.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandSkipForwardInAcceptedCommandList_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Read the optional command(SkipBackward) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C09.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandSkipBackwardInAcceptedCommandList_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Read the optional command(Seek) in AcceptedCommandList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C0b.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandSeekInAcceptedCommandList_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_21(); break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Read the global attribute: EventList\n"); + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -50061,6 +48793,60 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -50074,15 +48860,14 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mConfigSpeedSetting; chip::Optional mTimeout; - CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -50090,253 +48875,450 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep2ThWritesSpeedSettingAttributeAValidValueToDut_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id speedSettingArgument; - speedSettingArgument = mConfigSpeedSetting.HasValue() ? [NSNumber numberWithUnsignedChar:mConfigSpeedSetting.Value()] - : [NSNumber numberWithUnsignedChar:50U]; - [cluster - writeAttributeSpeedSettingWithValue:speedSettingArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 2: TH writes SpeedSetting attribute a valid value to DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ThReadsFromTheDutTheTheSpeedSettingAttribute_3() + CHIP_ERROR TestGivenMediaplaybacksf00asEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: TH reads from the DUT the the SpeedSetting attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given MEDIAPLAYBACK.S.F00(AS) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("SpeedSetting", actualValue)); - VerifyOrReturn( - CheckValue("SpeedSetting", actualValue, mConfigSpeedSetting.HasValue() ? mConfigSpeedSetting.Value() : 50U)); - } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestGivenMediaplaybacksf01vsEnsureFeaturemapHasTheCorrectBitSet_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given MEDIAPLAYBACK.S.F01(VS) ensure featuremap has the correct bit set Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ThReadsFromTheDutTheTheSpeedCurrentAttribute_4() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: TH reads from the DUT the the SpeedCurrent attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn( - CheckValue("SpeedCurrent", actualValue, mConfigSpeedSetting.HasValue() ? mConfigSpeedSetting.Value() : 50U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_FAN_3_4 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FAN_3_4() - : TestCommandBridge("Test_TC_FAN_3_4") - , mTestIndex(0) + CHIP_ERROR TestReadTheOptionalAttributeStartTimeInAttributeList_6() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigWindSetting", 0, UINT8_MAX, &mConfigWindSetting); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(StartTime) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_FAN_3_4() {} + CHIP_ERROR TestReadTheOptionalAttributeDurationInAttributeList_7() + { - /////////// TestCommand Interface ///////// - void NextTest() override + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(Duration) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeSampledPositionInAttributeList_8() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_3_4\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_3_4\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(SampledPosition) in AttributeList Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); - err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH writes WindSetting attribute a valid value to DUT\n"); - if (ShouldSkip("FAN.S.A0008")) { - NextTest(); - return; - } - err = TestStep2ThWritesWindSettingAttributeAValidValueToDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 1000ms\n"); - if (ShouldSkip("FAN.S.A0008")) { - NextTest(); - return; - } - err = TestWait1000ms_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads from the DUT the the WindSetting attribute\n"); - if (ShouldSkip("FAN.S.A0008")) { - NextTest(); - return; - } - err = TestStep3ThReadsFromTheDutTheTheWindSettingAttribute_3(); - break; - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + NextTest(); + }]; + + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadTheOptionalAttributePlaybackSpeedInAttributeList_9() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(PlaybackSpeed) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestReadTheOptionalAttributeSeekRangeEndInAttributeList_10() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(SeekRangeEnd) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + CHIP_ERROR TestReadTheOptionalAttributeSeekRangeStartInAttributeList_11() + { - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mConfigWindSetting; - chip::Optional mTimeout; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(SeekRangeStart) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2ThWritesWindSettingAttributeAValidValueToDut_1() + CHIP_ERROR TestReadTheOptionalCommandStartOverInAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id windSettingArgument; - windSettingArgument = mConfigWindSetting.HasValue() ? [NSNumber numberWithUnsignedChar:mConfigWindSetting.Value()] - : [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeWindSettingWithValue:windSettingArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 2: TH writes WindSetting attribute a valid value to DUT Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(StartOver) in AcceptedCommandList Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_2() + CHIP_ERROR TestReadTheOptionalCommandPreviousInAcceptedCommandList_14() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(Previous) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ThReadsFromTheDutTheTheWindSettingAttribute_3() + CHIP_ERROR TestReadTheOptionalCommandNextInAcceptedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: TH reads from the DUT the the WindSetting attribute Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(Next) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn( - CheckValue("WindSetting", actualValue, mConfigWindSetting.HasValue() ? mConfigWindSetting.Value() : 1U)); - } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandRewindInAcceptedCommandList_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(Rewind) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandFastForwardInAcceptedCommandList_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(FastForward) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandSkipForwardInAcceptedCommandList_18() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(SkipForward) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandSkipBackwardInAcceptedCommandList_19() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(SkipBackward) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 9UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandSeekInAcceptedCommandList_20() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(Seek) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 11UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_21() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 10UL)); NextTest(); }]; @@ -50345,11 +49327,11 @@ class Test_TC_FAN_3_4 : public TestCommandBridge { } }; -class Test_TC_CGEN_1_1 : public TestCommandBridge { +class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CGEN_1_1() - : TestCommandBridge("Test_TC_CGEN_1_1") + Test_TC_AUDIOOUTPUT_1_8() + : TestCommandBridge("Test_TC_AUDIOOUTPUT_1_8") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -50359,7 +49341,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CGEN_1_1() {} + ~Test_TC_AUDIOOUTPUT_1_8() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -50367,11 +49349,11 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CGEN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_AUDIOOUTPUT_1_8\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_AUDIOOUTPUT_1_8\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -50388,20 +49370,28 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("AUDIOOUTPUT.S.F00")) { + NextTest(); + return; + } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip(" !AUDIOOUTPUT.S.F00 ")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMap_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); @@ -50411,6 +49401,10 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: EventList\n"); + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -50443,6 +49437,9 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -50456,7 +49453,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -50475,13 +49472,11 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50501,9 +49496,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -50511,10 +49504,24 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); @@ -50523,13 +49530,11 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -50540,9 +49545,6 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -50556,50 +49558,20 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); NextTest(); }]; @@ -50611,9 +49583,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -50621,11 +49591,12 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 5UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -50633,11 +49604,11 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { } }; -class Test_TC_CGEN_2_1 : public TestCommandBridge { +class Test_TC_TGTNAV_1_9 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CGEN_2_1() - : TestCommandBridge("Test_TC_CGEN_2_1") + Test_TC_TGTNAV_1_9() + : TestCommandBridge("Test_TC_TGTNAV_1_9") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -50647,7 +49618,7 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CGEN_2_1() {} + ~Test_TC_TGTNAV_1_9() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -50655,11 +49626,11 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CGEN_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TGTNAV_1_9\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TGTNAV_1_9\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -50676,64 +49647,37 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH1 reads the BreadCrumb Attribute from the DUT\n"); - if (ShouldSkip("CGEN.S.A0000")) { - NextTest(); - return; - } - err = TestTh1ReadsTheBreadCrumbAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH1 writes the BreadCrumb attribute as 1 to the DUT\n"); - if (ShouldSkip("CGEN.S.A0000")) { - NextTest(); - return; - } - err = TestTh1WritesTheBreadCrumbAttributeAs1ToTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH1 reads the BreadCrumb attribute from the DUT\n"); - if (ShouldSkip("CGEN.S.A0000")) { - NextTest(); - return; - } - err = TestTh1ReadsTheBreadCrumbAttributeFromTheDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH1 reads the RegulatoryConfig attribute from the DUT\n"); - if (ShouldSkip("CGEN.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(CurrentTarget) in AttributeList\n"); + if (ShouldSkip("TGTNAV.S.A0001")) { NextTest(); return; } - err = TestTh1ReadsTheRegulatoryConfigAttributeFromTheDut_4(); + err = TestReadTheOptionalAttributeCurrentTargetInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH1 reads the LocationCapability attribute from the DUT\n"); - if (ShouldSkip("CGEN.S.A0003")) { - NextTest(); - return; - } - err = TestTh1ReadsTheLocationCapabilityAttributeFromTheDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH1 reads BasicCommissioningInfo attribute from DUT and Verify that the " - "BasicCommissioningInfo attribute has the following field: FailSafeExpiryLengthSeconds field value is within a " - "duration range of 0 to 65535\n"); - if (ShouldSkip("CGEN.S.A0001")) { - NextTest(); - return; - } - err = TestTh1ReadsBasicCommissioningInfoAttributeFromDutAndVerifyThatTheBasicCommissioningInfoAttributeHasTheFollowingFieldFailSafeExpiryLengthSecondsFieldValueIsWithinADurationRangeOf0To65535_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH1 reads SupportsConcurrentConnection attribute from the DUT\n"); - if (ShouldSkip("CGEN.S.A0004")) { - NextTest(); - return; - } - err = TestTh1ReadsSupportsConcurrentConnectionAttributeFromTheDut_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: EventList\n"); + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -50797,91 +49741,74 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTh1ReadsTheBreadCrumbAttributeFromTheDut_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads the BreadCrumb Attribute from the DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("breadcrumb", "int64u", "int64u")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1WritesTheBreadCrumbAttributeAs1ToTheDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id breadcrumbArgument; - breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; - [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH1 writes the BreadCrumb attribute as 1 to the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTh1ReadsTheBreadCrumbAttributeFromTheDut_3() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads the BreadCrumb attribute from the DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 1ULL)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1ReadsTheRegulatoryConfigAttributeFromTheDut_4() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRegulatoryConfigWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads the RegulatoryConfig attribute from the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("regulatoryConfig", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("regulatoryConfig", [value unsignedCharValue], 2U)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -50889,22 +49816,20 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1ReadsTheLocationCapabilityAttributeFromTheDut_5() + CHIP_ERROR TestReadTheOptionalAttributeCurrentTargetInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocationCapabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads the LocationCapability attribute from the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(CurrentTarget) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("locationCapability", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("locationCapability", [value unsignedCharValue], 2U)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); }]; @@ -50912,46 +49837,42 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestTh1ReadsBasicCommissioningInfoAttributeFromDutAndVerifyThatTheBasicCommissioningInfoAttributeHasTheFollowingFieldFailSafeExpiryLengthSecondsFieldValueIsWithinADurationRangeOf0To65535_6() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBasicCommissioningInfoWithCompletion:^( - MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable err) { - NSLog( - @"TH1 reads BasicCommissioningInfo attribute from DUT and Verify that the BasicCommissioningInfo attribute has the " - @"following field: FailSafeExpiryLengthSeconds field value is within a duration range of 0 to 65535 Error: %@", - err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1ReadsSupportsConcurrentConnectionAttributeFromTheDut_7() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads SupportsConcurrentConnection attribute from the DUT Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "boolean", "boolean")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + NextTest(); }]; @@ -50959,11 +49880,11 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { } }; -class Test_TC_DGGEN_1_1 : public TestCommandBridge { +class Test_TC_APBSC_1_10 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGGEN_1_1() - : TestCommandBridge("Test_TC_DGGEN_1_1") + Test_TC_APBSC_1_10() + : TestCommandBridge("Test_TC_APBSC_1_10") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -50973,7 +49894,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DGGEN_1_1() {} + ~Test_TC_APBSC_1_10() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -50981,11 +49902,11 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGGEN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_APBSC_1_10\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGGEN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APBSC_1_10\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -51003,170 +49924,52 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("DGGEN.S.Afffd")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("DGGEN.S.Afffc")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read FeatureMap attribute from the DUT\n"); + err = TestReadFeatureMapAttributeFromTheDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("DGGEN.S.Afffb")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read optional attribute(UpTime) in AttributeList\n"); - if (ShouldSkip("DGGEN.S.A0002 && DGGEN.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(VendorName) in AttributeList\n"); + if (ShouldSkip("APBSC.S.A0000")) { NextTest(); return; } - err = TestReadOptionalAttributeUpTimeInAttributeList_4(); + err = TestReadTheOptionalAttributeVendorNameInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read optional attribute(TotalOperationalHours) in AttributeList\n"); - if (ShouldSkip("DGGEN.S.A0003 && DGGEN.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(VendorID) in AttributeList\n"); + if (ShouldSkip("APBSC.S.A0001")) { NextTest(); return; } - err = TestReadOptionalAttributeTotalOperationalHoursInAttributeList_5(); + err = TestReadTheOptionalAttributeVendorIDInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read optional attribute(BootReason) in AttributeList\n"); - if (ShouldSkip("DGGEN.S.A0004 && DGGEN.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(ProductID) in AttributeList\n"); + if (ShouldSkip("APBSC.S.A0003")) { NextTest(); return; } - err = TestReadOptionalAttributeBootReasonInAttributeList_6(); + err = TestReadTheOptionalAttributeProductIDInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read optional attribute(ActiveHardwareFaults) in AttributeList\n"); - if (ShouldSkip("DGGEN.S.A0005 && DGGEN.S.Afffb")) { - NextTest(); - return; - } - err = TestReadOptionalAttributeActiveHardwareFaultsInAttributeList_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read optional attribute(ActiveRadioFaults) in AttributeList\n"); - if (ShouldSkip("DGGEN.S.A0006 && DGGEN.S.Afffb")) { - NextTest(); - return; - } - err = TestReadOptionalAttributeActiveRadioFaultsInAttributeList_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read optional attribute(ActiveNetworkFaults) in AttributeList\n"); - if (ShouldSkip("DGGEN.S.A0007 && DGGEN.S.Afffb")) { - NextTest(); - return; - } - err = TestReadOptionalAttributeActiveNetworkFaultsInAttributeList_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list " - "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " - "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " - "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: EventList\n"); - if (ShouldSkip("DGGEN.S.Afffa")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeEventList_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read optional event(HardwareFaultChange) in EventList\n"); - if (ShouldSkip("DGGEN.S.Afffa && DGGEN.S.E00")) { - NextTest(); - return; - } - err = TestReadOptionalEventHardwareFaultChangeInEventList_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read optional event(RadioFaultChange) in EventList\n"); - if (ShouldSkip("DGGEN.S.Afffa && DGGEN.S.E01")) { - NextTest(); - return; - } - err = TestReadOptionalEventRadioFaultChangeInEventList_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read optional event(NetworkFaultChange) in EventList\n"); - if (ShouldSkip("DGGEN.S.Afffa && DGGEN.S.E02")) { - NextTest(); - return; - } - err = TestReadOptionalEventNetworkFaultChangeInEventList_14(); - break; - case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " - "the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afffa")) { - NextTest(); - return; - } - err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("DGGEN.S.Afff9")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " - "or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afff9")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); - break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afff8")) { - NextTest(); - return; - } - err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: EventList\n"); + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -51208,33 +50011,6 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -51248,7 +50024,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -51267,9 +50043,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -51289,17 +50063,15 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51319,9 +50091,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -51330,9 +50100,11 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -51346,91 +50118,20 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOptionalAttributeUpTimeInAttributeList_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional attribute(UpTime) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadOptionalAttributeTotalOperationalHoursInAttributeList_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional attribute(TotalOperationalHours) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadOptionalAttributeBootReasonInAttributeList_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional attribute(BootReason) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadOptionalAttributeActiveHardwareFaultsInAttributeList_7() + CHIP_ERROR TestReadTheOptionalAttributeVendorNameInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional attribute(ActiveHardwareFaults) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(VendorName) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); }]; @@ -51438,22 +50139,20 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOptionalAttributeActiveRadioFaultsInAttributeList_8() + CHIP_ERROR TestReadTheOptionalAttributeVendorIDInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional attribute(ActiveRadioFaults) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(VendorID) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); }]; @@ -51461,102 +50160,20 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOptionalAttributeActiveNetworkFaultsInAttributeList_9() + CHIP_ERROR TestReadTheOptionalAttributeProductIDInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional attribute(ActiveNetworkFaults) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(ProductID) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadOptionalEventHardwareFaultChangeInEventList_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional event(HardwareFaultChange) in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 0UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadOptionalEventRadioFaultChangeInEventList_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional event(RadioFaultChange) in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -51564,91 +50181,60 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOptionalEventNetworkFaultChangeInEventList_14() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional event(NetworkFaultChange) in EventList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 2UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_16() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - - CHIP_ERROR - TestThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; -class Test_TC_DGGEN_2_1 : public TestCommandBridge { +class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGGEN_2_1() - : TestCommandBridge("Test_TC_DGGEN_2_1") + Test_TC_CONTENTLAUNCHER_1_11() + : TestCommandBridge("Test_TC_CONTENTLAUNCHER_1_11") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -51658,7 +50244,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DGGEN_2_1() {} + ~Test_TC_CONTENTLAUNCHER_1_11() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -51666,11 +50252,11 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGGEN_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CONTENTLAUNCHER_1_11\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGGEN_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CONTENTLAUNCHER_1_11\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -51687,135 +50273,82 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads NetworkInterfaces structure attribute from DUT.\n"); - if (ShouldSkip("DGGEN.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsNetworkInterfacesStructureAttributeFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads a RebootCount attribute value from DUT.\n"); - if (ShouldSkip("DGGEN.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("( !CONTENTLAUNCHER.S.F00 && !CONTENTLAUNCHER.S.F01 )")) { NextTest(); return; } - err = TestThReadsARebootCountAttributeValueFromDut_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Given CONTENTLAUNCHER.S.F00 (CS) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CONTENTLAUNCHER.S.F00")) { NextTest(); return; } - err = TestRebootTargetDevice_3(); + err = TestGivenContentlaunchersf00CsEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress( + chipTool, " ***** Test Step 4 : Given CONTENTLAUNCHER.S.F01(UP) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CONTENTLAUNCHER.S.F01")) { NextTest(); return; } - err = TestRebootTargetDeviceDUT_4(); + err = TestGivenContentlaunchersf01upEnsureFeaturemapHasTheCorrectBitSet_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestRebootTargetDevice_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(AcceptHeader): AttributeList\n"); + if (ShouldSkip("CONTENTLAUNCHER.S.A0000")) { NextTest(); return; } - err = TestRebootTargetDeviceDUT_6(); + err = TestReadTheOptionalAttributeAcceptHeaderAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_7(); + ChipLogProgress( + chipTool, " ***** Test Step 7 : Read the optional attribute(SupportedStreamingProtocols): AttributeList\n"); + if (ShouldSkip("CONTENTLAUNCHER.S.A0001")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeSupportedStreamingProtocolsAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of " - "DUT rebooting.\n"); - if (ShouldSkip("DGGEN.S.A0002")) { + ChipLogProgress( + chipTool, " ***** Test Step 8 : Read the optional command(LaunchContent) in AcceptedCommandList attribute\n"); + if (ShouldSkip("CONTENTLAUNCHER.C.C00.Tx")) { NextTest(); return; } - err = TestDutRebootsAndThReadsAUpTimeAttributeValueOfDutSinceSomeArbitraryStartTimeOfDutRebooting_8(); + err = TestReadTheOptionalCommandLaunchContentInAcceptedCommandListAttribute_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads a TotalOperationalHours attribute value from DUT.\n"); - if (ShouldSkip("DGGEN.S.A0003")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Read the optional command(LaunchURL) in AcceptedCommandList attribute\n"); + if (ShouldSkip("CONTENTLAUNCHER.C.C01.Tx")) { NextTest(); return; } - err = TestThReadsATotalOperationalHoursAttributeValueFromDut_9(); + err = TestReadTheOptionalCommandLaunchURLInAcceptedCommandListAttribute_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestRebootTargetDevice_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestRebootTargetDeviceDUT_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads BootReason attribute value from DUT.\n"); - if (ShouldSkip("DGGEN.S.A0004")) { - NextTest(); - return; - } - err = TestThReadsBootReasonAttributeValueFromDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads ActiveHardwareFaults attribute value from DUT.\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0005")) { - NextTest(); - return; - } - err = TestThReadsActiveHardwareFaultsAttributeValueFromDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads ActiveRadioFaults attribute value from DUT.\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0006")) { - NextTest(); - return; - } - err = TestThReadsActiveRadioFaultsAttributeValueFromDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads ActiveNetworkFaults attribute value from DUT.\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0007")) { - NextTest(); - return; - } - err = TestThReadsActiveNetworkFaultsAttributeValueFromDut_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads TestEventTriggersEnabled attribute value\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0008")) { - NextTest(); - return; - } - err = TestThReadsTestEventTriggersEnabledAttributeValue_17(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: EventList\n"); + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -51863,24 +50396,6 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -51894,7 +50409,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -51909,135 +50424,132 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsNetworkInterfacesStructureAttributeFromDut_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNetworkInterfacesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads NetworkInterfaces structure attribute from DUT. Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("networkInterfaces", "list", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsARebootCountAttributeValueFromDut_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRebootCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads a RebootCount attribute value from DUT. Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("rebootCount", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("rebootCount", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("rebootCount", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestRebootTargetDevice_3() + CHIP_ERROR TestGivenContentlaunchersf00CsEnsureFeaturemapHasTheCorrectBitSet_3() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestRebootTargetDeviceDUT_4() - { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given CONTENTLAUNCHER.S.F00 (CS) ensure featuremap has the correct bit set Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestRebootTargetDevice_5() - { + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestRebootTargetDeviceDUT_6() + CHIP_ERROR TestGivenContentlaunchersf01upEnsureFeaturemapHasTheCorrectBitSet_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_7() - { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given CONTENTLAUNCHER.S.F01(UP) ensure featuremap has the correct bit set Error: %@", err); - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestDutRebootsAndThReadsAUpTimeAttributeValueOfDutSinceSomeArbitraryStartTimeOfDutRebooting_8() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUpTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of DUT rebooting. " - @"Error: %@", - err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("upTime", "int64u", "int64u")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsATotalOperationalHoursAttributeValueFromDut_9() + CHIP_ERROR TestReadTheOptionalAttributeAcceptHeaderAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTotalOperationalHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads a TotalOperationalHours attribute value from DUT. Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(AcceptHeader): AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("totalOperationalHours", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("totalOperationalHours", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("totalOperationalHours", [value unsignedIntValue], 4294967294UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); }]; @@ -52045,48 +50557,41 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRebootTargetDevice_10() + CHIP_ERROR TestReadTheOptionalAttributeSupportedStreamingProtocolsAttributeList_7() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestRebootTargetDeviceDUT_11() - { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(SupportedStreamingProtocols): AttributeList Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_12() - { + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsBootReasonAttributeValueFromDut_13() + CHIP_ERROR TestReadTheOptionalCommandLaunchContentInAcceptedCommandListAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBootReasonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads BootReason attribute value from DUT. Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(LaunchContent) in AcceptedCommandList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("bootReason", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("bootReason", [value unsignedCharValue], 6U)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); }]; @@ -52094,52 +50599,54 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsActiveHardwareFaultsAttributeValueFromDut_14() + CHIP_ERROR TestReadTheOptionalCommandLaunchURLInAcceptedCommandListAttribute_9() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestThReadsActiveRadioFaultsAttributeValueFromDut_15() - { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(LaunchURL) in AcceptedCommandList attribute Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestThReadsActiveNetworkFaultsAttributeValueFromDut_16() - { + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTestEventTriggersEnabledAttributeValue_17() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_10() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_I_1_1 : public TestCommandBridge { +class Test_TC_ALOGIN_1_12 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_I_1_1() - : TestCommandBridge("Test_TC_I_1_1") + Test_TC_ALOGIN_1_12() + : TestCommandBridge("Test_TC_ALOGIN_1_12") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -52149,7 +50656,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_I_1_1() {} + ~Test_TC_ALOGIN_1_12() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -52157,11 +50664,11 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ALOGIN_1_12\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ALOGIN_1_12\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -52178,12 +50685,12 @@ class Test_TC_I_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); - err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); - err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); @@ -52194,27 +50701,13 @@ class Test_TC_I_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional command(TriggerEffect) in AcceptedCommandList\n"); - if (ShouldSkip("I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestReadTheOptionalCommandTriggerEffectInAcceptedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read EventList attribute from the DUT. For this cluster the list is usually empty but it can " - "contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads EventList attribute from DUT\n"); + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -52247,9 +50740,6 @@ class Test_TC_I_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -52263,7 +50753,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -52278,21 +50768,21 @@ class Test_TC_I_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -52302,15 +50792,15 @@ class Test_TC_I_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52330,7 +50820,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -52339,8 +50829,6 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -52358,7 +50846,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -52368,6 +50856,8 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); NextTest(); }]; @@ -52375,68 +50865,147 @@ class Test_TC_I_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandTriggerEffectInAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(TriggerEffect) in AcceptedCommandList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 64UL)); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() +class Test_TC_LOWPOWER_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LOWPOWER_2_1() + : TestCommandBridge("Test_TC_LOWPOWER_2_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_LOWPOWER_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LOWPOWER_2_1\n"); + } - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LOWPOWER_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + Wait(); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends Sleep command to DUT\n"); + if (ShouldSkip("LOWPOWER.S.C00.Rsp")) { + NextTest(); + return; } + err = TestThSendsSleepCommandToDut_1(); + break; + } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } - return CHIP_NO_ERROR; + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR - TestReadEventListAttributeFromTheDutForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThSendsSleepCommandToDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster sleepWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends Sleep command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_I_2_1 : public TestCommandBridge { +class Test_TC_KEYPADINPUT_3_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_I_2_1() - : TestCommandBridge("Test_TC_I_2_1") + Test_TC_KEYPADINPUT_3_2() + : TestCommandBridge("Test_TC_KEYPADINPUT_3_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -52446,7 +51015,7 @@ class Test_TC_I_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_I_2_1() {} + ~Test_TC_KEYPADINPUT_3_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -52454,11 +51023,11 @@ class Test_TC_I_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_KEYPADINPUT_3_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_KEYPADINPUT_3_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -52475,20 +51044,20 @@ class Test_TC_I_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the IdentifyTime attribute from the DUT\n"); - if (ShouldSkip("I.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends CEC Settings Keys(0x0A) to DUT\n"); + if (ShouldSkip("KEYPADINPUT.S.F01 && KEYPADINPUT.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsTheIdentifyTimeAttributeFromTheDut_1(); + err = TestThSendsCecSettingsKeys0x0AToDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the IdentifyType attribute from the DUT\n"); - if (ShouldSkip("I.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends CEC Home Keys(0x09) to DUT\n"); + if (ShouldSkip("KEYPADINPUT.S.F01 && KEYPADINPUT.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsTheIdentifyTypeAttributeFromTheDut_2(); + err = TestThSendsCecHomeKeys0x09ToDut_2(); break; } @@ -52538,56 +51107,64 @@ class Test_TC_I_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheIdentifyTimeAttributeFromTheDut_1() + CHIP_ERROR TestThSendsCecSettingsKeys0x0AToDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the IdentifyTime attribute from the DUT Error: %@", err); + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:10U]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends CEC Settings Keys(0x0A) to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("identifyTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 65535U)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheIdentifyTypeAttributeFromTheDut_2() + CHIP_ERROR TestThSendsCecHomeKeys0x09ToDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the IdentifyType attribute from the DUT Error: %@", err); + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:9U]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends CEC Home Keys(0x09) to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("identifyType", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("identifyType", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("identifyType", [value unsignedCharValue], 5U)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_I_2_2 : public TestCommandBridge { +class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_I_2_2() - : TestCommandBridge("Test_TC_I_2_2") + Test_TC_KEYPADINPUT_3_3() + : TestCommandBridge("Test_TC_KEYPADINPUT_3_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -52597,7 +51174,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_I_2_2() {} + ~Test_TC_KEYPADINPUT_3_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -52605,11 +51182,11 @@ class Test_TC_I_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_KEYPADINPUT_3_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_KEYPADINPUT_3_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -52626,81 +51203,76 @@ class Test_TC_I_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : TH sends Identify command to DUT, with the IdentifyTime field set to 0x003c (60s).\n"); - if (ShouldSkip("I.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Send Numbers1\n"); + if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { NextTest(); return; } - err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1(); + err = TestSendNumbers1_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads immediately IdentifyTime attribute from DUT\n"); - if (ShouldSkip("I.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Send Numbers2\n"); + if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { NextTest(); return; } - err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut_2(); + err = TestSendNumbers2_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 10000ms\n"); - err = TestWait10000ms_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Send Numbers3\n"); + if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { + NextTest(); + return; + } + err = TestSendNumbers3_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : After 10 seconds, the TH reads IdentifyTime attribute from DUT\n"); - if (ShouldSkip("I.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Send Numbers4\n"); + if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { NextTest(); return; } - err = TestAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_4(); + err = TestSendNumbers4_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH sends IdentifyQuery command to DUT and Verify IdentifyQueryResponse command to TH,with " - "the Timeout field set to a value in the range 0x0000 to 0x0032\n"); - if (ShouldSkip("PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Send Numbers5\n"); + if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { NextTest(); return; } - err = TestThSendsIdentifyQueryCommandToDutAndVerifyIdentifyQueryResponseCommandToTHwithTheTimeoutFieldSetToAValueInTheRange0x0000To0x0032_5(); + err = TestSendNumbers5_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH sends Identify command to DUT, with the IdentifyTime field set to 0x0000 (stop " - "identifying).\n"); - if (ShouldSkip("I.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Send Numbers6\n"); + if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { NextTest(); return; } - err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6(); + err = TestSendNumbers6_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads immediately IdentifyTime attribute from DUT\n"); - if (ShouldSkip("I.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Send Numbers7\n"); + if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { NextTest(); return; } - err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut_7(); + err = TestSendNumbers7_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT\n"); - if (ShouldSkip("I.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Send Numbers8\n"); + if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { NextTest(); return; } - err = TestThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_8(); + err = TestSendNumbers8_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 5000ms\n"); - err = TestWait5000ms_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : After 5 seconds, the TH reads IdentifyTime attribute from DUT\n"); - if (ShouldSkip("I.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Send Numbers9\n"); + if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { NextTest(); return; } - err = TestAfter5SecondsTheThReadsIdentifyTimeAttributeFromDut_10(); + err = TestSendNumbers9_9(); break; } @@ -52743,9 +51315,6 @@ class Test_TC_I_2_2 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -52759,7 +51328,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -52774,192 +51343,246 @@ class Test_TC_I_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1() + CHIP_ERROR TestSendNumbers1_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRIdentifyClusterIdentifyParams alloc] init]; - params.identifyTime = [NSNumber numberWithUnsignedShort:60U]; - [cluster - identifyWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Identify command to DUT, with the IdentifyTime field set to 0x003c (60s). Error: %@", err); + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:33U]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers1 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut_2() + CHIP_ERROR TestSendNumbers2_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads immediately IdentifyTime attribute from DUT Error: %@", err); + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:34U]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers2 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 51U)); - VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 69U)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10000ms_3() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_4() + CHIP_ERROR TestSendNumbers3_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"After 10 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:35U]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers3 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 42U)); - VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 58U)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsIdentifyQueryCommandToDutAndVerifyIdentifyQueryResponseCommandToTHwithTheTimeoutFieldSetToAValueInTheRange0x0000To0x0032_5() + CHIP_ERROR TestSendNumbers4_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:36U]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers4 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6() + CHIP_ERROR TestSendNumbers5_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRIdentifyClusterIdentifyParams alloc] init]; - params.identifyTime = [NSNumber numberWithUnsignedShort:0U]; - [cluster identifyWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Identify command to DUT, with the IdentifyTime field set to 0x0000 (stop " - @"identifying). Error: %@", - err); + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:37U]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers5 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut_7() + CHIP_ERROR TestSendNumbers6_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads immediately IdentifyTime attribute from DUT Error: %@", err); + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:38U]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers6 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("IdentifyTime", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_8() + CHIP_ERROR TestSendNumbers7_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id identifyTimeArgument; - identifyTimeArgument = [NSNumber numberWithUnsignedShort:15U]; - [cluster writeAttributeIdentifyTimeWithValue:identifyTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT Error: %@", - err); + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:39U]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers7 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_9() + CHIP_ERROR TestSendNumbers8_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:40U]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers8 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestAfter5SecondsTheThReadsIdentifyTimeAttributeFromDut_10() + CHIP_ERROR TestSendNumbers9_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"After 5 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:41U]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers9 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 5U)); - VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 15U)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_I_2_3 : public TestCommandBridge { +class Test_TC_APPLAUNCHER_3_5 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_I_2_3() - : TestCommandBridge("Test_TC_I_2_3") + Test_TC_APPLAUNCHER_3_5() + : TestCommandBridge("Test_TC_APPLAUNCHER_3_5") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -52969,7 +51592,7 @@ class Test_TC_I_2_3 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_I_2_3() {} + ~Test_TC_APPLAUNCHER_3_5() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -52977,11 +51600,11 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_APPLAUNCHER_3_5\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APPLAUNCHER_3_5\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -52994,188 +51617,18 @@ class Test_TC_I_2_3 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : 1.Wait for the commissioned device to be retrieved\n"); - err = Test1WaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: ChipLogProgress(chipTool, - " ***** Test Step 1 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink and " - "the effect variant field set to 0x00 default\n"); - if (ShouldSkip("I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x00Default_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : DUT executes a blink effect\n"); - if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestDutExecutesABlinkEffect_2(); - break; - case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe " - "and the effect variant field set to 0x00 default\n"); - if (ShouldSkip("I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : DUT executes a breathe effect\n"); - if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestDutExecutesABreatheEffect_4(); - break; - case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x02 okay and " - "the effect variant field set to 0x00 default\n"); - if (ShouldSkip("I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x02OkayAndTheEffectVariantFieldSetTo0x00Default_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : DUT executes an okay effect\n"); - if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestDutExecutesAnOkayEffect_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x0b channel " - "change and the effect variant field set to 0x00 default\n"); - if (ShouldSkip("I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x0bChannelChangeAndTheEffectVariantFieldSetTo0x00Default_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : DUT executes a channel change effect\n"); - if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestDutExecutesAChannelChangeEffect_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe " - "and the effect variant field set to 0x00 default\n"); - if (ShouldSkip("I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : DUT executes a breathe effect\n"); - if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestDutExecutesABreatheEffect_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0xfe finish " - "effect and the effect variant field set to 0x00 default\n"); - if (ShouldSkip("I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xfeFinishEffectAndTheEffectVariantFieldSetTo0x00Default_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : DUT stops the breathe effect after the current effect sequence\n"); - if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestDutStopsTheBreatheEffectAfterTheCurrentEffectSequence_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe " - "and the effect variant field set to 0x00 default\n"); - if (ShouldSkip("I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : DUT executes a breathe effect\n"); - if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestDutExecutesABreatheEffect_14(); - break; - case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " - "effect and the effect variant field set to 0x00 default\n"); - if (ShouldSkip("I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : DUT stops the breathe effect as soon as possible.\n"); - if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestDutStopsTheBreatheEffectAsSoonAsPossible_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink " - "and the effect variant field set to 0x42 unknown\n"); - if (ShouldSkip("I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x42Unknown_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Check DUT executes a blink effect.\n"); - if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestCheckDutExecutesABlinkEffect_18(); - break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " - "effect and the effect variant field set to 0x00 default\n"); - if (ShouldSkip("I.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : DUT stops any effect that may be still running as soon as possible\n"); - if (ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp")) { + " ***** Test Step 1 : TH reads CatalogList attribute from the DUT and where each entry in the list is a CSA-issued " + "Vendor Id of type unsigned 16 bit integer ranging between 0-65536 for the catalog\n"); + if (ShouldSkip("APPLAUNCHER.S.A0000")) { NextTest(); return; } - err = TestDutStopsAnyEffectThatMayBeStillRunningAsSoonAsPossible_20(); + err = TestThReadsCatalogListAttributeFromTheDutAndWhereEachEntryInTheListIsACsaIssuedVendorIdOfTypeUnsigned16BitIntegerRangingBetween065536ForTheCatalog_1(); break; } @@ -53194,63 +51647,6 @@ class Test_TC_I_2_3 : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -53264,14 +51660,14 @@ class Test_TC_I_2_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 21; + const uint16_t mTestCount = 2; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR Test1WaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -53280,371 +51676,290 @@ class Test_TC_I_2_3 : public TestCommandBridge { } CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x00Default_1() + TestThReadsCatalogListAttributeFromTheDutAndWhereEachEntryInTheListIsACsaIssuedVendorIdOfTypeUnsigned16BitIntegerRangingBetween065536ForTheCatalog_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:0U]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; - [cluster triggerEffectWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink " - @"and the effect variant field set to 0x00 default Error: %@", - err); + [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CatalogList attribute from the DUT and where each entry in the list is a CSA-issued Vendor Id of type " + @"unsigned 16 bit integer ranging between 0-65536 for the catalog Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestDutExecutesABlinkEffect_2() +class Test_TC_APPLAUNCHER_3_6 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_APPLAUNCHER_3_6() + : TestCommandBridge("Test_TC_APPLAUNCHER_3_6") + , mTestIndex(0) { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_3() + ~Test_TC_APPLAUNCHER_3_6() {} + + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_APPLAUNCHER_3_6\n"); + } - __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; - [cluster triggerEffectWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 " - @"breathe and the effect variant field set to 0x00 default Error: %@", - err); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APPLAUNCHER_3_6\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + Wait(); - NextTest(); - }]; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, + " ***** Test Step 1 : TH reads CurrentApp attribute from the DUT and Verify the in-focus application attributes, " + "which should include the display Application ID(type:uint16) Catalog Vendor ID(type:string) or Null if there is " + "no current in-focus application\n"); + if (ShouldSkip("APPLAUNCHER.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentAppAttributeFromTheDutAndVerifyTheInFocusApplicationAttributesWhichShouldIncludeTheDisplayApplicationIDtypeuint16CatalogVendorIDtypestringOrNullIfThereIsNoCurrentInFocusApplication_1(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestDutExecutesABreatheEffect_4() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x02OkayAndTheEffectVariantFieldSetTo0x00Default_5() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; - __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:2U]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; - [cluster triggerEffectWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x02 okay " - @"and the effect variant field set to 0x00 default Error: %@", - err); + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestDutExecutesAnOkayEffect_6() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x0bChannelChangeAndTheEffectVariantFieldSetTo0x00Default_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:11U]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; - [cluster triggerEffectWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x0b " - @"channel change and the effect variant field set to 0x00 default Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestDutExecutesAChannelChangeEffect_8() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_9() + TestThReadsCurrentAppAttributeFromTheDutAndVerifyTheInFocusApplicationAttributesWhichShouldIncludeTheDisplayApplicationIDtypeuint16CatalogVendorIDtypestringOrNullIfThereIsNoCurrentInFocusApplication_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; - [cluster triggerEffectWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 " - @"breathe and the effect variant field set to 0x00 default Error: %@", - err); + [cluster readAttributeCurrentAppWithCompletion:^( + MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentApp attribute from the DUT and Verify the in-focus application attributes, which should " + @"include the display Application ID(type:uint16) Catalog Vendor ID(type:string) or Null if there is no current " + @"in-focus application Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestDutExecutesABreatheEffect_10() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xfeFinishEffectAndTheEffectVariantFieldSetTo0x00Default_11() +class Test_TC_MEDIAINPUT_3_10 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_MEDIAINPUT_3_10() + : TestCommandBridge("Test_TC_MEDIAINPUT_3_10") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:254U]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; - [cluster triggerEffectWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xfe " - @"finish effect and the effect variant field set to 0x00 default Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestDutStopsTheBreatheEffectAfterTheCurrentEffectSequence_12() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + ~Test_TC_MEDIAINPUT_3_10() {} - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_13() + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; - [cluster triggerEffectWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 " - @"breathe and the effect variant field set to 0x00 default Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAINPUT_3_10\n"); + } - NextTest(); - }]; + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAINPUT_3_10\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - return CHIP_NO_ERROR; - } + Wait(); - CHIP_ERROR TestDutExecutesABreatheEffect_14() - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, + " ***** Test Step 1 : TH reads the InputList attribute from the DUT to show list of Inputs available and Verify " + "list of available inputs supported by the device is provided, where each entry in the list contains an " + "index(type:uint 8), InputType (InputType Enums), Name (type: Strings), and Description(Type:String)\n"); + if (ShouldSkip("MEDIAINPUT.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1(); + break; + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_15() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:255U]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; - [cluster triggerEffectWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " - @"effect and the effect variant field set to 0x00 default Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestDutStopsTheBreatheEffectAsSoonAsPossible_16() + chip::System::Clock::Timeout GetWaitDuration() const override { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); } - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x42Unknown_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:0U]; - params.effectVariant = [NSNumber numberWithUnsignedChar:66U]; - [cluster triggerEffectWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink " - @"and the effect variant field set to 0x42 unknown Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; - return CHIP_NO_ERROR; - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - CHIP_ERROR TestCheckDutExecutesABlinkEffect_18() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_19() + TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:255U]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; - [cluster triggerEffectWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " - @"effect and the effect variant field set to 0x00 default Error: %@", - err); + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " + @"inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " + @"InputType (InputType Enums), Name (type: Strings), and Description(Type:String) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - - CHIP_ERROR TestDutStopsAnyEffectThatMayBeStillRunningAsSoonAsPossible_20() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; -class Test_TC_ILL_1_1 : public TestCommandBridge { +class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ILL_1_1() - : TestCommandBridge("Test_TC_ILL_1_1") + Test_TC_MEDIAINPUT_3_11() + : TestCommandBridge("Test_TC_MEDIAINPUT_3_11") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("Index", 0, UINT8_MAX, &mIndex); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ILL_1_1() {} + ~Test_TC_MEDIAINPUT_3_11() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -53652,11 +51967,11 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAINPUT_3_11\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAINPUT_3_11\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -53673,50 +51988,34 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(Tolerance) in AttributeList\n"); - if (ShouldSkip("ILL.S.A0003")) { + ChipLogProgress(chipTool, + " ***** Test Step 1 : TH reads the InputList attribute from the DUT to show list of Inputs available and Verify " + "list of available inputs supported by the device is provided, where each entry in the list contains an " + "index(type:uint 8), InputType (InputType Enums), Name (type: Strings), and Description(Type:String)\n"); + if (ShouldSkip("MEDIAINPUT.S.A0000")) { NextTest(); return; } - err = TestReadTheOptionalAttributeToleranceInAttributeList_4(); + err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(LightSensorType) in AttributeList\n"); - if (ShouldSkip("ILL.S.A0004")) { + case 2: + ChipLogProgress(chipTool, + " ***** Test Step 2 : TH sends SelectInput command to DUT to select an input by passing the index of the preferred " + "input.\n"); + if (ShouldSkip("MEDIAINPUT.S.C00.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalAttributeLightSensorTypeInAttributeList_5(); + err = TestThSendsSelectInputCommandToDutToSelectAnInputByPassingTheIndexOfThePreferredInput_2(); break; - case 6: + case 3: ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " - "contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + " ***** Test Step 3 : TH reads _CurrentInput attribute from the DUT to show the current input selected.\n"); + if (ShouldSkip("MEDIAINPUT.S.A0001 && MEDIAINPUT.S.C00.Rsp")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_8(); + err = TestThReadsCurrentInputAttributeFromTheDutToShowTheCurrentInputSelected_3(); break; } @@ -53741,21 +52040,6 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -53769,11 +52053,12 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mIndex; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -53784,192 +52069,68 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeLightSensorTypeInAttributeList_5() + CHIP_ERROR + TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(LightSensorType) in AttributeList Error: %@", err); + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " + @"inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " + @"InputType (InputType Enums), Name (type: Strings), and Description(Type:String) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestThSendsSelectInputCommandToDutToSelectAnInputByPassingTheIndexOfThePreferredInput_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRMediaInputClusterSelectInputParams alloc] init]; + params.index = mIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mIndex.Value()] : [NSNumber numberWithUnsignedChar:1U]; + [cluster selectInputWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends SelectInput command to DUT to select an input by passing the index of the " + @"preferred input. Error: %@", + err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestThReadsCurrentInputAttributeFromTheDutToShowTheCurrentInputSelected_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads _CurrentInput attribute from the DUT to show the current input selected. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("CurrentInput", actualValue, mIndex.HasValue() ? mIndex.Value() : 1U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -53977,11 +52138,11 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { } }; -class Test_TC_ILL_2_1 : public TestCommandBridge { +class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ILL_2_1() - : TestCommandBridge("Test_TC_ILL_2_1") + Test_TC_MEDIAINPUT_3_12() + : TestCommandBridge("Test_TC_MEDIAINPUT_3_12") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -53991,7 +52152,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ILL_2_1() {} + ~Test_TC_MEDIAINPUT_3_12() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -53999,11 +52160,11 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAINPUT_3_12\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAINPUT_3_12\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -54020,44 +52181,31 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads MinMeasuredValue attribute from DUT\n"); - if (ShouldSkip("ILL.S.A0001")) { + ChipLogProgress(chipTool, + " ***** Test Step 1 : TH reads the InputList attribute from the DUT to show list of Inputs available and Verify " + "list of available inputs supported by the device is provided, where each entry in the list contains an " + "index(type:uint 8), InputType (InputType Enums), Name (type: Strings), and Description(Type:String)\n"); + if (ShouldSkip("MEDIAINPUT.S.A0000")) { NextTest(); return; } - err = TestThReadsMinMeasuredValueAttributeFromDut_1(); + err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads MaxMeasuredValue attribute from DUT\n"); - if (ShouldSkip("ILL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Show Input Status Command\n"); + if (ShouldSkip("MEDIAINPUT.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsMaxMeasuredValueAttributeFromDut_2(); + err = TestShowInputStatusCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads MeasuredValue attribute from DUT\n"); - if (ShouldSkip("ILL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsMeasuredValueAttributeFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads Tolerance attribute from DUT\n"); - if (ShouldSkip("ILL.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsToleranceAttributeFromDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads LightSensorType attribute from DUT\n"); - if (ShouldSkip("ILL.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Hide Input Status Command\n"); + if (ShouldSkip("MEDIAINPUT.S.C02.Rsp")) { NextTest(); return; } - err = TestThReadsLightSensorTypeAttributeFromDut_5(); + err = TestHideInputStatusCommand_3(); break; } @@ -54082,12 +52230,6 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -54101,7 +52243,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -54116,132 +52258,58 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsMinMeasuredValueAttributeFromDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MinMeasuredValue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65533U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsMaxMeasuredValueAttributeFromDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 2U)); - VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65534U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsMeasuredValueAttributeFromDut_3() + CHIP_ERROR + TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MeasuredValue attribute from DUT Error: %@", err); + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " + @"inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " + @"InputType (InputType Enums), Name (type: Strings), and Description(Type:String) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65534U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsToleranceAttributeFromDut_4() + CHIP_ERROR TestShowInputStatusCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Tolerance attribute from DUT Error: %@", err); + [cluster showInputStatusWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Show Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsLightSensorTypeAttributeFromDut_5() + CHIP_ERROR TestHideInputStatusCommand_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads LightSensorType attribute from DUT Error: %@", err); + [cluster hideInputStatusWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Hide Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("lightSensorType", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("lightSensorType", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("lightSensorType", [value unsignedCharValue], 254U)); - } - NextTest(); }]; @@ -54249,21 +52317,22 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { } }; -class Test_TC_ILL_2_2 : public TestCommandBridge { +class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ILL_2_2() - : TestCommandBridge("Test_TC_ILL_2_2") + Test_TC_MEDIAINPUT_3_13() + : TestCommandBridge("Test_TC_MEDIAINPUT_3_13") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("Index", 0, UINT8_MAX, &mIndex); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ILL_2_2() {} + ~Test_TC_MEDIAINPUT_3_13() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -54271,11 +52340,11 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAINPUT_3_13\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAINPUT_3_13\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -54292,60 +52361,31 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads MinMeasuredValue attribute from DUT\n"); - if (ShouldSkip("ILL.S.A0001")) { + ChipLogProgress( + chipTool, " ***** Test Step 1 : TH reads the InputList attribute from the DUT to show list of Inputs available\n"); + if (ShouldSkip("MEDIAINPUT.S.A0000")) { NextTest(); return; } - err = TestThReadsMinMeasuredValueAttributeFromDut_1(); + err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads MaxMeasuredValue attribute from DUT\n"); - if (ShouldSkip("ILL.S.A0002")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : TH sends a RenameInput command to DUT to rename an input from the list returned in step 1\n"); + if (ShouldSkip("MEDIAINPUT.S.C03.Rsp")) { NextTest(); return; } - err = TestThReadsMaxMeasuredValueAttributeFromDut_2(); + err = TestThSendsARenameInputCommandToDutToRenameAnInputFromTheListReturnedInStep1_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Cover the sensor or darken the room\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestCoverTheSensorOrDarkenTheRoom_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 1s\n"); - err = TestWait1s_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : After a few seconds, TH reads MeasuredValue attribute from DUT.\n"); - if (ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Expose the sensor again to light\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestExposeTheSensorAgainToLight_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1s\n"); - err = TestWait1s_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : After a few seconds, TH reads MeasuredValue attribute from DUT.\n"); - if (ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : TH reads the InputList attribute from the DUT to show list of Inputs available\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAINPUT.S.A0000 && MEDIAINPUT.S.C03.Rsp")) { NextTest(); return; } - err = TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_8(); + err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_3(); break; } @@ -54370,21 +52410,6 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -54398,11 +52423,12 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mIndex; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -54412,147 +52438,177 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestThReadsMinMeasuredValueAttributeFromDut_1() + CHIP_ERROR TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MinMeasuredValue attribute from DUT Error: %@", err); + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); - } - { - MinMeasuredValue = value; - } - + VerifyOrReturn(CheckConstraintType("inputList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestThReadsMaxMeasuredValueAttributeFromDut_2() + CHIP_ERROR TestThSendsARenameInputCommandToDutToRenameAnInputFromTheListReturnedInStep1_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[MTRMediaInputClusterRenameInputParams alloc] init]; + params.index = mIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mIndex.Value()] : [NSNumber numberWithUnsignedChar:1U]; + params.name = @"A1"; + [cluster renameInputWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a RenameInput command to DUT to rename an input from the list returned in step 1 " + @"Error: %@", + err); - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); - } - { - MaxMeasuredValue = value; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCoverTheSensorOrDarkenTheRoom_3() + CHIP_ERROR TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_3() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for Successgarbage: not in length on purpose", 28); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } +}; - CHIP_ERROR TestWait1s_4() +class Test_TC_CHANNEL_5_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CHANNEL_5_1() + : TestCommandBridge("Test_TC_CHANNEL_5_1") + , mTestIndex(0) { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_5() - { + ~Test_TC_CHANNEL_5_1() {} - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"After a few seconds, TH reads MeasuredValue attribute from DUT. Error: %@", err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CHANNEL_5_1\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CHANNEL_5_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - if (value != nil) { + Wait(); - VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, + " ***** Test Step 1 : TH reads the ChannelList attribute from the DUT to show list of Inputs available and Verify " + "that the response contains a list of the known TV channels. Each list element should consist of the " + "following,Major number (unsigned 16-bit integer, mandatory),Minor number (unsigned 16-bit integer, " + "mandatory),Name (String, optional),Call sign (String, optional),Affiliate call sign (String, optional)\n"); + if (ShouldSkip("CHANNEL.S.A0000")) { + NextTest(); + return; } + err = TestThReadsTheChannelListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyThatTheResponseContainsAListOfTheKnownTvChannelsEachListElementShouldConsistOfTheFollowingMajorNumberUnsigned16BitIntegerMandatoryMinorNumberUnsigned16BitIntegerMandatoryNameStringOptionalCallSignStringOptionalAffiliateCallSignStringOptional_1(); + break; + } - NextTest(); - }]; - - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestExposeTheSensorAgainToLight_6() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for Successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestWait1s_7() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_8() + CHIP_ERROR + TestThReadsTheChannelListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyThatTheResponseContainsAListOfTheKnownTvChannelsEachListElementShouldConsistOfTheFollowingMajorNumberUnsigned16BitIntegerMandatoryMinorNumberUnsigned16BitIntegerMandatoryNameStringOptionalCallSignStringOptionalAffiliateCallSignStringOptional_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"After a few seconds, TH reads MeasuredValue attribute from DUT. Error: %@", err); + [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ChannelList attribute from the DUT to show list of Inputs available and Verify that the response " + @"contains a list of the known TV channels. Each list element should consist of the following,Major number " + @"(unsigned 16-bit integer, mandatory),Minor number (unsigned 16-bit integer, mandatory),Name (String, " + @"optional),Call sign (String, optional),Affiliate call sign (String, optional) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65534U)); - } - NextTest(); }]; @@ -54560,21 +52616,23 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { } }; -class Test_TC_LVL_1_1 : public TestCommandBridge { +class Test_TC_CHANNEL_5_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_1_1() - : TestCommandBridge("Test_TC_LVL_1_1") + Test_TC_CHANNEL_5_2() + : TestCommandBridge("Test_TC_CHANNEL_5_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); + AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_1_1() {} + ~Test_TC_CHANNEL_5_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -54582,11 +52640,11 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CHANNEL_5_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CHANNEL_5_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -54603,132 +52661,275 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !LVL.S.F00 && !LVL.S.F01 && !LVL.S.F02 ")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ChannelList attribute from the DUT\n"); + if (ShouldSkip("CHANNEL.S.A0000")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMap_2(); + err = TestThReadsTheChannelListAttributeFromTheDut_1(); break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given LVL.S.F00(OO) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("LVL.S.F00")) { + case 2: + ChipLogProgress(chipTool, + " ***** Test Step 2 : TH sends a ChangeChannelByNumber command to the DUT with channel information (major and " + "minor numbers) from the list in step 1\n"); + if (ShouldSkip("CHANNEL.S.C02.Rsp")) { NextTest(); return; } - err = TestGivenLvlsf00ooEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestThSendsAChangeChannelByNumberCommandToTheDutWithChannelInformationMajorAndMinorNumbersFromTheListInStep1_2(); break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given LVL.S.F01(LT) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("LVL.S.F01")) { + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Verify that the channel has changed on the device\n"); + if (ShouldSkip("PICS_USER_PROMPT && CHANNEL.S.C02.Rsp")) { NextTest(); return; } - err = TestGivenLvlsf01ltEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestVerifyThatTheChannelHasChangedOnTheDevice_3(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Given LVL.S.F02(FQ) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("LVL.S.F02")) { + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the CurrentChannel attribute from the DUT\n"); + if (ShouldSkip("CHANNEL.S.A0002 && CHANNEL.S.C02.Rsp")) { NextTest(); return; } - err = TestGivenLvlsf02fqEnsureFeaturemapHasTheCorrectBitSet_5(); + err = TestThReadsTheCurrentChannelAttributeFromTheDut_4(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_6(); + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList\n"); - if (ShouldSkip("LVL.S.F01")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_7(); + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in " - "AttributeList\n"); - if (ShouldSkip("LVL.S.F02")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_8(); + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(MinLevel) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0002")) { - NextTest(); - return; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 5; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mMajornumber; + chip::Optional mMinornumber; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheChannelListAttributeFromTheDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ChannelList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("channelList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsAChangeChannelByNumberCommandToTheDutWithChannelInformationMajorAndMinorNumbersFromTheListInStep1_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; + params.majorNumber = mMajornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMajornumber.Value()] + : [NSNumber numberWithUnsignedShort:9U]; + params.minorNumber = mMinornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMinornumber.Value()] + : [NSNumber numberWithUnsignedShort:1U]; + [cluster changeChannelByNumberWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a ChangeChannelByNumber command to the DUT with channel information " + @"(major and minor numbers) from the list in step 1 Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyThatTheChannelHasChangedOnTheDevice_3() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please enter 'y' if channel has changed on the devicegarbage: not in length on purpose", 53); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsTheCurrentChannelAttributeFromTheDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentChannelWithCompletion:^( + MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the CurrentChannel attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue).majorNumber, + mMajornumber.HasValue() ? mMajornumber.Value() : 9U)); + VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue).minorNumber, + mMinornumber.HasValue() ? mMinornumber.Value() : 1U)); } - err = TestReadTheOptionalAttributeMinLevelInAttributeList_9(); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CHANNEL_5_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CHANNEL_5_3() + : TestCommandBridge("Test_TC_CHANNEL_5_3") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); + AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); + AddArgument("majornumber2", 0, UINT16_MAX, &mMajornumber2); + AddArgument("minornumber2", 0, UINT16_MAX, &mMinornumber2); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_CHANNEL_5_3() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CHANNEL_5_3\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CHANNEL_5_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(MaxLevel) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0003")) { + case 1: + ChipLogProgress(chipTool, + " ***** Test Step 1 : TH reads the Lineup attribute from the DUT to show list of Inputs available and Verify that " + "the response contains a lineup info object\n"); + if (ShouldSkip("CHANNEL.S.A0001")) { NextTest(); return; } - err = TestReadTheOptionalAttributeMaxLevelInAttributeList_10(); + err = TestThReadsTheLineupAttributeFromTheDutToShowListOfInputsAvailableAndVerifyThatTheResponseContainsALineupInfoObject_1(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute(OnOffTransitionTime) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0010")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the ChannelList attribute from the DUT\n"); + if (ShouldSkip("CHANNEL.S.A0000")) { NextTest(); return; } - err = TestReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_11(); + err = TestThReadsTheChannelListAttributeFromTheDut_2(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read the optional attribute(OnTransitionTime) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0012")) { + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the CurrentChannel attribute from the DUT\n"); + if (ShouldSkip("CHANNEL.S.A0002")) { NextTest(); return; } - err = TestReadTheOptionalAttributeOnTransitionTimeInAttributeList_12(); + err = TestThReadsTheCurrentChannelAttributeFromTheDut_3(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional attribute(OffTransitionTime) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0013")) { + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends a SkipChannel command to the DUT with a value of 1\n"); + if (ShouldSkip("CHANNEL.S.C03.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalAttributeOffTransitionTimeInAttributeList_13(); + err = TestThSendsASkipChannelCommandToTheDutWithAValueOf1_4(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the optional attribute(DefaultMoveRate) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0014")) { + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Verify that the channel has changed on the device\n"); + if (ShouldSkip("PICS_USER_PROMPT && CHANNEL.S.C03.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalAttributeDefaultMoveRateInAttributeList_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_15(); + err = TestVerifyThatTheChannelHasChangedOnTheDevice_5(); break; - case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList\n"); - if (ShouldSkip("LVL.S.F02")) { + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the CurrentChannel attribute from the DUT\n"); + if (ShouldSkip("CHANNEL.S.A0002 && CHANNEL.S.C03.Rsp")) { NextTest(); return; } - err = TestReadTheFeatureDependentLVLSF02CommandInAcceptedCommandList_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_18(); + err = TestThReadsTheCurrentChannelAttributeFromTheDut_6(); break; } @@ -54762,42 +52963,6 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -54811,11 +52976,15 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mMajornumber; + chip::Optional mMinornumber; + chip::Optional mMajornumber2; + chip::Optional mMinornumber2; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -54826,199 +52995,361 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR + TestThReadsTheLineupAttributeFromTheDutToShowListOfInputsAvailableAndVerifyThatTheResponseContainsALineupInfoObject_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the Lineup attribute from the DUT to show list of Inputs available and Verify that the response " + @"contains a lineup info object Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestThReadsTheChannelListAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ChannelList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("channelList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenLvlsf00ooEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestThReadsTheCurrentChannelAttributeFromTheDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given LVL.S.F00(OO) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeCurrentChannelWithCompletion:^( + MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the CurrentChannel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue).majorNumber, + mMajornumber.HasValue() ? mMajornumber.Value() : 6U)); + VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue).minorNumber, + mMinornumber.HasValue() ? mMinornumber.Value() : 0U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenLvlsf01ltEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestThSendsASkipChannelCommandToTheDutWithAValueOf1_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given LVL.S.F01(LT) ensure featuremap has the correct bit set Error: %@", err); + __auto_type * params = [[MTRChannelClusterSkipChannelParams alloc] init]; + params.count = [NSNumber numberWithShort:1]; + [cluster skipChannelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a SkipChannel command to the DUT with a value of 1 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenLvlsf02fqEnsureFeaturemapHasTheCorrectBitSet_5() + CHIP_ERROR TestVerifyThatTheChannelHasChangedOnTheDevice_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given LVL.S.F02(FQ) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please enter 'y' if channel has changed on the devicegarbage: not in length on purpose", 53); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_6() + CHIP_ERROR TestThReadsTheCurrentChannelAttributeFromTheDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeCurrentChannelWithCompletion:^( + MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the CurrentChannel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue).majorNumber, + mMajornumber2.HasValue() ? mMajornumber2.Value() : 9U)); + VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue).minorNumber, + mMinornumber2.HasValue() ? mMinornumber2.Value() : 1U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentChannel", "ChannelInfoStruct", "ChannelInfoStruct")); + } NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_7() +class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_MEDIAPLAYBACK_6_1() + : TestCommandBridge("Test_TC_MEDIAPLAYBACK_6_1") + , mTestIndex(0) { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + ~Test_TC_MEDIAPLAYBACK_6_1() {} - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList Error: %@", err); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAPLAYBACK_6_1\n"); + } - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAPLAYBACK_6_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - NextTest(); - }]; + Wait(); - return CHIP_NO_ERROR; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress( + chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestReadsTheCurrentStateAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a Play command\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestSendsAPlayCommand_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Verify that the media state is playing\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestVerifyThatTheMediaStateIsPlaying_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentState attribute\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestReadsTheCurrentStateAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : sends a Pause command\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestSendsAPauseCommand_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Verify that the media is paused\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestVerifyThatTheMediaIsPaused_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the CurrentState attribute\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp && MEDIAPLAYBACK.S.A0000")) { + NextTest(); + return; + } + err = TestReadsTheCurrentStateAttribute_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends a Stop command\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestSendsAStopCommand_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Verify that the media is stoped\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestVerifyThatTheMediaIsStoped_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the CurrentState attribute\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestReadsTheCurrentStateAttribute_11(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_8() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList Error: %@", err); + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 12; - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheOptionalAttributeMinLevelInAttributeList_9() + CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(MinLevel) in AttributeList Error: %@", err); + [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } NextTest(); }]; @@ -55026,20 +53357,22 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMaxLevelInAttributeList_10() + CHIP_ERROR TestReadsTheCurrentStateAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(MaxLevel) in AttributeList Error: %@", err); + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 1U)); + } NextTest(); }]; @@ -55047,20 +53380,22 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_11() + CHIP_ERROR TestSendsAPlayCommand_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(OnOffTransitionTime) in AttributeList Error: %@", err); + [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Play command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } NextTest(); }]; @@ -55068,41 +53403,32 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeOnTransitionTimeInAttributeList_12() + CHIP_ERROR TestVerifyThatTheMediaStateIsPlaying_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(OnTransitionTime) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheOptionalAttributeOffTransitionTimeInAttributeList_13() + CHIP_ERROR TestReadsTheCurrentStateAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(OffTransitionTime) in AttributeList Error: %@", err); + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); + } NextTest(); }]; @@ -55110,20 +53436,22 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeDefaultMoveRateInAttributeList_14() + CHIP_ERROR TestSendsAPauseCommand_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(DefaultMoveRate) in AttributeList Error: %@", err); + [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"sends a Pause command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } NextTest(); }]; @@ -55131,48 +53459,32 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_15() + CHIP_ERROR TestVerifyThatTheMediaIsPaused_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' if media state is pausedgarbage: not in length on purpose", 41); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheFeatureDependentLVLSF02CommandInAcceptedCommandList_16() + CHIP_ERROR TestReadsTheCurrentStateAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList Error: %@", err); + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 1U)); + } NextTest(); }]; @@ -55180,48 +53492,56 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_17() + CHIP_ERROR TestSendsAStopCommand_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster stopWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Stop command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_18() + CHIP_ERROR TestVerifyThatTheMediaIsStoped_10() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' if media state is stopedgarbage: not in length on purpose", 41); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheCurrentStateAttribute_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("CurrentState", actualValue, 2U)); } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; @@ -55229,11 +53549,11 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { } }; -class Test_TC_LVL_2_1 : public TestCommandBridge { +class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_2_1() - : TestCommandBridge("Test_TC_LVL_2_1") + Test_TC_MEDIAPLAYBACK_6_2() + : TestCommandBridge("Test_TC_MEDIAPLAYBACK_6_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -55243,7 +53563,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_2_1() {} + ~Test_TC_MEDIAPLAYBACK_6_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -55251,11 +53571,11 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAPLAYBACK_6_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAPLAYBACK_6_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -55272,164 +53592,141 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentLevel attribute\n"); - if (ShouldSkip("LVL.S.A0000")) { + ChipLogProgress( + chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } - err = TestReadsTheCurrentLevelAttribute_1(); + err = TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the RemainingTime attribute\n"); - if (ShouldSkip("LVL.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute from the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } - err = TestReadsTheRemainingTimeAttribute_2(); + err = TestReadsTheCurrentStateAttributeFromTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the MinLevel attribute\n"); - if (ShouldSkip("LVL.S.A0002 && LVL.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a Play command to the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } - err = TestReadsTheMinLevelAttribute_3(); + err = TestSendsAPlayCommandToTheDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the MinLevel attribute\n"); - if (ShouldSkip("LVL.S.A0002 && !LVL.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Verify that the media state is playing\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } - err = TestReadsTheMinLevelAttribute_4(); + err = TestVerifyThatTheMediaStateIsPlaying_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MaxLevel attribute\n"); - if (ShouldSkip("LVL.S.A0003 && LVL.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentState attribute\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } - err = TestReadsTheMaxLevelAttribute_5(); + err = TestReadsTheCurrentStateAttribute_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the MaxLevel attribute\n"); - if (ShouldSkip("LVL.S.A0003 && !LVL.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Sends a StartOver command to the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C03.Rsp")) { NextTest(); return; } - err = TestReadsTheMaxLevelAttribute_6(); + err = TestSendsAStartOverCommandToTheDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4b & 4C Reads the CurrentLevel attribute\n"); - if (ShouldSkip("LVL.S.F01 && LVL.S.A0002 && LVL.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Verify that the media is started over\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C03.Rsp")) { NextTest(); return; } - err = TestStep4b4cReadsTheCurrentLevelAttribute_7(); + err = TestVerifyThatTheMediaIsStartedOver_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4b & 4C Reads the CurrentLevel attribute\n"); - if (ShouldSkip("LVL.S.A0002 && LVL.S.A0003 && !LVL.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Next command to the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C05.Rsp")) { NextTest(); return; } - err = TestStep4b4cReadsTheCurrentLevelAttribute_8(); + err = TestSendsANextCommandToTheDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the CurrentFrequency attribute\n"); - if (ShouldSkip("LVL.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Verify that the next media item in the queue has been loaded\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C05.Rsp")) { NextTest(); return; } - err = TestReadsTheCurrentFrequencyAttribute_9(); + err = TestVerifyThatTheNextMediaItemInTheQueueHasBeenLoaded_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the MinFrequency attribute\n"); - if (ShouldSkip("LVL.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Sends a Previous command to the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C04.Rsp")) { NextTest(); return; } - err = TestReadsTheMinFrequencyAttribute_10(); + err = TestSendsAPreviousCommandToTheDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the MaxFrequency attribute\n"); - if (ShouldSkip("LVL.S.A0006")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Verify that the previous media item in the queue has been loaded\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C04.Rsp")) { NextTest(); return; } - err = TestReadsTheMaxFrequencyAttribute_11(); + err = TestVerifyThatThePreviousMediaItemInTheQueueHasBeenLoaded_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7b & 7C Reads the CurrentFrequency attribute\n"); - if (ShouldSkip("LVL.S.A0004 && LVL.S.A0005 && LVL.S.A0006")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Sends a SkipForward command to the DUT \n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C08.Rsp")) { NextTest(); return; } - err = TestStep7b7cReadsTheCurrentFrequencyAttribute_12(); + err = TestSendsASkipForwardCommandToTheDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the OnOffTransitionTime attribute\n"); - if (ShouldSkip("LVL.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Verify that the media has skipped forward 10 seconds\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C08.Rsp")) { NextTest(); return; } - err = TestReadsTheOnOffTransitionTimeAttribute_13(); + err = TestVerifyThatTheMediaHasSkippedForward10Seconds_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the OnLevel attribute \n"); - if (ShouldSkip("LVL.S.F01 && LVL.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the SampledPosition attribute from the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C08.Rsp")) { NextTest(); return; } - err = TestReadsTheOnLevelAttribute_14(); + err = TestReadsTheSampledPositionAttributeFromTheDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the OnLevel attribute \n"); - if (ShouldSkip("LVL.S.A0011 && !LVL.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Sends a SkipBackward command to the DUT \n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C09.Rsp")) { NextTest(); return; } - err = TestReadsTheOnLevelAttribute_15(); + err = TestSendsASkipBackwardCommandToTheDut_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads the OnTransitionTime attribute \n"); - if (ShouldSkip("LVL.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Verify that the media has skipped backward 10 seconds\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C09.Rsp")) { NextTest(); return; } - err = TestReadsTheOnTransitionTimeAttribute_16(); + err = TestVerifyThatTheMediaHasSkippedBackward10Seconds_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads the OffTransitionTime attribute \n"); - if (ShouldSkip("LVL.S.A0013")) { - NextTest(); - return; - } - err = TestReadsTheOffTransitionTimeAttribute_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reads the DefaultMoveRate attribute \n"); - if (ShouldSkip("LVL.S.A0014")) { - NextTest(); - return; - } - err = TestReadsTheDefaultMoveRateAttribute_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Reads the Options attribute \n"); - if (ShouldSkip("LVL.S.A000f")) { - NextTest(); - return; - } - err = TestReadsTheOptionsAttribute_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Reads the StartUpCurrentLevel attribute \n"); - if (ShouldSkip("LVL.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Reads the SampledPosition attribute from the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C09.Rsp")) { NextTest(); return; } - err = TestReadsTheStartUpCurrentLevelAttribute_20(); + err = TestReadsTheSampledPositionAttributeFromTheDut_17(); break; } @@ -55496,15 +53793,6 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -55518,7 +53806,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 21; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -55532,28 +53820,22 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nullable CurrentLevelValue; - CHIP_ERROR TestReadsTheCurrentLevelAttribute_1() + CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentLevel attribute Error: %@", err); + [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 254U)); - } { - CurrentLevelValue = value; + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -55562,49 +53844,44 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheRemainingTimeAttribute_2() + CHIP_ERROR TestReadsTheCurrentStateAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the RemainingTime attribute Error: %@", err); + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("remainingTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("remainingTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("remainingTime", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 1U)); + } NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull MinLevelValue; - CHIP_ERROR TestReadsTheMinLevelAttribute_3() + CHIP_ERROR TestSendsAPlayCommandToTheDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MinLevel attribute Error: %@", err); + [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Play command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("MinLevel", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); - { - MinLevelValue = value; + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -55612,55 +53889,32 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull MinLevelFeatureMapNotSupportedValue; - CHIP_ERROR TestReadsTheMinLevelAttribute_4() + CHIP_ERROR TestVerifyThatTheMediaStateIsPlaying_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MinLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 254U)); - { - MinLevelFeatureMapNotSupportedValue = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - NSNumber * _Nonnull MaxLevelValue; - CHIP_ERROR TestReadsTheMaxLevelAttribute_5() + CHIP_ERROR TestReadsTheCurrentStateAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MaxLevel attribute Error: %@", err); + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("MaxLevel", actualValue, 254U)); - } - - VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], MinLevelValue)); - { - MaxLevelValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); } NextTest(); @@ -55668,78 +53922,56 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull MaxLevelFeatureMapNotSupportedValue; - CHIP_ERROR TestReadsTheMaxLevelAttribute_6() + CHIP_ERROR TestSendsAStartOverCommandToTheDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MaxLevel attribute Error: %@", err); + [cluster + startOverWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a StartOver command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); - VerifyOrReturn( - CheckConstraintMinValue("maxLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); - VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); - { - MaxLevelFeatureMapNotSupportedValue = value; - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_7() + CHIP_ERROR TestVerifyThatTheMediaIsStartedOver_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b & 4C Reads the CurrentLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], MinLevelValue)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], MaxLevelValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' if media is started overgarbage: not in length on purpose", 41); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_8() + CHIP_ERROR TestSendsANextCommandToTheDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b & 4C Reads the CurrentLevel attribute Error: %@", err); + [cluster nextWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Next command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue( - "currentLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentLevel", [value unsignedCharValue], MaxLevelFeatureMapNotSupportedValue)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -55748,72 +53980,110 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_9() + CHIP_ERROR TestVerifyThatTheNextMediaItemInTheQueueHasBeenLoaded_9() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if media item in the queue has been loadedgarbage: not in length on purpose", 59); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestSendsAPreviousCommandToTheDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentFrequency attribute Error: %@", err); + [cluster + previousWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Previous command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], 65535U)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull MinFrequencyValue; - CHIP_ERROR TestReadsTheMinFrequencyAttribute_10() + CHIP_ERROR TestVerifyThatThePreviousMediaItemInTheQueueHasBeenLoaded_11() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if previous media item in the queue has been loadedgarbage: not in length on purpose", 68); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestSendsASkipForwardCommandToTheDut_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MinFrequency attribute Error: %@", err); + __auto_type * params = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; + params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:10000ULL]; + [cluster + skipForwardWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a SkipForward command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("minFrequency", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minFrequency", [value unsignedShortValue], 65535U)); - { - MinFrequencyValue = value; - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull MaxFrequencyValue; - CHIP_ERROR TestReadsTheMaxFrequencyAttribute_11() + CHIP_ERROR TestVerifyThatTheMediaHasSkippedForward10Seconds_13() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if media has skipped forward 10 secondsgarbage: not in length on purpose", 56); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheSampledPositionAttributeFromTheDut_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MaxFrequency attribute Error: %@", err); + [cluster readAttributeSampledPositionWithCompletion:^( + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the SampledPosition attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("maxFrequency", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxFrequency", [value unsignedShortValue], 65535U)); { - MaxFrequencyValue = value; + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); + VerifyOrReturn( + CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); + VerifyOrReturn( + CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 10000ULL)); } NextTest(); @@ -55822,119 +54092,287 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7b7cReadsTheCurrentFrequencyAttribute_12() + CHIP_ERROR TestSendsASkipBackwardCommandToTheDut_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7b & 7C Reads the CurrentFrequency attribute Error: %@", err); + __auto_type * params = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; + params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:10000ULL]; + [cluster + skipBackwardWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a SkipBackward command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], MinFrequencyValue)); - VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], MaxFrequencyValue)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_13() + CHIP_ERROR TestVerifyThatTheMediaHasSkippedBackward10Seconds_16() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if media has skipped backward 10 secondsgarbage: not in length on purpose", 57); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheSampledPositionAttributeFromTheDut_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnOffTransitionTime attribute Error: %@", err); + [cluster readAttributeSampledPositionWithCompletion:^( + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the SampledPosition attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); + VerifyOrReturn( + CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); + VerifyOrReturn( + CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 0ULL)); + } NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadsTheOnLevelAttribute_14() +class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_MEDIAPLAYBACK_6_3() + : TestCommandBridge("Test_TC_MEDIAPLAYBACK_6_3") + , mTestIndex(0) { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("SeekPosition", 0, UINT64_MAX, &mSeekPosition); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + ~Test_TC_MEDIAPLAYBACK_6_3() {} - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnLevel attribute Error: %@", err); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAPLAYBACK_6_3\n"); + } - if (value != nil) { + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAPLAYBACK_6_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], MinLevelValue)); - VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], MaxLevelValue)); - } + Wait(); - NextTest(); - }]; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress( + chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a Seek command\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C0b.Rsp")) { + NextTest(); + return; + } + err = TestSendsASeekCommand_2(); + break; + case 3: + ChipLogProgress( + chipTool, " ***** Test Step 3 : Verify that the media has moved to 10 seconds from the starting point\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0b.Rsp")) { + NextTest(); + return; + } + err = TestVerifyThatTheMediaHasMovedTo10SecondsFromTheStartingPoint_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the SampledPosition attribute\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C0b.Rsp")) { + NextTest(); + return; + } + err = TestReadsTheSampledPositionAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the StartTime attribute from the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0001 && PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheStartTimeAttributeFromTheDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the SeekRangeEnd attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsTheSeekRangeEndAttributeFromTheDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads the SeekRangeStart attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0006")) { + NextTest(); + return; + } + err = TestThReadsTheSeekRangeStartAttributeFromTheDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads the Duration attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsTheDurationAttributeFromTheDut_8(); + break; + case 9: + ChipLogProgress( + chipTool, " ***** Test Step 9 : Sends a Seek command Position value beyond the furthest valid position\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C0b.Rsp")) { + NextTest(); + return; + } + err = TestSendsASeekCommandPositionValueBeyondTheFurthestValidPosition_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : verify that the media has not moved.\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0b.Rsp")) { + NextTest(); + return; + } + err = TestVerifyThatTheMediaHasNotMoved_10(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestReadsTheOnLevelAttribute_15() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnLevel attribute Error: %@", err); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - if (value != nil) { +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 11; - VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); - VerifyOrReturn( - CheckConstraintMinValue("onLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); - VerifyOrReturn( - CheckConstraintMaxValue("onLevel", [value unsignedCharValue], MaxLevelFeatureMapNotSupportedValue)); - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mSeekPosition; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_16() + CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnTransitionTime attribute Error: %@", err); + [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("onTransitionTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onTransitionTime", [value unsignedShortValue], 65535U)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -55943,48 +54381,63 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_17() + CHIP_ERROR TestSendsASeekCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OffTransitionTime attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; + params.position = [NSNumber numberWithUnsignedLongLong:10000ULL]; + [cluster seekWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Seek command Error: %@", err); - if (value != nil) { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("offTransitionTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("offTransitionTime", [value unsignedShortValue], 65535U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_18() + CHIP_ERROR TestVerifyThatTheMediaHasMovedTo10SecondsFromTheStartingPoint_3() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if media has moved to 10 seconds from the starting pointgarbage: not in length on purpose", 73); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheSampledPositionAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the DefaultMoveRate attribute Error: %@", err); + [cluster readAttributeSampledPositionWithCompletion:^( + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the SampledPosition attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); + VerifyOrReturn( + CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); + VerifyOrReturn( + CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 10000ULL)); } NextTest(); @@ -55993,72 +54446,99 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOptionsAttribute_19() + CHIP_ERROR TestThReadsTheStartTimeAttributeFromTheDut_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Options attribute Error: %@", err); + CHIP_ERROR TestThReadsTheSeekRangeEndAttributeFromTheDut_6() + { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - VerifyOrReturn(CheckConstraintType("options", "bitmap8", "bitmap8")); - NextTest(); - }]; + CHIP_ERROR TestThReadsTheSeekRangeStartAttributeFromTheDut_7() + { - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttribute_20() + CHIP_ERROR TestThReadsTheDurationAttributeFromTheDut_8() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestSendsASeekCommandPositionValueBeyondTheFurthestValidPosition_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the StartUpCurrentLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; + params.position = mSeekPosition.HasValue() ? [NSNumber numberWithUnsignedLongLong:mSeekPosition.Value()] + : [NSNumber numberWithUnsignedLongLong:100000000ULL]; + [cluster seekWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Seek command Position value beyond the furthest valid position Error: %@", err); - if (value != nil) { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("startUpCurrentLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("startUpCurrentLevel", [value unsignedCharValue], 255U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 5U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestVerifyThatTheMediaHasNotMoved_10() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' if media has not movedgarbage: not in length on purpose", 39); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; -class Test_TC_LVL_2_2 : public TestCommandBridge { +class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_2_2() - : TestCommandBridge("Test_TC_LVL_2_2") + Test_TC_MEDIAPLAYBACK_6_4() + : TestCommandBridge("Test_TC_MEDIAPLAYBACK_6_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("OnOffTransitionTimeConfigValue", 0, UINT16_MAX, &mOnOffTransitionTimeConfigValue); - AddArgument("OnLevelConfigValue", 0, UINT8_MAX, &mOnLevelConfigValue); - AddArgument("OnTransitionTimeConfigValue", 0, UINT16_MAX, &mOnTransitionTimeConfigValue); - AddArgument("OffTransitionTimeConfigValue", 0, UINT16_MAX, &mOffTransitionTimeConfigValue); - AddArgument("DefaultMoveRateConfigValue", 0, UINT8_MAX, &mDefaultMoveRateConfigValue); - AddArgument("StartUpCurrentLevelConfigValue", 0, UINT8_MAX, &mStartUpCurrentLevelConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_2_2() {} + ~Test_TC_MEDIAPLAYBACK_6_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -56066,11 +54546,11 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAPLAYBACK_6_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAPLAYBACK_6_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -56087,156 +54567,183 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OnOffTransitionTime attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0010")) { + ChipLogProgress( + chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } - err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_1(); + err = TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : writes the OnOffTransitionTime attribute on the DUT\n"); - if (ShouldSkip("LVL.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute from the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } - err = TestWritesTheOnOffTransitionTimeAttributeOnTheDut_2(); + err = TestReadsTheCurrentStateAttributeFromTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the OnOffTransitionTime attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the PlaybackSpeed attribute from the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } - err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_3(); + err = TestReadsThePlaybackSpeedAttributeFromTheDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the OnLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Sends a FastForward command\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } - err = TestReadsTheOnLevelAttributeFromTheDut_4(); + err = TestSendsAFastForwardCommand_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : writes the OnLevel attribute on the DUT\n"); - if (ShouldSkip("LVL.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : verify that the media state is playing\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } - err = TestWritesTheOnLevelAttributeOnTheDut_5(); + err = TestVerifyThatTheMediaStateIsPlaying_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the OnLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the CurrentState attribute\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } - err = TestReadsTheOnLevelAttributeFromTheDut_6(); + err = TestReadsTheCurrentStateAttribute_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the OnTransitionTime attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the PlaybackSpeed attribute from the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } - err = TestReadsTheOnTransitionTimeAttributeFromTheDut_7(); + err = TestReadsThePlaybackSpeedAttributeFromTheDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Writes the OnTransitionTime attribute on the DUT\n"); - if (ShouldSkip("LVL.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a FastForward command\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } - err = TestWritesTheOnTransitionTimeAttributeOnTheDut_8(); + err = TestSendsAFastForwardCommand_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the OnTransitionTime attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : verify that the media play speed has increased.\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } - err = TestReadsTheOnTransitionTimeAttributeFromTheDut_9(); + err = TestVerifyThatTheMediaPlaySpeedHasIncreased_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OffTransitionTime attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0013")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the PlaybackSpeed attribute from the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } - err = TestReadsTheOffTransitionTimeAttributeFromTheDut_10(); + err = TestReadsThePlaybackSpeedAttributeFromTheDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Writes the OffTransitionTime attribute on the DUT\n"); - if (ShouldSkip("LVL.S.A0013")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Sends a Rewind command to the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } - err = TestWritesTheOffTransitionTimeAttributeOnTheDut_11(); + err = TestSendsARewindCommandToTheDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the OffTransitionTime attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0013")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : verify that the media play has reversed direction.\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } - err = TestReadsTheOffTransitionTimeAttributeFromTheDut_12(); + err = TestVerifyThatTheMediaPlayHasReversedDirection_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the DefaultMoveRate attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0014")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the CurrentState attribute\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } - err = TestReadsTheDefaultMoveRateAttributeFromTheDut_13(); + err = TestReadsTheCurrentStateAttribute_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Writes the DefaultMoveRate attribute on the DUT\n"); - if (ShouldSkip("LVL.S.A0014")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the PlaybackSpeed attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } - err = TestWritesTheDefaultMoveRateAttributeOnTheDut_14(); + err = TestReadsThePlaybackSpeedAttributeFromTheDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the DefaultMoveRate attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0014")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Sends a Rewind command to the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } - err = TestReadsTheDefaultMoveRateAttributeFromTheDut_15(); + err = TestSendsARewindCommandToTheDut_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads the StartUpCurrentLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A4000")) { + ChipLogProgress( + chipTool, " ***** Test Step 16 : verify that the media play speed has increased in the reverse direction.\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } - err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_16(); + err = TestVerifyThatTheMediaPlaySpeedHasIncreasedInTheReverseDirection_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : writes the StartUpCurrentLevel attribute on the DUT\n"); - if (ShouldSkip("LVL.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Reads the PlaybackSpeed attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } - err = TestWritesTheStartUpCurrentLevelAttributeOnTheDut_17(); + err = TestReadsThePlaybackSpeedAttributeFromTheDut_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : reads the StartUpCurrentLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : Sends a Play command\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } - err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_18(); + err = TestSendsAPlayCommand_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : writes back default value of OnOffTransitionTime attribute\n"); - if (ShouldSkip("LVL.S.A0010")) { + ChipLogProgress( + chipTool, " ***** Test Step 19 : verify that the media is has resumed playing forward at the default speed.\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } - err = TestWritesBackDefaultValueOfOnOffTransitionTimeAttribute_19(); + err = TestVerifyThatTheMediaIsHasResumedPlayingForwardAtTheDefaultSpeed_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Reads the PlaybackSpeed attribute from the DUT\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestReadsThePlaybackSpeedAttributeFromTheDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Sends consecutive FastForward commands\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp")) { + NextTest(); + return; + } + err = TestSendsConsecutiveFastForwardCommands_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Sends consecutive Rewind commands\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C06.Rsp")) { + NextTest(); + return; + } + err = TestSendsConsecutiveRewindCommands_22(); break; } @@ -56309,6 +54816,15 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -56322,17 +54838,11 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mOnOffTransitionTimeConfigValue; - chip::Optional mOnLevelConfigValue; - chip::Optional mOnTransitionTimeConfigValue; - chip::Optional mOffTransitionTimeConfigValue; - chip::Optional mDefaultMoveRateConfigValue; - chip::Optional mStartUpCurrentLevelConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -56342,25 +54852,22 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nonnull OnOffTransitionTimeValue; - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_1() + CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); + [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); { - OnOffTransitionTimeValue = value; + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -56369,77 +54876,44 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheOnOffTransitionTimeAttributeOnTheDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = mOnOffTransitionTimeConfigValue.HasValue() - ? [NSNumber numberWithUnsignedShort:mOnOffTransitionTimeConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:10U]; - [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"writes the OnOffTransitionTime attribute on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_3() + CHIP_ERROR TestReadsTheCurrentStateAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOffTransitionTime", actualValue, - mOnOffTransitionTimeConfigValue.HasValue() ? mOnOffTransitionTimeConfigValue.Value() : 10U)); + VerifyOrReturn(CheckValue("CurrentState", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintNotValue("onOffTransitionTime", value, OnOffTransitionTimeValue)); - NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable OnLevelValue; - CHIP_ERROR TestReadsTheOnLevelAttributeFromTheDut_4() + CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnLevel attribute from the DUT Error: %@", err); + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], 254U)); - } { - OnLevelValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 0.0f)); } NextTest(); @@ -56448,79 +54922,78 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheOnLevelAttributeOnTheDut_5() + CHIP_ERROR TestSendsAFastForwardCommand_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id onLevelArgument; - onLevelArgument = mOnLevelConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mOnLevelConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:5U]; - [cluster writeAttributeOnLevelWithValue:onLevelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"writes the OnLevel attribute on the DUT Error: %@", err); + [cluster + fastForwardWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a FastForward command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnLevelAttributeFromTheDut_6() + CHIP_ERROR TestVerifyThatTheMediaStateIsPlaying_5() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheCurrentStateAttribute_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnLevel attribute from the DUT Error: %@", err); + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("OnLevel", actualValue)); - VerifyOrReturn( - CheckValue("OnLevel", actualValue, mOnLevelConfigValue.HasValue() ? mOnLevelConfigValue.Value() : 5U)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); + VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintNotValue("onLevel", value, OnLevelValue)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable OnTransitionTimeValue; - CHIP_ERROR TestReadsTheOnTransitionTimeAttributeFromTheDut_7() + CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnTransitionTime attribute from the DUT Error: %@", err); + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("onTransitionTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onTransitionTime", [value unsignedShortValue], 65535U)); - } { - OnTransitionTimeValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 1.0f)); } NextTest(); @@ -56529,80 +55002,79 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheOnTransitionTimeAttributeOnTheDut_8() + CHIP_ERROR TestSendsAFastForwardCommand_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id onTransitionTimeArgument; - onTransitionTimeArgument = mOnTransitionTimeConfigValue.HasValue() - ? [NSNumber numberWithUnsignedShort:mOnTransitionTimeConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:5U]; - [cluster writeAttributeOnTransitionTimeWithValue:onTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the OnTransitionTime attribute on the DUT Error: %@", err); + [cluster + fastForwardWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a FastForward command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnTransitionTimeAttributeFromTheDut_9() + CHIP_ERROR TestVerifyThatTheMediaPlaySpeedHasIncreased_9() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please enter 'y' if media play speed has increased.garbage: not in length on purpose", 51); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnTransitionTime attribute from the DUT Error: %@", err); + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("OnTransitionTime", actualValue)); - VerifyOrReturn(CheckValue("OnTransitionTime", actualValue, - mOnTransitionTimeConfigValue.HasValue() ? mOnTransitionTimeConfigValue.Value() : 5U)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 2.0f)); } - VerifyOrReturn(CheckConstraintNotValue("onTransitionTime", value, OnTransitionTimeValue)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable OffTransitionTimeValue; - CHIP_ERROR TestReadsTheOffTransitionTimeAttributeFromTheDut_10() + CHIP_ERROR TestSendsARewindCommandToTheDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OffTransitionTime attribute from the DUT Error: %@", err); + [cluster rewindWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Rewind command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("offTransitionTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("offTransitionTime", [value unsignedShortValue], 65535U)); - } { - OffTransitionTimeValue = value; + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -56611,80 +55083,66 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheOffTransitionTimeAttributeOnTheDut_11() + CHIP_ERROR TestVerifyThatTheMediaPlayHasReversedDirection_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id offTransitionTimeArgument; - offTransitionTimeArgument = mOffTransitionTimeConfigValue.HasValue() - ? [NSNumber numberWithUnsignedShort:mOffTransitionTimeConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:10U]; - [cluster writeAttributeOffTransitionTimeWithValue:offTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the OffTransitionTime attribute on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please enter 'y' if media play has reversed directiongarbage: not in length on purpose", 53); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsTheOffTransitionTimeAttributeFromTheDut_12() + CHIP_ERROR TestReadsTheCurrentStateAttribute_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OffTransitionTime attribute from the DUT Error: %@", err); + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("OffTransitionTime", actualValue)); - VerifyOrReturn(CheckValue("OffTransitionTime", actualValue, - mOffTransitionTimeConfigValue.HasValue() ? mOffTransitionTimeConfigValue.Value() : 10U)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintNotValue("offTransitionTime", value, OffTransitionTimeValue)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable DefaultMoveRatevalue; - CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_13() + CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_14() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please enter 'y' if PlaybackSpeed value is -1garbage: not in length on purpose", 45); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestSendsARewindCommandToTheDut_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the DefaultMoveRate attribute from the DUT Error: %@", err); + [cluster rewindWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Rewind command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); - } { - DefaultMoveRatevalue = value; + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -56693,80 +55151,43 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheDefaultMoveRateAttributeOnTheDut_14() + CHIP_ERROR TestVerifyThatTheMediaPlaySpeedHasIncreasedInTheReverseDirection_16() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id defaultMoveRateArgument; - defaultMoveRateArgument = mDefaultMoveRateConfigValue.HasValue() - ? [NSNumber numberWithUnsignedChar:mDefaultMoveRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:111U]; - [cluster writeAttributeDefaultMoveRateWithValue:defaultMoveRateArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the DefaultMoveRate attribute on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if media play speed has increased in the reverse directiongarbage: not in length on purpose", 75); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_15() + CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_17() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the DefaultMoveRate attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("DefaultMoveRate", actualValue)); - VerifyOrReturn(CheckValue("DefaultMoveRate", actualValue, - mDefaultMoveRateConfigValue.HasValue() ? mDefaultMoveRateConfigValue.Value() : 111U)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); - } - VerifyOrReturn(CheckConstraintNotValue("defaultMoveRate", value, DefaultMoveRatevalue)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please enter 'y' if PlaybackSpeed value is -2garbage: not in length on purpose", 45); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - NSNumber * _Nullable StartUpCurrentLevelValue; - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_16() + CHIP_ERROR TestSendsAPlayCommand_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); + [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Play command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("startUpCurrentLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("startUpCurrentLevel", [value unsignedCharValue], 255U)); - } { - StartUpCurrentLevelValue = value; + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -56775,52 +55196,33 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheStartUpCurrentLevelAttributeOnTheDut_17() + CHIP_ERROR TestVerifyThatTheMediaIsHasResumedPlayingForwardAtTheDefaultSpeed_19() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id startUpCurrentLevelArgument; - startUpCurrentLevelArgument = mStartUpCurrentLevelConfigValue.HasValue() - ? [NSNumber numberWithUnsignedChar:mStartUpCurrentLevelConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:5U]; - [cluster writeAttributeStartUpCurrentLevelWithValue:startUpCurrentLevelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"writes the StartUpCurrentLevel attribute on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if media is has resumed playing forward at the default speedgarbage: not in length on purpose", 77); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_18() + CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_20() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("StartUpCurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("StartUpCurrentLevel", actualValue, - mStartUpCurrentLevelConfigValue.HasValue() ? mStartUpCurrentLevelConfigValue.Value() : 5U)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); + VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 1.0f)); } - VerifyOrReturn(CheckConstraintNotValue("startUpCurrentLevel", value, StartUpCurrentLevelValue)); NextTest(); }]; @@ -56828,44 +55230,43 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesBackDefaultValueOfOnOffTransitionTimeAttribute_19() + CHIP_ERROR TestSendsConsecutiveFastForwardCommands_21() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"writes back default value of OnOffTransitionTime attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - NextTest(); - }]; + CHIP_ERROR TestSendsConsecutiveRewindCommands_22() + { - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } }; -class Test_TC_LVL_3_1 : public TestCommandBridge { +class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_3_1() - : TestCommandBridge("Test_TC_LVL_3_1") + Test_TC_AUDIOOUTPUT_7_1() + : TestCommandBridge("Test_TC_AUDIOOUTPUT_7_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("Index", 0, UINT8_MAX, &mIndex); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_3_1() {} + ~Test_TC_AUDIOOUTPUT_7_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -56873,11 +55274,11 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_3_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_AUDIOOUTPUT_7_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_3_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_AUDIOOUTPUT_7_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -56894,361 +55295,28 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition Send On Command\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OutputList attribute\n"); + if (ShouldSkip("AUDIOOUTPUT.S.A0000")) { NextTest(); return; } - err = TestPreconditionSendOnCommand_1(); + err = TestReadsTheOutputListAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - if (ShouldSkip("OO.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a SelectAudioOutput command\n"); + if (ShouldSkip("AUDIOOUTPUT.S.C00.Rsp")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + err = TestSendsASelectAudioOutputCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); - if (ShouldSkip("LVL.S.A0010")) { - NextTest(); - return; - } - err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { - NextTest(); - return; - } - err = TestThWrites0ToTheOptionsAttribute_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH writes NULL to the OnLevel attribute\n"); - if (ShouldSkip("LVL.S.A0011")) { - NextTest(); - return; - } - err = TestThWritesNullToTheOnLevelAttribute_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Off command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsOffCommandToDut_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 " - "(immediate)\n"); - if (ShouldSkip("LVL.S.C04.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); - if (ShouldSkip("OO.S.A0000 && LVL.S.C04.Rsp")) { - NextTest(); - return; - } - err = TestThReadsOnOffAttributeOnOffClusterFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends On command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestThSendsOnCommandToDut_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 s). " - "This means the level should increase by 150 units in 30s, so 5 units/s\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10000ms\n"); - err = TestWait10000ms_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10000ms\n"); - err = TestWait10000ms_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 10000ms\n"); - err = TestWait10000ms_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 5000ms\n"); - err = TestWait5000ms_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { - NextTest(); - return; - } - err = TestThWrites0ToTheOptionsAttribute_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { - NextTest(); - return; - } - err = TestThReadsOptionsAttribute_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestThSendsOnCommandToDut_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveToLevelCommandToTheDutWith_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsOffCommandToDut_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveToLevelCommandToTheDutWith_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveToLevelCommandToTheDutWith_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveToLevelCommandToTheDutWith_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : TH writes 1 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { - NextTest(); - return; - } - err = TestThWrites1ToTheOptionsAttribute_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { - NextTest(); - return; - } - err = TestThReadsOptionsAttribute_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestThSendsOnCommandToDut_37(); - break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveToLevelCommandToTheDutWith_38(); - break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_39(); - break; - case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsOffCommandToDut_40(); - break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveToLevelCommandToTheDutWith_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_42(); - break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveToLevelCommandToTheDutWith_43(); - break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_44(); - break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveToLevelCommandToTheDutWith_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentOutput attribute\n"); + if (ShouldSkip("AUDIOOUTPUT.S.A0001 && AUDIOOUTPUT.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_46(); + err = TestReadsTheCurrentOutputAttribute_3(); break; } @@ -57273,135 +55341,6 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -57415,11 +55354,12 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 47; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mIndex; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -57430,196 +55370,209 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionSendOnCommand_1() + CHIP_ERROR TestReadsTheOutputListAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Precondition Send On Command Error: %@", err); + [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OutputList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("outputList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestSendsASelectAudioOutputCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; + params.index = mIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mIndex.Value()] : [NSNumber numberWithUnsignedChar:1U]; + [cluster selectOutputWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Sends a SelectAudioOutput command Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() + CHIP_ERROR TestReadsTheCurrentOutputAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentOutput attribute Error: %@", err); - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentOutput", actualValue, mIndex.HasValue() ? mIndex.Value() : 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestThWritesNullToTheOnLevelAttribute_5() +class Test_TC_AUDIOOUTPUT_7_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_AUDIOOUTPUT_7_2() + : TestCommandBridge("Test_TC_AUDIOOUTPUT_7_2") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id onLevelArgument; - onLevelArgument = nil; - [cluster writeAttributeOnLevelWithValue:onLevelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes NULL to the OnLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("Index", 0, UINT8_MAX, &mIndex); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestThSendsOffCommandToDut_6() + ~Test_TC_AUDIOOUTPUT_7_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_AUDIOOUTPUT_7_2\n"); + } - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends Off command to DUT Error: %@", err); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_AUDIOOUTPUT_7_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + Wait(); - NextTest(); - }]; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the OutputList attribute from the DUT\n"); + if (ShouldSkip("AUDIOOUTPUT.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheOutputListAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, + " ***** Test Step 2 : TH sends a RenameOutput command to the DUT with an index from the list in step 1 and the " + "name 'CertTest'\n"); + if (ShouldSkip("AUDIOOUTPUT.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestThSendsARenameOutputCommandToTheDutWithAnIndexFromTheListInStep1AndTheNameCertTest_2(); + break; + case 3: + ChipLogProgress(chipTool, + " ***** Test Step 3 : TH reads the OutputList attribute from the DUT. Verify that the output at the index provided " + "in step 2 has the name CertTest\n"); + if (ShouldSkip("PICS_USER_PROMPT && AUDIOOUTPUT.S.A0001 && AUDIOOUTPUT.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestThReadsTheOutputListAttributeFromTheDutVerifyThatTheOutputAtTheIndexProvidedInStep2HasTheNameCertTest_3(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_7() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithOnOffWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime " - @"=0 (immediate) Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_8() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 4; - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mIndex; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } + NSArray * _Nonnull audioOutputListValues; - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_9() + CHIP_ERROR TestThReadsTheOutputListAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the OutputList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("outputList", "list", "list")); { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); + audioOutputListValues = value; } NextTest(); @@ -57628,190 +55581,209 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_10() + CHIP_ERROR TestThSendsARenameOutputCommandToTheDutWithAnIndexFromTheListInStep1AndTheNameCertTest_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends On command to DUT Error: %@", err); + __auto_type * params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; + params.index = mIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mIndex.Value()] : [NSNumber numberWithUnsignedChar:1U]; + params.name = @"CertTest"; + [cluster renameOutputWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a RenameOutput command to the DUT with an index from the list in step 1 and the " + @"name 'CertTest' Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_11() + CHIP_ERROR TestThReadsTheOutputListAttributeFromTheDutVerifyThatTheOutputAtTheIndexProvidedInStep2HasTheNameCertTest_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster - moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog( - @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } +}; - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_12() +class Test_TC_TGTNAV_8_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_TGTNAV_8_1() + : TestCommandBridge("Test_TC_TGTNAV_8_1") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("targetvalue", 0, UINT8_MAX, &mTargetvalue); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR - TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_13() + ~Test_TC_TGTNAV_8_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TGTNAV_8_1\n"); + } - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:200U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 " - @"s). This means the level should increase by 150 units in 30s, so 5 units/s Error: %@", - err); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TGTNAV_8_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + Wait(); - NextTest(); - }]; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentTarget attribute\n"); + if (ShouldSkip("TGTNAV.S.A0001")) { + NextTest(); + return; + } + err = TestReadsTheCurrentTargetAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the TargetList attribute\n"); + if (ShouldSkip("TGTNAV.S.A0000")) { + NextTest(); + return; + } + err = TestReadsTheTargetListAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a NavigateTarget command\n"); + if (ShouldSkip("TGTNAV.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestSendsANavigateTargetCommand_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentTarget attribute\n"); + if (ShouldSkip("TGTNAV.S.A0001 && TGTNAV.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestReadsTheCurrentTargetAttribute_4(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestWait10000ms_14() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_15() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); - } - - NextTest(); - }]; +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 5; - return CHIP_NO_ERROR; - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTargetvalue; + chip::Optional mTimeout; - CHIP_ERROR TestWait10000ms_16() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_17() + CHIP_ERROR TestReadsTheCurrentTargetAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentTarget attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 127U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 173U)); - } + VerifyOrReturn(CheckConstraintType("currentTarget", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentTarget", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentTarget", [value unsignedCharValue], 255U)); NextTest(); }]; return CHIP_NO_ERROR; } + NSArray * _Nonnull TargetListValues; - CHIP_ERROR TestWait10000ms_18() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_19() + CHIP_ERROR TestReadsTheTargetListAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the TargetList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 170U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 200U)); + VerifyOrReturn(CheckConstraintType("targetList", "list", "list")); + { + TargetListValues = value; } NextTest(); @@ -57820,54 +55792,44 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_20() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_21() + CHIP_ERROR TestSendsANavigateTargetCommand_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; + params.target = mTargetvalue.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue.Value()] + : [NSNumber numberWithUnsignedChar:1U]; + [cluster navigateTargetWithParams:params + completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Sends a NavigateTarget command Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_22() + CHIP_ERROR TestReadsTheCurrentTargetAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentTarget attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); + VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue.HasValue() ? mTargetvalue.Value() : 1U)); } NextTest(); @@ -57875,224 +55837,254 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_23() +class Test_TC_APBSC_9_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_APBSC_9_1() + : TestCommandBridge("Test_TC_APBSC_9_1") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestThReadsOptionsAttribute_24() + ~Test_TC_APBSC_9_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_APBSC_9_1\n"); + } - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Options attribute Error: %@", err); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APBSC_9_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + Wait(); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Options", actualValue, 0U)); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the VendorName attribute\n"); + if (ShouldSkip("APBSC.S.A0000")) { + NextTest(); + return; } + err = TestReadsTheVendorNameAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the VendorID attribute\n"); + if (ShouldSkip("APBSC.S.A0001")) { + NextTest(); + return; + } + err = TestReadsTheVendorIDAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the ApplicationName attribute\n"); + if (ShouldSkip("APBSC.S.A0002")) { + NextTest(); + return; + } + err = TestReadsTheApplicationNameAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the ProductID attribute\n"); + if (ShouldSkip("APBSC.S.A0003")) { + NextTest(); + return; + } + err = TestReadsTheProductIDAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the Application attribute\n"); + if (ShouldSkip("APBSC.S.A0004")) { + NextTest(); + return; + } + err = TestReadsTheApplicationAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the Status attribute\n"); + if (ShouldSkip("APBSC.S.A0005")) { + NextTest(); + return; + } + err = TestReadsTheStatusAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the ApplicationVersion attribute\n"); + if (ShouldSkip("APBSC.S.A0006")) { + NextTest(); + return; + } + err = TestReadsTheApplicationVersionAttribute_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the AllowedVendorList attribute\n"); + if (ShouldSkip("APBSC.S.A0007")) { + NextTest(); + return; + } + err = TestReadsTheAllowedVendorListAttribute_8(); + break; + } - NextTest(); - }]; - - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestThSendsOnCommandToDut_25() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends On command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_26() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:100U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 9; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_27() + CHIP_ERROR TestReadsTheVendorNameAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the VendorName attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); - } - + VerifyOrReturn(CheckConstraintType("vendorName", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("vendorName", value, 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_28() + CHIP_ERROR TestReadsTheVendorIDAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends Off command to DUT Error: %@", err); + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the VendorID attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("vendorID", "vendor_id", "vendor_id")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_29() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:120U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_30() + CHIP_ERROR TestReadsTheApplicationNameAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ApplicationName attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); - } - + VerifyOrReturn(CheckConstraintType("applicationName", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("applicationName", value, 256)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_31() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:140U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_32() + CHIP_ERROR TestReadsTheProductIDAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ProductID attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); - } + VerifyOrReturn(CheckConstraintType("productID", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("productID", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("productID", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -58100,91 +56092,40 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_33() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:160U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_34() + CHIP_ERROR TestReadsTheApplicationAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeApplicationWithCompletion:^( + MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the Application attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 160U)); - } - + VerifyOrReturn(CheckConstraintType("application", "ApplicationStruct", "ApplicationStruct")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites1ToTheOptionsAttribute_35() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 1 to the Options attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionsAttribute_36() + CHIP_ERROR TestReadsTheStatusAttribute_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Options attribute Error: %@", err); + [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the Status attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Options", actualValue, 1U)); - } + VerifyOrReturn(CheckConstraintMinValue("status", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("status", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -58192,228 +56133,184 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_37() + CHIP_ERROR TestReadsTheApplicationVersionAttribute_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends On command to DUT Error: %@", err); + [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ApplicationVersion attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("applicationVersion", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("applicationVersion", value, 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_38() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:100U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_39() + CHIP_ERROR TestReadsTheAllowedVendorListAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the AllowedVendorList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); - } - + VerifyOrReturn(CheckConstraintType("allowedVendorList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestThSendsOffCommandToDut_40() +class Test_TC_CONTENTLAUNCHER_10_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CONTENTLAUNCHER_10_1() + : TestCommandBridge("Test_TC_CONTENTLAUNCHER_10_1") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends Off command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_41() + ~Test_TC_CONTENTLAUNCHER_10_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CONTENTLAUNCHER_10_1\n"); + } - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:120U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CONTENTLAUNCHER_10_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + Wait(); - NextTest(); - }]; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the AcceptHeader attribute from the DUT\n"); + if (ShouldSkip("CONTENTLAUNCHER.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheAcceptHeaderAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the SupportedStreamingProtocols attribute from the DUT\n"); + if (ShouldSkip("CONTENTLAUNCHER.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_42() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 120U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_43() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:140U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_44() + CHIP_ERROR TestThReadsTheAcceptHeaderAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the AcceptHeader attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 120U)); - } - + VerifyOrReturn(CheckConstraintType("acceptHeader", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_45() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:160U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_46() + CHIP_ERROR TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the SupportedStreamingProtocols attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 160U)); - } - + VerifyOrReturn(CheckConstraintType("supportedStreamingProtocols", "bitmap32", "bitmap32")); NextTest(); }]; @@ -58421,11 +56318,11 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { } }; -class Test_TC_LVL_4_1 : public TestCommandBridge { +class Test_TC_WAKEONLAN_4_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_4_1() - : TestCommandBridge("Test_TC_LVL_4_1") + Test_TC_WAKEONLAN_4_1() + : TestCommandBridge("Test_TC_WAKEONLAN_4_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -58435,7 +56332,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_4_1() {} + ~Test_TC_WAKEONLAN_4_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -58443,11 +56340,11 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_4_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WAKEONLAN_4_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_4_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WAKEONLAN_4_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -58464,187 +56361,208 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition Send On Command\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the MACAddress attribute from the DUT\n"); + if (ShouldSkip("WAKEONLAN.S.A0000")) { NextTest(); return; } - err = TestPreconditionSendOnCommand_1(); + err = TestThReadsTheMACAddressAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - if (ShouldSkip("OO.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends a Sleep command to DUT\n"); + if (ShouldSkip("LOWPOWER.S.C00.Rsp")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + err = TestThSendsASleepCommandToDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); - if (ShouldSkip("LVL.S.A0010")) { - NextTest(); - return; - } - err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : TH sends a Wake-On LAN magic packet containing the MAC address from step 1\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_4(); + err = TestThSendsAWakeOnLanMagicPacketContainingTheMacAddressFromStep1_3(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the MaxLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsTheMaxLevelAttributeFromTheDut_5(); + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp && LVL.S.C05.Rsp")) { - NextTest(); - return; - } - err = TestThSendsOffCommandToDut_6(); + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 (units/s)\n"); - if (ShouldSkip("LVL.S.C05.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveWithOnOffCommandToDutWithMoveMode0x00UpAndRate10UnitsS_7(); + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); - if (ShouldSkip("OO.S.A0000 && LVL.S.C05.Rsp")) { - NextTest(); - return; - } - err = TestThReadsOnOffAttributeOnOffClusterFromDut_8(); + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 5000ms\n"); - err = TestWait5000ms_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_11(); + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 4; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheMACAddressAttributeFromTheDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the MACAddress attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinLength("MACAddress", value, 12)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsASleepCommandToDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster sleepWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends a Sleep command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsAWakeOnLanMagicPacketContainingTheMacAddressFromStep1_3() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; + +class Test_TC_ALOGIN_12_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_ALOGIN_12_1() + : TestCommandBridge("Test_TC_ALOGIN_12_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("TempAccountIdentifier", &mTempAccountIdentifier); + AddArgument("catalogVendorId", 0, UINT16_MAX, &mCatalogVendorId); + AddArgument("applicationId", &mApplicationId); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_ALOGIN_12_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ALOGIN_12_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ALOGIN_12_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Launch an app with the provided a application ID\n"); + if (ShouldSkip("APPLAUNCHER.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_12(); + err = TestLaunchAnAppWithTheProvidedAApplicationId_1(); break; - case 13: + case 2: ChipLogProgress(chipTool, - " ***** Test Step 13 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + " ***** Test Step 2 : TH sends a GetSetupPIN command to the DUT with test values provided by the product maker.\n"); + if (ShouldSkip("ALOGIN.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_14(); + err = TestThSendsAGetSetupPINCommandToTheDutWithTestValuesProvidedByTheProductMaker_2(); break; - case 15: + case 3: ChipLogProgress(chipTool, - " ***** Test Step 15 : TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s)\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveCommandToTheDutWithMoveMode0x00UpAndRate5UnitsS_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10s\n"); - err = TestWait10s_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 10s\n"); - err = TestWait10s_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 10s\n"); - err = TestWait10s_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 19s\n"); - err = TestWait19s_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Precondition send Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + " ***** Test Step 3 : TH sends a Login command to the DUT with test values provided by the product maker.\n"); + if (ShouldSkip("ALOGIN.S.C02.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_24(); + err = TestThSendsALoginCommandToTheDutWithTestValuesProvidedByTheProductMaker_3(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("OO.S.A0000")) { + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH sends a Logout command to the DUT with test values provided by the product maker.\n"); + if (ShouldSkip("ALOGIN.S.C03.Rsp")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_25(); + err = TestThSendsALogoutCommandToTheDutWithTestValuesProvidedByTheProductMaker_4(); break; } @@ -58672,69 +56590,6 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -58748,11 +56603,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 26; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTempAccountIdentifier; + chip::Optional mCatalogVendorId; + chip::Optional mApplicationId; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -58763,123 +56621,114 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionSendOnCommand_1() + CHIP_ERROR TestLaunchAnAppWithTheProvidedAApplicationId_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(3) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Precondition Send On Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + __auto_type * params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; + params.application = [[MTRApplicationLauncherClusterApplicationStruct alloc] init]; + ((MTRApplicationLauncherClusterApplicationStruct *) params.application).catalogVendorID = mCatalogVendorId.HasValue() + ? [NSNumber numberWithUnsignedShort:mCatalogVendorId.Value()] + : [NSNumber numberWithUnsignedShort:123U]; + ((MTRApplicationLauncherClusterApplicationStruct *) params.application).applicationID = mApplicationId.HasValue() + ? [[NSString alloc] initWithBytes:mApplicationId.Value().data() + length:mApplicationId.Value().size() + encoding:NSUTF8StringEncoding] + : @"exampleid"; - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; + [cluster + launchAppWithParams:params + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Launch an app with the provided a application ID Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSString * _Nonnull setupPIN; - CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() + CHIP_ERROR TestThSendsAGetSetupPINCommandToTheDutWithTestValuesProvidedByTheProductMaker_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + __auto_type * params = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; + params.tempAccountIdentifier = mTempAccountIdentifier.HasValue() + ? [[NSString alloc] initWithBytes:mTempAccountIdentifier.Value().data() + length:mTempAccountIdentifier.Value().size() + encoding:NSUTF8StringEncoding] + : @"1111"; [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + getSetupPINWithParams:params + completion:^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends a GetSetupPIN command to the DUT with test values provided by the product maker. " + @"Error: %@", + err); - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + setupPIN = values.setupPIN; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheMaxLevelAttributeFromTheDut_5() + CHIP_ERROR TestThSendsALoginCommandToTheDutWithTestValuesProvidedByTheProductMaker_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the MaxLevel attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRAccountLoginClusterLoginParams alloc] init]; + params.tempAccountIdentifier = mTempAccountIdentifier.HasValue() + ? [[NSString alloc] initWithBytes:mTempAccountIdentifier.Value().data() + length:mTempAccountIdentifier.Value().size() + encoding:NSUTF8StringEncoding] + : @"1111"; + params.setupPIN = [setupPIN copy]; + [cluster + loginWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a Login command to the DUT with test values provided by the product maker. Error: %@", err); - VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_6() + CHIP_ERROR TestThSendsALogoutCommandToTheDutWithTestValuesProvidedByTheProductMaker_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends Off command to DUT Error: %@", err); + [cluster logoutWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends a Logout command to the DUT with test values provided by the product maker. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58888,265 +56737,268 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestThSendsAMoveWithOnOffCommandToDutWithMoveMode0x00UpAndRate10UnitsS_7() +class Test_TC_MOD_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_MOD_1_1() + : TestCommandBridge("Test_TC_MOD_1_1") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveWithOnOffWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 (units/s) " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nullable CurrentLevelValue; + ~Test_TC_MOD_1_1() {} - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_9() + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_1_1\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - if (value != nil) { + Wait(); - VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); + err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); + if (ShouldSkip("MOD.S.F00")) { + NextTest(); + return; } - { - CurrentLevelValue = value; + err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the FeatureMap attribute from the DUT\n"); + if (ShouldSkip(" !MOD.S.F00 ")) { + NextTest(); + return; } - + err = TestThReadsTheFeatureMapAttributeFromTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the AttributeList attribute from the DUT\n"); + err = TestThReadsTheAttributeListAttributeFromTheDut_4(); + break; + case 5: + ChipLogProgress( + chipTool, " ***** Test Step 5 : TH reads the optional attribute(StartUpMode) in AttributeList from the DUT\n"); + if (ShouldSkip("MOD.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_5(); + break; + case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : TH reads the optional attribute(OnMode) in AttributeList from the DUT\n"); + if (ShouldSkip("MOD.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsTheOptionalAttributeOnModeInAttributeListFromTheDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: EventList\n"); NextTest(); - }]; + return; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_9(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestWait5000ms_10() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_11() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 10; - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 254U)); - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThSendsOnCommandToDut_12() + CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends On command to DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster - moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog( - @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_14() + CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveCommandToTheDutWithMoveMode0x00UpAndRate5UnitsS_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait10s_16() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_17() + CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10s_18() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_19() + CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the AttributeList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 127U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 173U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -59154,31 +57006,20 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10s_20() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_21() + CHIP_ERROR TestThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the optional attribute(StartUpMode) in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 170U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 230U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); NextTest(); }]; @@ -59186,31 +57027,20 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait19s_22() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 19000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_23() + CHIP_ERROR TestThReadsTheOptionalAttributeOnModeInAttributeListFromTheDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the optional attribute(OnMode) in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 254U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); NextTest(); }]; @@ -59218,41 +57048,45 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_24() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Precondition send Off Command Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_25() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -59260,21 +57094,29 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } }; -class Test_TC_LVL_5_1 : public TestCommandBridge { +class OTA_SuccessfulTransfer : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_5_1() - : TestCommandBridge("Test_TC_LVL_5_1") + OTA_SuccessfulTransfer() + : TestCommandBridge("OTA_SuccessfulTransfer") , mTestIndex(0) { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("requestorNodeId", 0, UINT64_MAX, &mRequestorNodeId); + AddArgument("providerNodeId", 0, UINT64_MAX, &mProviderNodeId); + AddArgument("providerPayload", &mProviderPayload); + AddArgument("providerDiscriminator", 0, UINT16_MAX, &mProviderDiscriminator); + AddArgument("providerPort", 0, UINT16_MAX, &mProviderPort); + AddArgument("providerKvs", &mProviderKvs); + AddArgument("otaImageFilePath", &mOtaImageFilePath); + AddArgument("rawImageFilePath", &mRawImageFilePath); + AddArgument("rawImageContent", &mRawImageContent); + AddArgument("downloadImageFilePath", &mDownloadImageFilePath); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_5_1() {} + ~OTA_SuccessfulTransfer() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -59282,11 +57124,11 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_5_1\n"); + ChipLogProgress(chipTool, " **** Test Start: OTA_SuccessfulTransfer\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_5_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: OTA_SuccessfulTransfer\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -59299,197 +57141,71 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Create OTA image\n"); + err = TestCreateOtaImage_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition Send On Command\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestPreconditionSendOnCommand_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Start the provider with an image\n"); + err = TestStartTheProviderWithAnImage_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - if (ShouldSkip("OO.S.A0000")) { - NextTest(); - return; - } - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Commission the provider from alpha\n"); + err = TestCommissionTheProviderFromAlpha_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); - if (ShouldSkip("LVL.S.A0010")) { - NextTest(); - return; - } - err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait for the commissioned provider to be retrieved for alpha\n"); + err = TestWaitForTheCommissionedProviderToBeRetrievedForAlpha_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { - NextTest(); - return; - } - err = TestThWrites0ToTheOptionsAttribute_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Install ACL for QueryImage\n"); + err = TestInstallAclForQueryImage_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp && LVL.S.C06.Rsp")) { - NextTest(); - return; - } - err = TestThSendsOffCommandToDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Stop the requestor\n"); + err = TestStopTheRequestor_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 and " - "TransitionTime =0 (immediate)\n"); - if (ShouldSkip("LVL.S.C06.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAStepWithOnOffCommandToDutWithStepMode0x00UpStepSize50AndTransitionTime0Immediate_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Start the requestor with an OTA download path\n"); + err = TestStartTheRequestorWithAnOtaDownloadPath_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); - if (ShouldSkip("OO.S.A0000 && LVL.S.C06.Rsp")) { - NextTest(); - return; - } - err = TestThReadsOnOffAttributeOnOffClusterFromDut_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait for the commissioned requestor to be retrieved for alpha\n"); + err = TestWaitForTheCommissionedRequestorToBeRetrievedForAlpha_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestThSendsOnCommandToDut_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Send an announce OTA provider command to the requestor\n"); + err = TestSendAnAnnounceOtaProviderCommandToTheRequestor_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait for transfer complete message\n"); + err = TestWaitForTransferCompleteMessage_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads current level attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestReadsCurrentLevelAttributeFromDut_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Compare original file to downloaded file\n"); + err = TestCompareOriginalFileToDownloadedFile_10(); break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and " - "TransitionTime =300\n"); - if (ShouldSkip("LVL.S.C02.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAStepCommandToTheDutWithStepMode0x00UpStepSize150AndTransitionTime300_11(); + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10s\n"); - err = TestWait10s_12(); + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_13(); + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10s\n"); - err = TestWait10s_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10s\n"); - err = TestWait10s_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 5000ms\n"); - err = TestWait5000ms_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : TH reads CurrentLevel attribute from DUT (after DUT has finished the transition)\n"); - if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDutAfterDutHasFinishedTheTransition_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Precondition send Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestPreconditionSendOffCommand_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("OO.S.A0000")) { - NextTest(); - return; - } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -59512,42 +57228,6 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -59561,416 +57241,390 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 23; + const uint16_t mTestCount = 11; - chip::Optional mNodeId; - chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRequestorNodeId; + chip::Optional mProviderNodeId; + chip::Optional mProviderPayload; + chip::Optional mProviderDiscriminator; + chip::Optional mProviderPort; + chip::Optional mProviderKvs; + chip::Optional mOtaImageFilePath; + chip::Optional mRawImageFilePath; + chip::Optional mRawImageContent; + chip::Optional mDownloadImageFilePath; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestCreateOtaImage_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + chip::app::Clusters::SystemCommands::Commands::CreateOtaImage::Type value; + value.otaImageFilePath + = mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); + value.rawImageFilePath + = mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); + value.rawImageContent + = mRawImageContent.HasValue() ? mRawImageContent.Value() : chip::Span("Have a hootenanny!", 18); + return CreateOtaImage("alpha", value); } - CHIP_ERROR TestPreconditionSendOnCommand_1() + CHIP_ERROR TestStartTheProviderWithAnImage_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Precondition Send On Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("chip-ota-provider-appgarbage: not in length on purpose", 21); + value.discriminator.Emplace(); + value.discriminator.Value() = mProviderDiscriminator.HasValue() ? mProviderDiscriminator.Value() : 50U; + value.port.Emplace(); + value.port.Value() = mProviderPort.HasValue() ? mProviderPort.Value() : 5560U; + value.kvs.Emplace(); + value.kvs.Value() = mProviderKvs.HasValue() ? mProviderKvs.Value() : chip::Span("/tmp/chip_kvs_provider", 22); + value.filepath.Emplace(); + value.filepath.Value() + = mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); + return Start("alpha", value); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestCommissionTheProviderFromAlpha_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; + value.payload + = mProviderPayload.HasValue() ? mProviderPayload.Value() : chip::Span("MT:-24J0IX4122-.548G00", 22); + return PairWithCode("alpha", value); } - CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() + CHIP_ERROR TestWaitForTheCommissionedProviderToBeRetrievedForAlpha_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_4() + CHIP_ERROR TestInstallAclForQueryImage_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - CHIP_ERROR TestThSendsOffCommandToDut_5() - { + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = nil; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [[MTRAccessControlClusterAccessControlTargetStruct alloc] init]; + ((MTRAccessControlClusterAccessControlTargetStruct *) temp_3[0]).cluster = [NSNumber numberWithUnsignedInt:41UL]; + ((MTRAccessControlClusterAccessControlTargetStruct *) temp_3[0]).endpoint = nil; + ((MTRAccessControlClusterAccessControlTargetStruct *) temp_3[0]).deviceType = nil; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = temp_3; + } + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends Off command to DUT Error: %@", err); + aclArgument = temp_0; + } + [cluster writeAttributeACLWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Install ACL for QueryImage Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAStepWithOnOffCommandToDutWithStepMode0x00UpStepSize50AndTransitionTime0Immediate_6() + CHIP_ERROR TestStopTheRequestor_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:0U]; - params.stepSize = [NSNumber numberWithUnsignedChar:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepWithOnOffWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 and " - @"TransitionTime =0 (immediate) Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop("alpha", value); } - CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_7() + CHIP_ERROR TestStartTheRequestorWithAnOtaDownloadPath_6() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.otaDownloadPath.Emplace(); + value.otaDownloadPath.Value() = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() + : chip::Span("/tmp/downloadedImage", 20); + return Start("alpha", value); } - CHIP_ERROR TestThSendsOnCommandToDut_8() + CHIP_ERROR TestWaitForTheCommissionedRequestorToBeRetrievedForAlpha_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends On command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mRequestorNodeId.HasValue() ? mRequestorNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9() + CHIP_ERROR TestSendAnAnnounceOtaProviderCommandToTheRequestor_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster - moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog( - @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", - err); + __auto_type * params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; + params.providerNodeID = mProviderNodeId.HasValue() ? [NSNumber numberWithUnsignedLongLong:mProviderNodeId.Value()] + : [NSNumber numberWithUnsignedLongLong:12648430ULL]; + params.vendorID = [NSNumber numberWithUnsignedShort:0U]; + params.announcementReason = [NSNumber numberWithUnsignedChar:0U]; + params.endpoint + = mEndpoint.HasValue() ? [NSNumber numberWithUnsignedShort:mEndpoint.Value()] : [NSNumber numberWithUnsignedShort:0U]; + [cluster announceOTAProviderWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Send an announce OTA provider command to the requestor Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestWaitForTransferCompleteMessage_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads current level attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMessage::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); + value.message = chip::Span("OTA image downloadedgarbage: not in length on purpose", 20); + return WaitForMessage("alpha", value); } - CHIP_ERROR TestThSendsAStepCommandToTheDutWithStepMode0x00UpStepSize150AndTransitionTime300_11() + CHIP_ERROR TestCompareOriginalFileToDownloadedFile_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterStepParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:0U]; - params.stepSize = [NSNumber numberWithUnsignedChar:150U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and TransitionTime " - @"=300 Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::SystemCommands::Commands::CompareFiles::Type value; + value.file1 = mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); + value.file2 = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() + : chip::Span("/tmp/downloadedImage", 20); + return CompareFiles("alpha", value); } +}; - CHIP_ERROR TestWait10s_12() +class Test_TC_OCC_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_OCC_1_1() + : TestCommandBridge("Test_TC_OCC_1_1") + , mTestIndex(0) { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + ~Test_TC_OCC_1_1() {} - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_1_1\n"); + } - if (value != nil) { + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); - } + Wait(); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: EventList\n"); NextTest(); - }]; + return; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestWait10s_14() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_15() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 127U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 173U)); - } - - NextTest(); - }]; +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 7; - return CHIP_NO_ERROR; - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - CHIP_ERROR TestWait10s_16() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_17() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 170U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 200U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_18() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_19() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDutAfterDutHasFinishedTheTransition_20() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT (after DUT has finished the transition) Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -59978,41 +57632,48 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_21() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Precondition send Off Command Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -60020,11 +57681,11 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { } }; -class Test_TC_LVL_6_1 : public TestCommandBridge { +class Test_TC_OCC_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_6_1() - : TestCommandBridge("Test_TC_LVL_6_1") + Test_TC_OCC_2_1() + : TestCommandBridge("Test_TC_OCC_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -60034,7 +57695,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_6_1() {} + ~Test_TC_OCC_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -60042,11 +57703,11 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_6_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_6_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -60063,137 +57724,104 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: write default value of OnOffTransitionTime attribute\n"); - if (ShouldSkip("LVL.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attribute constrains: Occupancy\n"); + if (ShouldSkip("OCC.S.A0000")) { NextTest(); return; } - err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1(); + err = TestReadsMandatoryAttributeConstrainsOccupancy_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads mandatory attribute constrains: OccupancySensorType\n"); + if (ShouldSkip("OCC.S.A0001")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_2(); + err = TestReadsMandatoryAttributeConstrainsOccupancySensorType_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads mandatory attribute constrains: OccupancySensorTypeBitmap\n"); + if (ShouldSkip("OCC.S.A0002")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_3(); + err = TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads optional attribute: PIROccupiedToUnoccupiedDelay\n"); + if (ShouldSkip("OCC.S.A0010")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_4(); + err = TestReadsOptionalAttributePIROccupiedToUnoccupiedDelay_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay\n"); + if (ShouldSkip("OCC.S.A0011")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_5(); + err = TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedDelay_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the " - "Rate field set to 0x05 (5 units/s)\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 6 : Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold\n"); + if (ShouldSkip("OCC.S.A0012")) { NextTest(); return; } - err = TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_6(); + err = TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedThreshold_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 5000ms\n"); - err = TestWait5000ms_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay\n"); + if (ShouldSkip("OCC.S.A0020")) { + NextTest(); + return; + } + err = TestReadOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends stop command to DUT\n"); - if (ShouldSkip("LVL.S.C03.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute: UltrasonicUnoccupiedToOccupiedDelay\n"); + if (ShouldSkip("OCC.S.A0021")) { NextTest(); return; } - err = TestSendsStopCommandToDut_8(); + err = TestReadAttributeUltrasonicUnoccupiedToOccupiedDelay_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Physically verify that the device has stopped transitioning\n"); - if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Read attribute: UltrasonicUnoccupiedToOccupiedThreshold\n"); + if (ShouldSkip("OCC.S.A0022")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9(); + err = TestReadAttributeUltrasonicUnoccupiedToOccupiedThreshold_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000")) { + ChipLogProgress( + chipTool, " ***** Test Step 10 : Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay\n"); + if (ShouldSkip("OCC.S.A0030")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_10(); + err = TestReadsOptionalAttributeConstrainsPhysicalContactOccupiedToUnoccupiedDelay_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the " - "Rate field set to 0x05 (5 units/s)\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay\n"); + if (ShouldSkip("OCC.S.A0031")) { NextTest(); return; } - err = TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_11(); + err = TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedDelay_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 5000ms\n"); - err = TestWait5000ms_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends a StopWithOnOff command to the DUT\n"); - if (ShouldSkip("LVL.S.C07.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAStopWithOnOffCommandToTheDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Physically verify that the device has stopped transitioning\n"); - if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C07.Rsp")) { - NextTest(); - return; - } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestReadsCurrentLevelAttributeFromDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Precondition send Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestPreconditionSendOffCommand_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("OO.S.A0000")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold\n"); + if (ShouldSkip("OCC.S.A0032")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17(); + err = TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedThreshold_12(); break; } @@ -60245,21 +57873,6 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -60273,7 +57886,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; @@ -60288,113 +57901,109 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1() + CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancy_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); + [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: Occupancy Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("occupancy", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("occupancy", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancy", [value unsignedCharValue], 1U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_2() + CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorType_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: OccupancySensorType Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("occupancySensorType", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_3() + CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends On command to DUT Error: %@", err); + [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: OccupancySensorTypeBitmap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 7U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_4() + CHIP_ERROR TestReadsOptionalAttributePIROccupiedToUnoccupiedDelay_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster - moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog( - @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", - err); + [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute: PIROccupiedToUnoccupiedDelay Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("PIROccupiedToUnoccupiedDelay", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("PIROccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PIROccupiedToUnoccupiedDelay", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_5() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedDelay_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); - } + VerifyOrReturn(CheckConstraintType("PIRUnoccupiedToOccupiedDelay", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("PIRUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PIRUnoccupiedToOccupiedDelay", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -60402,89 +58011,97 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_6() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedThreshold_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the Rate " - @"field set to 0x05 (5 units/s) Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - return CHIP_NO_ERROR; - } + VerifyOrReturn(CheckConstraintType("PIRUnoccupiedToOccupiedThreshold", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("PIRUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("PIRUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); - CHIP_ERROR TestWait5000ms_7() - { + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsStopCommandToDut_8() + CHIP_ERROR TestReadOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterStopParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stopWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends stop command to DUT Error: %@", err); + [cluster + readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("ultrasonicOccupiedToUnoccupiedDelay", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("ultrasonicOccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("ultrasonicOccupiedToUnoccupiedDelay", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9() + CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedDelay_8() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedDelay Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedDelay", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("ultrasonicUnoccupiedToOccupiedDelay", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedThreshold_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedThreshold Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 64U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 86U)); - } + VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedThreshold", "int8u", "int8u")); + VerifyOrReturn( + CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -60492,130 +58109,225 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_11() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactOccupiedToUnoccupiedDelay_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the Rate " - @"field set to 0x05 (5 units/s) Error: %@", - err); + [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("physicalContactOccupiedToUnoccupiedDelay", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("physicalContactOccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("physicalContactOccupiedToUnoccupiedDelay", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_12() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedDelay_11() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedDelay", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("physicalContactUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("physicalContactUnoccupiedToOccupiedDelay", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAStopWithOnOffCommandToTheDut_13() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedThreshold_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stopWithOnOffWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a StopWithOnOff command to the DUT Error: %@", err); + [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedThreshold", "int8u", "int8u")); + VerifyOrReturn( + CheckConstraintMinValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14() +class Test_TC_OCC_2_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_OCC_2_3() + : TestCommandBridge("Test_TC_OCC_2_3") + , mTestIndex(0) { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_15() - { + ~Test_TC_OCC_2_3() {} - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_3\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - if (value != nil) { + Wait(); - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attribute constrains: OccupancySensorType\n"); + if (ShouldSkip("OCC.S.A0001")) { + NextTest(); + return; + } + err = TestReadsMandatoryAttributeConstrainsOccupancySensorType_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads mandatory attribute constrains: OccupancySensorTypeBitmap\n"); + if (ShouldSkip("OCC.S.A0002")) { + NextTest(); + return; } + err = TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_2(); + break; + } - NextTest(); - }]; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } - return CHIP_NO_ERROR; + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestPreconditionSendOffCommand_16() + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorType_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Precondition send Off Command Error: %@", err); + [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: OccupancySensorType Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("occupancySensorType", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17() + CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: OccupancySensorTypeBitmap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } + VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 7U)); NextTest(); }]; @@ -60624,23 +58336,21 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { } }; -class Test_TC_LVL_7_1 : public TestCommandBridge { +class Test_TC_OO_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_7_1() - : TestCommandBridge("Test_TC_LVL_7_1") + Test_TC_OO_1_1() + : TestCommandBridge("Test_TC_OO_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("RandomLevelValue", 0, UINT8_MAX, &mRandomLevelValue); - AddArgument("RandomFrequencyValue", 0, UINT16_MAX, &mRandomFrequencyValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_7_1() {} + ~Test_TC_OO_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -60648,11 +58358,11 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_7_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_7_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -60669,160 +58379,63 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: write default value of OnOffTransitionTime attribute\n"); - if (ShouldSkip("LVL.S.A0010")) { - NextTest(); - return; - } - err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 0a: TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip(" !OO.S.F00 ")) { NextTest(); return; } - err = TestStep0aThWrites0ToTheOptionsAttribute_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 0b: TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Given OO.S.F00(LT) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("OO.S.F00")) { NextTest(); return; } - err = TestStep0bThSendsOnCommandToDut_3(); + err = TestGivenOosf00ltEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 1a: TH reads the MinLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0002")) { - NextTest(); - return; - } - err = TestStep1aThReadsTheMinLevelAttributeFromTheDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 1b: TH reads the MaxLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the feature dependent(OO.S.F00) attribute in AttributeList\n"); + if (ShouldSkip("OO.S.F00")) { NextTest(); return; } - err = TestStep1bThReadsTheMaxLevelAttributeFromTheDut_5(); + err = TestReadTheFeatureDependentOOSF00AttributeInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 1c: TH sends a MoveToLevel command to DUT, with the Level field set to a value between " - "the MinLevel and MaxLevel values (if present, otherwise between 0x01 and 0xFE) and the TransitionTime field set " - "to 0x0000 (move immediately).\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestStep1cThSendsAMoveToLevelCommandToDutWithTheLevelFieldSetToAValueBetweenTheMinLevelAndMaxLevelValuesIfPresentOtherwiseBetween0x01And0xFEAndTheTransitionTimeFieldSetTo0x0000MoveImmediately_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 100ms\n"); - err = TestWait100ms_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 1d: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestStep1dThReadsCurrentLevelAttributeFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 2a: TH reads the CurrentFrequency attribute.\n"); - if (ShouldSkip("LVL.S.A0004")) { - NextTest(); - return; - } - err = TestStep2aThReadsTheCurrentFrequencyAttribute_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 2b: TH reads the MinFrequency attribute.\n"); - if (ShouldSkip("LVL.S.A0005")) { - NextTest(); - return; - } - err = TestStep2bThReadsTheMinFrequencyAttribute_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 2c: TH reads the MaxFrequency attribute and check, if fmax < fmin, FAIL the test.\n"); - if (ShouldSkip("LVL.S.A0006")) { - NextTest(); - return; - } - err = TestStep2cThReadsTheMaxFrequencyAttributeAndCheckIfFmaxFminFailTheTest_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 2d: sanity check on values read in steps 2a..2c, if fc < fmin, FAIL the test and fc > " - "fmax, FAIL the test\n"); - if (ShouldSkip("LVL.S.A0004")) { - NextTest(); - return; - } - err = TestStep2dSanityCheckOnValuesReadInSteps2a2cIfFcFminFailTheTestAndFcFmaxFailTheTest_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to " - "a random value frand, chosen such that: fmin < frand < fmax\n"); - if (ShouldSkip("LVL.S.C08.Rsp")) { - NextTest(); - return; - } - err = TestStep3aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToARandomValueFrandChosenSuchThatFminFrandFmax_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 100ms\n"); - err = TestWait100ms_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 3b: TH reads the CurrentFrequency attribute.\n"); - if (ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004")) { - NextTest(); - return; - } - err = TestStep3bThReadsTheCurrentFrequencyAttribute_15(); - break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to " - "fmax + 1\n"); - if (ShouldSkip("LVL.S.C08.Rsp && PICS_USER_PROMPT")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Read the feature dependent(OO.S.F00) commands in AcceptedCommandList\n"); + if (ShouldSkip("OO.S.F00")) { NextTest(); return; } - err = TestStep4aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmax1_16(); + err = TestReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_7(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: TH reads the CurrentFrequency attribute.\n"); - if (ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004 && PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestStep4bThReadsTheCurrentFrequencyAttribute_17(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_8(); break; - case 18: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 5a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to " - "fmin - 1\n"); - if (ShouldSkip("LVL.S.C08.Rsp && PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestStep5aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmin1_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 5b: TH reads the CurrentFrequency attribute.\n"); - if (ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004 && PICS_USER_PROMPT")) { + " ***** Test Step 9 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " + "contain manufacturer specific event IDs.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep5bThReadsTheCurrentFrequencyAttribute_19(); + err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_9(); break; } @@ -60865,36 +58478,6 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -60908,13 +58491,11 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mRandomLevelValue; - chip::Optional mRandomFrequencyValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -60925,254 +58506,117 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep0aThWrites0ToTheOptionsAttribute_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 0a: TH writes 0 to the Options attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep0bThSendsOnCommandToDut_3() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Step 0b: TH sends On command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull minLevelValue; - - CHIP_ERROR TestStep1aThReadsTheMinLevelAttributeFromTheDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1a: TH reads the MinLevel attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 254U)); - { - minLevelValue = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull maxLevelValue; - - CHIP_ERROR TestStep1bThReadsTheMaxLevelAttributeFromTheDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1b: TH reads the MaxLevel attribute from the DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); { - maxLevelValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep1cThSendsAMoveToLevelCommandToDutWithTheLevelFieldSetToAValueBetweenTheMinLevelAndMaxLevelValuesIfPresentOtherwiseBetween0x01And0xFEAndTheTransitionTimeFieldSetTo0x0000MoveImmediately_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = mRandomLevelValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRandomLevelValue.Value()] - : [NSNumber numberWithUnsignedChar:100U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 1c: TH sends a MoveToLevel command to DUT, with the Level field set to a value " - @"between the MinLevel and MaxLevel values (if present, otherwise between 0x01 and 0xFE) and " - @"the TransitionTime field set to 0x0000 (move immediately). Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait100ms_7() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestStep1dThReadsCurrentLevelAttributeFromDut_8() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1d: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn( - CheckValue("CurrentLevel", actualValue, mRandomLevelValue.HasValue() ? mRandomLevelValue.Value() : 100U)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull CurrentFrequencyValue; - CHIP_ERROR TestStep2aThReadsTheCurrentFrequencyAttribute_9() + CHIP_ERROR TestGivenOosf00ltEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2a: TH reads the CurrentFrequency attribute. Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given OO.S.F00(LT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], 65535U)); - { - CurrentFrequencyValue = value; - } - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull MinFrequencyValue; - CHIP_ERROR TestStep2bThReadsTheMinFrequencyAttribute_10() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2b: TH reads the MinFrequency attribute. Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("minFrequency", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minFrequency", [value unsignedShortValue], 65535U)); - { - MinFrequencyValue = value; - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull MaxFrequencyValue; - CHIP_ERROR TestStep2cThReadsTheMaxFrequencyAttributeAndCheckIfFmaxFminFailTheTest_11() + CHIP_ERROR TestReadTheFeatureDependentOOSF00AttributeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2c: TH reads the MaxFrequency attribute and check, if fmax < fmin, FAIL the test. Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the feature dependent(OO.S.F00) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("maxFrequency", [value unsignedShortValue], MinFrequencyValue)); - VerifyOrReturn(CheckConstraintMaxValue("maxFrequency", [value unsignedShortValue], 65535U)); - { - MaxFrequencyValue = value; - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16385UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16386UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16387UL)); NextTest(); }]; @@ -61180,23 +58624,22 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2dSanityCheckOnValuesReadInSteps2a2cIfFcFminFailTheTestAndFcFmaxFailTheTest_12() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2d: sanity check on values read in steps 2a..2c, if fc < fmin, FAIL the test and fc > fmax, FAIL the test " - @"Error: %@", - err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], MinFrequencyValue)); - VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], MaxFrequencyValue)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); NextTest(); }]; @@ -61204,57 +58647,22 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep3aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToARandomValueFrandChosenSuchThatFminFrandFmax_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; - params.frequency = mRandomFrequencyValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRandomFrequencyValue.Value()] - : [NSNumber numberWithUnsignedShort:30000U]; - [cluster - moveToClosestFrequencyWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 3a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field " - @"set to a random value frand, chosen such that: fmin < frand < fmax Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait100ms_14() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestStep3bThReadsTheCurrentFrequencyAttribute_15() + CHIP_ERROR TestReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3b: TH reads the CurrentFrequency attribute. Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the feature dependent(OO.S.F00) commands in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue( - "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); - } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 64UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 65UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 66UL)); NextTest(); }]; @@ -61262,41 +58670,32 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmax1_16() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep4bThReadsTheCurrentFrequencyAttribute_17() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b: TH reads the CurrentFrequency attribute. Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue( - "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmin1_18() + CHIP_ERROR + TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_9() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -61305,37 +58704,13 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - - CHIP_ERROR TestStep5bThReadsTheCurrentFrequencyAttribute_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5b: TH reads the CurrentFrequency attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue( - "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } }; -class Test_TC_LCFG_1_1 : public TestCommandBridge { +class Test_TC_OO_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LCFG_1_1() - : TestCommandBridge("Test_TC_LCFG_1_1") + Test_TC_OO_2_1() + : TestCommandBridge("Test_TC_OO_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -61345,7 +58720,7 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LCFG_1_1() {} + ~Test_TC_OO_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -61353,11 +58728,11 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LCFG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LCFG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -61374,28 +58749,44 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); - err = TestThReadsTheClusterRevisionFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: OnOff\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeOnOff_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - err = TestThReadsTheFeatureMapFromDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read LT attribute: GlobalSceneControl\n"); + if (ShouldSkip("OO.S.A4000")) { + NextTest(); + return; + } + err = TestReadLtAttributeGlobalSceneControl_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); - err = TestThReadsAttributeListFromDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read LT attribute: OnTime\n"); + if (ShouldSkip("OO.S.A4001")) { + NextTest(); + return; + } + err = TestReadLtAttributeOnTime_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read LT attribute: OffWaitTime\n"); + if (ShouldSkip("OO.S.A4002")) { + NextTest(); + return; + } + err = TestReadLtAttributeOffWaitTime_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads AcceptedCommandList from DUT\n"); - err = TestThReadsAcceptedCommandListFromDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads GeneratedCommandList from DUT\n"); - err = TestThReadsGeneratedCommandListFromDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read LT attribute: StartUpOnOff\n"); + if (ShouldSkip("OO.S.A4003")) { + NextTest(); + return; + } + err = TestReadLtAttributeStartUpOnOff_5(); break; } @@ -61426,9 +58817,6 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -61442,7 +58830,7 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -61457,81 +58845,59 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestReadTheMandatoryAttributeOnOff_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintType("onOff", "boolean", "boolean")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestReadLtAttributeGlobalSceneControl_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + [cluster readAttributeGlobalSceneControlWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read LT attribute: GlobalSceneControl Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("globalSceneControl", "boolean", "boolean")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAttributeListFromDut_3() + CHIP_ERROR TestReadLtAttributeOnTime_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AttributeList from DUT Error: %@", err); + [cluster readAttributeOnTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read LT attribute: OnTime Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintType("onTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("onTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("onTime", [value unsignedShortValue], 65535U)); NextTest(); }]; @@ -61539,78 +58905,45 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_4() + CHIP_ERROR TestReadLtAttributeOffWaitTime_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeOffWaitTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read LT attribute: OffWaitTime Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintType("offWaitTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("offWaitTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("offWaitTime", [value unsignedShortValue], 65535U)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_5() + CHIP_ERROR TestReadLtAttributeStartUpOnOff_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + [cluster readAttributeStartUpOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read LT attribute: StartUpOnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsGeneratedCommandListFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckConstraintType("startUpOnOff", "enum8", "enum8")); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -61618,11 +58951,11 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { } }; -class Test_TC_LUNIT_1_2 : public TestCommandBridge { +class Test_TC_OO_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LUNIT_1_2() - : TestCommandBridge("Test_TC_LUNIT_1_2") + Test_TC_OO_2_2() + : TestCommandBridge("Test_TC_OO_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -61632,7 +58965,7 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LUNIT_1_2() {} + ~Test_TC_OO_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -61640,11 +58973,11 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LUNIT_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -61661,97 +58994,201 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("LUNIT.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Send Off Command\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsTheClusterRevisionFromDut_1(); + err = TestSendOffCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("LUNIT.S.Afffc && !LUNIT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is false after off command\n"); + if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestThReadsTheFeatureMapFromDut_2(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("LUNIT.S.Afffc && LUNIT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Send On Command\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestGivenLunitsf00tempEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestSendOnCommand_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AttributeList from DUT\n"); - if (ShouldSkip("LUNIT.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Check on/off attribute value is true after on command\n"); + if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestThReadsAttributeListFromDut_4(); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList\n"); - if (ShouldSkip("LUNIT.S.Afffb && LUNIT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Send On Command\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsFeatureDependentLUNITSF00AttributeInAttributeList_5(); + err = TestSendOnCommand_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads EventList from DUT\n"); - if (ShouldSkip("LUNIT.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is true after on command\n"); + if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestThReadsEventListFromDut_6(); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("LUNIT.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Send Off Command\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsAcceptedCommandListFromDut_7(); + err = TestSendOffCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads GeneratedCommandList from DUT\n"); - if (ShouldSkip("LUNIT.S.Afff8")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); + if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestThReadsGeneratedCommandListFromDut_8(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Send Off Command\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestSendOffCommand_9(); break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Send Toggle Command\n"); + if (ShouldSkip("OO.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestSendToggleCommand_11(); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); + err = TestWait1000ms_12(); break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Check on/off attribute value is true after toggle command\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Send Toggle Command\n"); + if (ShouldSkip("OO.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestSendToggleCommand_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); + err = TestWait1000ms_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Check on/off attribute value is false after toggle command\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Operate on device to set OnOff attribute manually to on\n"); + if (ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000")) { + NextTest(); + return; + } + err = TestOperateOnDeviceToSetOnOffAttributeManuallyToOn_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Check on/off attribute value is true after on command\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Operate on device to set OnOff attribute manually to off\n"); + if (ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000")) { + NextTest(); + return; + } + err = TestOperateOnDeviceToSetOnOffAttributeManuallyToOff_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Check on/off attribute value is false after off command\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Reset Off Command\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestResetOffCommand_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -61762,6 +59199,48 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -61775,7 +59254,7 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; @@ -61790,92 +59269,81 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestSendOffCommand_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenLunitsf00tempEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestSendOnCommand_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAttributeListFromDut_4() + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AttributeList from DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + } NextTest(); }]; @@ -61883,327 +59351,219 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentLUNITSF00AttributeInAttributeList_5() + CHIP_ERROR TestSendOnCommand_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEventListFromDut_6() + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList from DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_7() + CHIP_ERROR TestSendOffCommand_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsGeneratedCommandListFromDut_8() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_LUNIT_3_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LUNIT_3_1() - : TestCommandBridge("Test_TC_LUNIT_3_1") - , mTestIndex(0) + CHIP_ERROR TestSendOffCommand_9() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LUNIT_3_1() {} + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - /////////// TestCommand Interface ///////// - void NextTest() override + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Send Off Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LUNIT_3_1\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_3_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads TemperatureUnit attribute from DUT\n"); - if (ShouldSkip("LUNIT.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTemperatureUnitAttributeFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes 0 (Fahrenheit) to TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit")) { - NextTest(); - return; - } - err = TestThWrites0FahrenheitToTemperatureUnitAttribute_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit")) { - NextTest(); - return; - } - err = TestThReadsTemperatureUnitAttribute_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH writes 1 (Celsius) to TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius")) { - NextTest(); - return; - } - err = TestThWrites1CelsiusToTemperatureUnitAttribute_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius")) { - NextTest(); - return; - } - err = TestThReadsTemperatureUnitAttribute_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH writes 2 (Kelvin) to TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin")) { - NextTest(); - return; - } - err = TestThWrites2KelvinToTemperatureUnitAttribute_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin")) { - NextTest(); - return; - } - err = TestThReadsTemperatureUnitAttribute_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH writes 5 to TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000")) { - NextTest(); - return; + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } - err = TestThWrites5ToTemperatureUnitAttribute_8(); - break; - } - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + NextTest(); + }]; + + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestSendToggleCommand_11() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + [cluster toggleWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Send Toggle Command Error: %@", err); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + NextTest(); + }]; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1000ms_12() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsTemperatureUnitAttributeFromDut_1() + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads TemperatureUnit attribute from DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is true after toggle command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("temperatureUnit", "enum8", "enum8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0FahrenheitToTemperatureUnitAttribute_2() + CHIP_ERROR TestSendToggleCommand_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id temperatureUnitArgument; - temperatureUnitArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 (Fahrenheit) to TemperatureUnit attribute Error: %@", err); + [cluster toggleWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Send Toggle Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTemperatureUnitAttribute_3() + CHIP_ERROR TestWait1000ms_15() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads TemperatureUnit attribute Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after toggle command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 0U)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } NextTest(); @@ -62212,42 +59572,64 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites1CelsiusToTemperatureUnitAttribute_4() + CHIP_ERROR TestOperateOnDeviceToSetOnOffAttributeManuallyToOn_17() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id temperatureUnitArgument; - temperatureUnitArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 1 (Celsius) to TemperatureUnit attribute Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTemperatureUnitAttribute_5() + CHIP_ERROR TestOperateOnDeviceToSetOnOffAttributeManuallyToOff_19() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads TemperatureUnit attribute Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 1U)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } NextTest(); @@ -62256,42 +59638,39 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites2KelvinToTemperatureUnitAttribute_6() + CHIP_ERROR TestResetOffCommand_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id temperatureUnitArgument; - temperatureUnitArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 2 (Kelvin) to TemperatureUnit attribute Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Reset Off Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTemperatureUnitAttribute_7() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads TemperatureUnit attribute Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 2U)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } NextTest(); @@ -62299,38 +59678,13 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestThWrites5ToTemperatureUnitAttribute_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id temperatureUnitArgument; - temperatureUnitArgument = [NSNumber numberWithUnsignedChar:5U]; - [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes 5 to TemperatureUnit attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } }; -class Test_TC_LTIME_1_2 : public TestCommandBridge { +class Test_TC_OO_2_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LTIME_1_2() - : TestCommandBridge("Test_TC_LTIME_1_2") + Test_TC_OO_2_4() + : TestCommandBridge("Test_TC_OO_2_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -62340,7 +59694,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LTIME_1_2() {} + ~Test_TC_OO_2_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -62348,11 +59702,11 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LTIME_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LTIME_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -62369,70 +59723,228 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("LTIME.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsTheClusterRevisionFromDut_1(); + err = TestThSendsOnCommandToDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("LTIME.S.Afffc")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes a value of 0 to StartUpOnOff attribute of DUT\n"); + if (ShouldSkip("OO.S.A4003")) { NextTest(); return; } - err = TestThReadsTheFeatureMapFromDut_2(); + err = TestThWritesAValueOf0ToStartUpOnOffAttributeOfDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); - if (ShouldSkip("LTIME.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Reboot target device\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestThReadsAttributeListFromDut_3(); + err = TestRebootTargetDevice_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT\n"); - if (ShouldSkip("LTIME.S.Afffb && LTIME.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reboot target device(DUT)\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_4(); + err = TestRebootTargetDeviceDUT_4(); break; case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT\n"); - if (ShouldSkip("LTIME.S.Afffb && LTIME.S.A0002")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads EventList from DUT\n"); - if (ShouldSkip("LTIME.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the OnOff attribute from the DUT\n"); + if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestThReadsEventListFromDut_6(); + err = TestThReadsTheOnOffAttributeFromTheDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("LTIME.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH writes a value of 1 to StartUpOnOff attribute of DUT\n"); + if (ShouldSkip("OO.S.A4003")) { NextTest(); return; } - err = TestThReadsAcceptedCommandListFromDut_7(); + err = TestThWritesAValueOf1ToStartUpOnOffAttributeOfDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads GeneratedCommandList from DUT\n"); - if (ShouldSkip("LTIME.S.Afff8")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Reboot target device\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestThReadsGeneratedCommandListFromDut_8(); + err = TestRebootTargetDevice_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Reboot target device(DUT)\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestRebootTargetDeviceDUT_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads the OnOff attribute from the DUT\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheOnOffAttributeFromTheDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH writes a value of 2 to StartUpOnOff attribute of DUT\n"); + if (ShouldSkip("OO.S.A4003")) { + NextTest(); + return; + } + err = TestThWritesAValueOf2ToStartUpOnOffAttributeOfDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Reboot target device\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestRebootTargetDevice_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Reboot target device(DUT)\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestRebootTargetDeviceDUT_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads the OnOff attribute from the DUT\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheOnOffAttributeFromTheDut_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Reboot target device\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestRebootTargetDevice_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Reboot target device(DUT)\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestRebootTargetDeviceDUT_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads the OnOff attribute from the DUT\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheOnOffAttributeFromTheDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH writes NULL to StartUpOnOff attribute of DUT\n"); + if (ShouldSkip("OO.S.A4003")) { + NextTest(); + return; + } + err = TestThWritesNullToStartUpOnOffAttributeOfDut_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Reboot target device\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestRebootTargetDevice_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Reboot target device(DUT)\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestRebootTargetDeviceDUT_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads the OnOff attribute from the DUT\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheOnOffAttributeFromTheDut_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsOffCommandToDut_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads the OnOff attribute from the DUT\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheOnOffAttributeFromTheDut_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Reboot target device\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestRebootTargetDevice_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Reboot target device(DUT)\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestRebootTargetDeviceDUT_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads the OnOff attribute from the DUT\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheOnOffAttributeFromTheDut_31(); break; } @@ -62472,6 +59984,75 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -62485,7 +60066,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 32; chip::Optional mNodeId; chip::Optional mCluster; @@ -62500,101 +60081,87 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestThSendsOnCommandToDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestThWritesAValueOf0ToStartUpOnOffAttributeOfDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id startUpOnOffArgument; + startUpOnOffArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes a value of 0 to StartUpOnOff attribute of DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 1UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAttributeListFromDut_3() + CHIP_ERROR TestRebootTargetDevice_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AttributeList from DUT Error: %@", err); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestRebootTargetDeviceDUT_4() + { - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_5() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_4() + CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } NextTest(); }]; @@ -62602,227 +60169,165 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_5() + CHIP_ERROR TestThWritesAValueOf1ToStartUpOnOffAttributeOfDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id startUpOnOffArgument; + startUpOnOffArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes a value of 1 to StartUpOnOff attribute of DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEventListFromDut_6() + CHIP_ERROR TestRebootTargetDevice_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + CHIP_ERROR TestRebootTargetDeviceDUT_9() + { - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_10() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_7() + CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsGeneratedCommandListFromDut_8() + CHIP_ERROR TestThWritesAValueOf2ToStartUpOnOffAttributeOfDut_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id startUpOnOffArgument; + startUpOnOffArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes a value of 2 to StartUpOnOff attribute of DUT Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } -}; -class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LOWPOWER_1_1() - : TestCommandBridge("Test_TC_LOWPOWER_1_1") - , mTestIndex(0) + CHIP_ERROR TestRebootTargetDevice_13() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LOWPOWER_1_1() {} + CHIP_ERROR TestRebootTargetDeviceDUT_14() + { - /////////// TestCommand Interface ///////// - void NextTest() override + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_15() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LOWPOWER_1_1\n"); - } + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LOWPOWER_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_16() + { - Wait(); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_6(); - break; - } + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestRebootTargetDevice_17() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + CHIP_ERROR TestRebootTargetDeviceDUT_18() + { - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_19() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -62830,151 +60335,183 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_20() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestThWritesNullToStartUpOnOffAttributeOfDut_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id startUpOnOffArgument; + startUpOnOffArgument = nil; + [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes NULL to StartUpOnOff attribute of DUT Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestRebootTargetDevice_22() + { + + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } + + CHIP_ERROR TestRebootTargetDeviceDUT_23() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_24() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_25() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(6))); - VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65530UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65533UL)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestThSendsOffCommandToDut_26() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_27() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_6() + CHIP_ERROR TestRebootTargetDevice_28() + { + + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } + + CHIP_ERROR TestRebootTargetDeviceDUT_29() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_30() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_31() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; @@ -62982,11 +60519,11 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { } }; -class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { +class Test_TC_PS_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_KEYPADINPUT_1_2() - : TestCommandBridge("Test_TC_KEYPADINPUT_1_2") + Test_TC_PS_1_1() + : TestCommandBridge("Test_TC_PS_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -62996,7 +60533,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_KEYPADINPUT_1_2() {} + ~Test_TC_PS_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -63004,11 +60541,11 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_KEYPADINPUT_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PS_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_KEYPADINPUT_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PS_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -63030,52 +60567,133 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !KEYPADINPUT.S.F00 && KEYPADINPUT.S.F01 && !KEYPADINPUT.S.F02 ")) { + if (ShouldSkip(" !PS.S.F00 && !PS.S.F01 && !PS.S.F02 && !PS.S.F03 ")) { NextTest(); return; } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given (KEYPADINPUT.S.F00(NV)) FeatureMap bit mask is set or not\n"); - if (ShouldSkip("KEYPADINPUT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Given PS.S.F00(WIRED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PS.S.F00")) { NextTest(); return; } - err = TestGivenKeypadinputsf00nvFeatureMapBitMaskIsSetOrNot_3(); + err = TestGivenPssf00wiredEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given (KEYPADINPUT.S.F01(LK)) FeatureMap bit mask is set or not\n"); - if (ShouldSkip("KEYPADINPUT.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Given PS.S.F01(BAT) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PS.S.F01")) { NextTest(); return; } - err = TestGivenKeypadinputsf01lkFeatureMapBitMaskIsSetOrNot_4(); + err = TestGivenPssf01batEnsureFeaturemapHasTheCorrectBitSet_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Given (KEYPADINPUT.S.F02(NK)) FeatureMap bit mask is set or not\n"); - if (ShouldSkip("KEYPADINPUT.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Given PS.S.F02(RECHG) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PS.S.F02")) { NextTest(); return; } - err = TestGivenKeypadinputsf02nkFeatureMapBitMaskIsSetOrNot_5(); + err = TestGivenPssf02rechgEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Given PS.S.F03(REPLC) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PS.S.F03")) { + NextTest(); + return; + } + err = TestGivenPssf03replcEnsureFeaturemapHasTheCorrectBitSet_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_8(); + ChipLogProgress( + chipTool, " ***** Test Step 8 : Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList\n"); + if (ShouldSkip("PS.S.F00")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentPSSF00WiredAttributeInAttributeList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList\n"); + if (ShouldSkip("PS.S.F01")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentPSSF01BatAttributeInAttributeList_9(); + break; + case 10: + ChipLogProgress( + chipTool, " ***** Test Step 10 : Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList\n"); + if (ShouldSkip("PS.S.F02")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentPSSF02RechgAttributeInAttributeList_10(); + break; + case 11: + ChipLogProgress( + chipTool, " ***** Test Step 11 : Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList\n"); + if (ShouldSkip("PS.S.F03")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentPSSF03ReplcAttributeInAttributeList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " + "contain manufacturer specific event IDs.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_14(); break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read the global attribute: EventList\n"); + if (ShouldSkip(" !PS.S.E00 && !PS.S.E01 && !PS.S.E02 ")) { + NextTest(); + return; + } + NextTest(); + return; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read PS.S.E00(WiredFaultChange) event in EventList\n"); + if (ShouldSkip("PS.S.E00")) { + NextTest(); + return; + } + NextTest(); + return; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Read PS.S.E01(BatFaultChange) event in EventList\n"); + if (ShouldSkip("PS.S.E01")) { + NextTest(); + return; + } + NextTest(); + return; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Read PS.S.E02(BatChargeFaultChange) event in EventList\n"); + if (ShouldSkip("PS.S.E02")) { + NextTest(); + return; + } + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -63117,6 +60735,33 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -63130,7 +60775,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -63149,7 +60794,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -63173,7 +60818,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -63193,15 +60838,15 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenKeypadinputsf00nvFeatureMapBitMaskIsSetOrNot_3() + CHIP_ERROR TestGivenPssf00wiredEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given (KEYPADINPUT.S.F00(NV)) FeatureMap bit mask is set or not Error: %@", err); + NSLog(@"Given PS.S.F00(WIRED) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63212,15 +60857,15 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenKeypadinputsf01lkFeatureMapBitMaskIsSetOrNot_4() + CHIP_ERROR TestGivenPssf01batEnsureFeaturemapHasTheCorrectBitSet_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given (KEYPADINPUT.S.F01(LK)) FeatureMap bit mask is set or not Error: %@", err); + NSLog(@"Given PS.S.F01(BAT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63231,15 +60876,15 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenKeypadinputsf02nkFeatureMapBitMaskIsSetOrNot_5() + CHIP_ERROR TestGivenPssf02rechgEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given (KEYPADINPUT.S.F02(NK)) FeatureMap bit mask is set or not Error: %@", err); + NSLog(@"Given PS.S.F02(RECHG) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63250,11 +60895,30 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_6() + CHIP_ERROR TestGivenPssf03replcEnsureFeaturemapHasTheCorrectBitSet_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given PS.S.F03(REPLC) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -63263,6 +60927,9 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -63276,20 +60943,20 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestReadTheFeatureDependentPSSF00WiredAttributeInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); NextTest(); }]; @@ -63297,20 +60964,22 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestReadTheFeatureDependentPSSF01BatAttributeInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); NextTest(); }]; @@ -63318,36 +60987,115 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_9() + CHIP_ERROR TestReadTheFeatureDependentPSSF02RechgAttributeInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 26UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 28UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheFeatureDependentPSSF03ReplcAttributeInAttributeList_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 25UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR + TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_14() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; -class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { +class Test_TC_PS_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_APPLAUNCHER_1_3() - : TestCommandBridge("Test_TC_APPLAUNCHER_1_3") + Test_TC_PS_2_1() + : TestCommandBridge("Test_TC_PS_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -63357,7 +61105,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_APPLAUNCHER_1_3() {} + ~Test_TC_PS_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -63365,11 +61113,11 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_APPLAUNCHER_1_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PS_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APPLAUNCHER_1_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PS_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -63386,56 +61134,258 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Test Harness Client reads Status attribute from Server DUT\n"); + if (ShouldSkip("PS.S.A0000")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsStatusAttributeFromServerDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("APPLAUNCHER.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Test Harness Client reads Order attribute from Server DUT\n"); + if (ShouldSkip("PS.S.A0001")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMap_2(); + err = TestTestHarnessClientReadsOrderAttributeFromServerDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !APPLAUNCHER.S.F00 ")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Test Harness Client reads Description attribute from Server DUT\n"); + if (ShouldSkip("PS.S.A0002")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMap_3(); + err = TestTestHarnessClientReadsDescriptionAttributeFromServerDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_4(); + ChipLogProgress( + chipTool, " ***** Test Step 4 : Test Harness Client reads WiredAssessedInputVoltage attribue from Server DUT\n"); + if (ShouldSkip("PS.S.A0003")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsWiredAssessedInputVoltageAttribueFromServerDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(CatalogList) in AttributeList\n"); - if (ShouldSkip("APPLAUNCHER.S.A0000")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Test Harness Client reads WiredAssessedInputFrequency attribute from Server DUT\n"); + if (ShouldSkip("PS.S.A0004")) { NextTest(); return; } - err = TestReadTheOptionalAttributeCatalogListInAttributeList_5(); + err = TestTestHarnessClientReadsWiredAssessedInputFrequencyAttributeFromServerDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(CurrentApp) in AttributeList\n"); - if (ShouldSkip("APPLAUNCHER.S.A0001")) { + ChipLogProgress( + chipTool, " ***** Test Step 6 : Test Harness Client reads WiredCurrentType attribute from Server DUT\n"); + if (ShouldSkip("PS.S.A0005")) { NextTest(); return; } - err = TestReadTheOptionalAttributeCurrentAppInAttributeList_6(); + err = TestTestHarnessClientReadsWiredCurrentTypeAttributeFromServerDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_7(); + ChipLogProgress( + chipTool, " ***** Test Step 7 : Test Harness Client reads WiredAssessedCurrent attribute from Server DUT\n"); + if (ShouldSkip("PS.S.A0006")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsWiredAssessedCurrentAttributeFromServerDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Test Harness Client reads WiredNominalVoltage from Server DUT\n"); + if (ShouldSkip("PS.S.A0007")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsWiredNominalVoltageFromServerDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Test Harness Client reads WiredMaximumCurrent from Server DUT\n"); + if (ShouldSkip("PS.S.A0008")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsWiredMaximumCurrentFromServerDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Test Harness Client reads WiredPresent from Server DUT\n"); + if (ShouldSkip("PS.S.A0009")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsWiredPresentFromServerDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Test Harness Client reads ActiveWiredFaults from Server DUT\n"); + if (ShouldSkip("PS.S.A000a")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsActiveWiredFaultsFromServerDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Test Harness Client reads BatVoltage from Server DUT\n"); + if (ShouldSkip("PS.S.A000b")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatVoltageFromServerDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Test Harness Client reads BatPercentRemaining from Server DUT\n"); + if (ShouldSkip("PS.S.A000c")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatPercentRemainingFromServerDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Test Harness Client reads BatTimeRemaining from Server DUT\n"); + if (ShouldSkip("PS.S.A000d")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatTimeRemainingFromServerDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Test Harness Client reads BatChargeLevel from Server DUT\n"); + if (ShouldSkip("PS.S.A000e")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatChargeLevelFromServerDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Test Harness Client reads BatReplacementNeeded from Server DUT\n"); + if (ShouldSkip("PS.S.A000f")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatReplacementNeededFromServerDut_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Test Harness Client reads BatReplaceability from Server DUT\n"); + if (ShouldSkip("PS.S.A0010")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatReplaceabilityFromServerDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Test Harness Client reads BatPresent from Server DUT\n"); + if (ShouldSkip("PS.S.A0011")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatPresentFromServerDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Test Harness Client readsActiveBatFaults from Server DUT\n"); + if (ShouldSkip("PS.S.A0012")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsActiveBatFaultsFromServerDut_19(); + break; + case 20: + ChipLogProgress( + chipTool, " ***** Test Step 20 : Test Harness Client reads BatReplacementDescription from Server DUT\n"); + if (ShouldSkip("PS.S.A0013")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatReplacementDescriptionFromServerDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Test Harness Client reads BatCommonDesignation from Server DUT\n"); + if (ShouldSkip("PS.S.A0014")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatCommonDesignationFromServerDut_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Test Harness Client reads BatANSIDesignation from Server DUT\n"); + if (ShouldSkip("PS.S.A0015")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatANSIDesignationFromServerDut_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Test Harness Client reads BatIECDesignation from Server DUT\n"); + if (ShouldSkip("PS.S.A0016")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatIECDesignationFromServerDut_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Test Harness Client reads BatApprovedChemistry from Server DUT\n"); + if (ShouldSkip("PS.S.A0017")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatApprovedChemistryFromServerDut_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Test Harness Client reads BatCapacity from Server DUT\n"); + if (ShouldSkip("PS.S.A0018")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatCapacityFromServerDut_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Test Harness Client reads BatQuantity from Server DUT\n"); + if (ShouldSkip("PS.S.A0019")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatQuantityFromServerDut_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Test Harness Client reads BatChargeState from Server DUT\n"); + if (ShouldSkip("PS.S.A001a")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatChargeStateFromServerDut_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Test Harness Client reads BatTimeToFullCharge from Server DUT\n"); + if (ShouldSkip("PS.S.A001b")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatTimeToFullChargeFromServerDut_28(); + break; + case 29: + ChipLogProgress( + chipTool, " ***** Test Step 29 : Test Harness Client reads BatFunctionalWhileCharging from Server DUT\n"); + if (ShouldSkip("PS.S.A001c")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatFunctionalWhileChargingFromServerDut_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Test Harness Client reads BatChargingCurrent from Server DUT\n"); + if (ShouldSkip("PS.S.A001d")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsBatChargingCurrentFromServerDut_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Test Harness Client reads ActiveBatChargeFaults from Server DUT\n"); + if (ShouldSkip("PS.S.A001e")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsActiveBatChargeFaultsFromServerDut_31(); break; } @@ -63478,6 +61428,72 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -63491,7 +61507,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 32; chip::Optional mNodeId; chip::Optional mCluster; @@ -63506,105 +61522,88 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestTestHarnessClientReadsStatusAttributeFromServerDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads Status attribute from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } + VerifyOrReturn(CheckConstraintType("status", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("status", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("status", [value unsignedCharValue], 3U)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestTestHarnessClientReadsOrderAttributeFromServerDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributeOrderWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads Order attribute from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); - } + VerifyOrReturn(CheckConstraintType("order", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("order", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("order", [value unsignedCharValue], 255U)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_3() + CHIP_ERROR TestTestHarnessClientReadsDescriptionAttributeFromServerDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads Description attribute from Server DUT Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("description", "char_string", "char_string")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestTestHarnessClientReadsWiredAssessedInputVoltageAttribueFromServerDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeWiredAssessedInputVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads WiredAssessedInputVoltage attribue from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("wiredAssessedInputVoltage", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("wiredAssessedInputVoltage", [value unsignedIntValue], 0UL)); + VerifyOrReturn( + CheckConstraintMaxValue("wiredAssessedInputVoltage", [value unsignedIntValue], 4294967295UL)); + } NextTest(); }]; @@ -63612,22 +61611,25 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCatalogListInAttributeList_5() + CHIP_ERROR TestTestHarnessClientReadsWiredAssessedInputFrequencyAttributeFromServerDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(CatalogList) in AttributeList Error: %@", err); + [cluster readAttributeWiredAssessedInputFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads WiredAssessedInputFrequency attribute from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("wiredAssessedInputFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("wiredAssessedInputFrequency", [value unsignedShortValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("wiredAssessedInputFrequency", [value unsignedShortValue], 65535U)); + } NextTest(); }]; @@ -63635,22 +61637,21 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCurrentAppInAttributeList_6() + CHIP_ERROR TestTestHarnessClientReadsWiredCurrentTypeAttributeFromServerDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(CurrentApp) in AttributeList Error: %@", err); + [cluster readAttributeWiredCurrentTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads WiredCurrentType attribute from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintType("wiredCurrentType", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("wiredCurrentType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("wiredCurrentType", [value unsignedCharValue], 1U)); NextTest(); }]; @@ -63658,24 +61659,24 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestTestHarnessClientReadsWiredAssessedCurrentAttributeFromServerDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeWiredAssessedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads WiredAssessedCurrent attribute from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("wiredAssessedCurrent", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("wiredAssessedCurrent", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("wiredAssessedCurrent", [value unsignedIntValue], 4294967295UL)); + } NextTest(); }]; @@ -63683,22 +61684,21 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestTestHarnessClientReadsWiredNominalVoltageFromServerDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeWiredNominalVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads WiredNominalVoltage from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintType("wiredNominalVoltage", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("wiredNominalVoltage", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("wiredNominalVoltage", [value unsignedIntValue], 4294967295UL)); NextTest(); }]; @@ -63706,304 +61706,198 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_9() + CHIP_ERROR TestTestHarnessClientReadsWiredMaximumCurrentFromServerDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeWiredMaximumCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads WiredMaximumCurrent from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintType("wiredMaximumCurrent", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("wiredMaximumCurrent", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("wiredMaximumCurrent", [value unsignedIntValue], 4294967295UL)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MEDIAINPUT_1_4() - : TestCommandBridge("Test_TC_MEDIAINPUT_1_4") - , mTestIndex(0) + CHIP_ERROR TestTestHarnessClientReadsWiredPresentFromServerDut_10() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MEDIAINPUT_1_4() {} + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - /////////// TestCommand Interface ///////// - void NextTest() override + [cluster readAttributeWiredPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads WiredPresent from Server DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("wiredPresent", "boolean", "boolean")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTestHarnessClientReadsActiveWiredFaultsFromServerDut_11() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAINPUT_1_4\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAINPUT_1_4\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributeActiveWiredFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads ActiveWiredFaults from Server DUT Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !MEDIAINPUT.S.F00 ")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Given MEDIAINPUT.S.F00(NU) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("MEDIAINPUT.S.F00")) { - NextTest(); - return; - } - err = TestGivenMediainputsf00nuEnsureFeaturemapHasTheCorrectBitSet_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(InputList) in AttributeList\n"); - if (ShouldSkip("MEDIAINPUT.S.A0000")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeInputListInAttributeList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(CurrentInput) in AttributeList\n"); - if (ShouldSkip("MEDIAINPUT.S.A0001")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeCurrentInputInAttributeList_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_9(); - break; - } + VerifyOrReturn(CheckConstraintType("activeWiredFaults", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("activeWiredFaults", value, 8)); + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestTestHarnessClientReadsBatVoltageFromServerDut_12() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + [cluster readAttributeBatVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatVoltage from Server DUT Error: %@", err); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + if (value != nil) { - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + VerifyOrReturn(CheckConstraintType("batVoltage", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("batVoltage", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("batVoltage", [value unsignedIntValue], 4294967295UL)); + } - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestTestHarnessClientReadsBatPercentRemainingFromServerDut_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeBatPercentRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatPercentRemaining from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("batPercentRemaining", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("batPercentRemaining", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batPercentRemaining", [value unsignedCharValue], 200U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestTestHarnessClientReadsBatTimeRemainingFromServerDut_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributeBatTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatTimeRemaining from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("batTimeRemaining", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("batTimeRemaining", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("batTimeRemaining", [value unsignedIntValue], 4294967295UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenMediainputsf00nuEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestTestHarnessClientReadsBatChargeLevelFromServerDut_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given MEDIAINPUT.S.F00(NU) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeBatChargeLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatChargeLevel from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("batChargeLevel", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("batChargeLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batChargeLevel", [value unsignedCharValue], 2U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestTestHarnessClientReadsBatReplacementNeededFromServerDut_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeBatReplacementNeededWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatReplacementNeeded from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - + VerifyOrReturn(CheckConstraintType("batReplacementNeeded", "boolean", "boolean")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeInputListInAttributeList_5() + CHIP_ERROR TestTestHarnessClientReadsBatReplaceabilityFromServerDut_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(InputList) in AttributeList Error: %@", err); + [cluster readAttributeBatReplaceabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatReplaceability from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintType("batReplaceability", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("batReplaceability", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batReplaceability", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -64011,304 +61905,208 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCurrentInputInAttributeList_6() + CHIP_ERROR TestTestHarnessClientReadsBatPresentFromServerDut_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(CurrentInput) in AttributeList Error: %@", err); + [cluster readAttributeBatPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatPresent from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - + VerifyOrReturn(CheckConstraintType("batPresent", "boolean", "boolean")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestTestHarnessClientReadsActiveBatFaultsFromServerDut_19() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeActiveBatFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client readsActiveBatFaults from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); - + VerifyOrReturn(CheckConstraintType("activeBatFaults", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("activeBatFaults", value, 8)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestTestHarnessClientReadsBatReplacementDescriptionFromServerDut_20() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeBatReplacementDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatReplacementDescription from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintType("batReplacementDescription", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("batReplacementDescription", value, 60)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_9() + CHIP_ERROR TestTestHarnessClientReadsBatCommonDesignationFromServerDut_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeBatCommonDesignationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatCommonDesignation from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintType("batCommonDesignation", "enum16", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("batCommonDesignation", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batCommonDesignation", [value unsignedShortValue], 80U)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WAKEONLAN_1_5() - : TestCommandBridge("Test_TC_WAKEONLAN_1_5") - , mTestIndex(0) + CHIP_ERROR TestTestHarnessClientReadsBatANSIDesignationFromServerDut_22() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_WAKEONLAN_1_5() {} + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - /////////// TestCommand Interface ///////// - void NextTest() override + [cluster readAttributeBatANSIDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatANSIDesignation from Server DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("batANSIDesignation", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("batANSIDesignation", value, 20)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTestHarnessClientReadsBatIECDesignationFromServerDut_23() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WAKEONLAN_1_5\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WAKEONLAN_1_5\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributeBatIECDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatIECDesignation from Server DUT Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(MACAddress) in AttributeList\n"); - if (ShouldSkip("WAKEONLAN.S.A0000")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeMACAddressInAttributeList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_7(); - break; - } + VerifyOrReturn(CheckConstraintType("batIECDesignation", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("batIECDesignation", value, 20)); + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestTestHarnessClientReadsBatApprovedChemistryFromServerDut_24() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + [cluster readAttributeBatApprovedChemistryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatApprovedChemistry from Server DUT Error: %@", err); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + VerifyOrReturn(CheckConstraintType("batApprovedChemistry", "enum16", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("batApprovedChemistry", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batApprovedChemistry", [value unsignedShortValue], 32U)); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestTestHarnessClientReadsBatCapacityFromServerDut_25() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeBatCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatCapacity from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } + VerifyOrReturn(CheckConstraintType("batCapacity", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("batCapacity", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("batCapacity", [value unsignedIntValue], 4294967295UL)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestTestHarnessClientReadsBatQuantityFromServerDut_26() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributeBatQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatQuantity from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + VerifyOrReturn(CheckConstraintType("batQuantity", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("batQuantity", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batQuantity", [value unsignedCharValue], 255U)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestTestHarnessClientReadsBatChargeStateFromServerDut_27() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeBatChargeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatChargeState from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintType("batChargeState", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("batChargeState", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batChargeState", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -64316,20 +62114,24 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMACAddressInAttributeList_4() + CHIP_ERROR TestTestHarnessClientReadsBatTimeToFullChargeFromServerDut_28() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(MACAddress) in AttributeList Error: %@", err); + [cluster readAttributeBatTimeToFullChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatTimeToFullCharge from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("batTimeToFullCharge", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("batTimeToFullCharge", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("batTimeToFullCharge", [value unsignedIntValue], 4294967295UL)); + } NextTest(); }]; @@ -64337,72 +62139,63 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestTestHarnessClientReadsBatFunctionalWhileChargingFromServerDut_29() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeBatFunctionalWhileChargingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatFunctionalWhileCharging from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintType("batFunctionalWhileCharging", "boolean", "boolean")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestTestHarnessClientReadsBatChargingCurrentFromServerDut_30() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeBatChargingCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatChargingCurrent from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("batChargingCurrent", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("batChargingCurrent", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("batChargingCurrent", [value unsignedIntValue], 4294967295UL)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_7() + CHIP_ERROR TestTestHarnessClientReadsActiveBatChargeFaultsFromServerDut_31() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeActiveBatChargeFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads ActiveBatChargeFaults from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); + VerifyOrReturn(CheckConstraintType("activeBatChargeFaults", "list", "list")); NextTest(); }]; @@ -64410,11 +62203,11 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { } }; -class Test_TC_CHANNEL_1_6 : public TestCommandBridge { +class Test_TC_PRS_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CHANNEL_1_6() - : TestCommandBridge("Test_TC_CHANNEL_1_6") + Test_TC_PRS_1_1() + : TestCommandBridge("Test_TC_PRS_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -64424,7 +62217,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CHANNEL_1_6() {} + ~Test_TC_PRS_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -64432,11 +62225,11 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CHANNEL_1_6\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CHANNEL_1_6\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -64453,105 +62246,137 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + if (ShouldSkip("PRS.S.Afffd")) { + NextTest(); + return; + } err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("( !CHANNEL.S.F00 && !CHANNEL.S.F01 )")) { + if (ShouldSkip("PRS.S.Afffc && !PRS.S.F00")) { NextTest(); return; } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given CCHANNEL.S.F00(CL) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CHANNEL.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Given PRS.S.F00(EXT) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PRS.S.F00 && PRS.S.Afffc")) { NextTest(); return; } - err = TestGivenCchannelsf00clEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestGivenPrssf00extEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given CHANNEL.S.F01(LI) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CHANNEL.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global mandatory attribute: AttributeList\n"); + if (ShouldSkip("PRS.S.Afffb")) { NextTest(); return; } - err = TestGivenChannelsf01liEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestReadTheGlobalMandatoryAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(ScaledValue) in AttributeList\n"); + if (ShouldSkip("PRS.S.A0010 && PRS.S.Afffb")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeScaledValueInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(ChannelList): AttributeList\n"); - if (ShouldSkip("CHANNEL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(MinScaledValue) in AttributeList\n"); + if (ShouldSkip("PRS.S.A0011 && PRS.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalAttributeChannelListAttributeList_6(); + err = TestReadTheOptionalAttributeMinScaledValueInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reading optional attribute(Lineup) in AttributeList\n"); - if (ShouldSkip("CHANNEL.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(MaxScaledValue) in AttributeList\n"); + if (ShouldSkip("PRS.S.A0012 && PRS.S.Afffb")) { NextTest(); return; } - err = TestReadingOptionalAttributeLineupInAttributeList_7(); + err = TestReadTheOptionalAttributeMaxScaledValueInAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(CurrentChannel): AttributeList\n"); - if (ShouldSkip("CHANNEL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(Scale) in AttributeList\n"); + if (ShouldSkip("PRS.S.A0014 && PRS.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalAttributeCurrentChannelAttributeList_8(); + err = TestReadTheOptionalAttributeScaleInAttributeList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional command(ChangeChannel) in AcceptedCommandList\n"); - if (ShouldSkip("CHANNEL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(Tolerance) in AttributeList\n"); + if (ShouldSkip("PRS.S.A0003 && PRS.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalCommandChangeChannelInAcceptedCommandList_9(); + err = TestReadTheOptionalAttributeToleranceInAttributeList_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Read the optional command(ChangeChannelByNumber) in AcceptedCommandList\n"); - if (ShouldSkip("CHANNEL.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(ScaledTolerance) in AttributeList\n"); + if (ShouldSkip("PRS.S.A0013 && PRS.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_10(); + err = TestReadTheOptionalAttributeScaledToleranceInAttributeList_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional command(SkipChannel) in AcceptedCommandList\n"); - if (ShouldSkip("CHANNEL.S.C03.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list " + "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " + "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " + "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && PRS.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalCommandSkipChannelInAcceptedCommandList_11(); + err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("( !CHANNEL.S.F00 && !CHANNEL.S.F01 )")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " + "the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && PRS.S.Afffa")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_12(); + err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("CHANNEL.S.F00 || CHANNEL.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && PRS.S.Afff9")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_13(); + err = TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_14(); + ChipLogProgress(chipTool, + " ***** Test Step 14 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && PRS.S.Afff8")) { + NextTest(); + return; + } + err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_14(); break; } @@ -64641,17 +62466,19 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -64665,7 +62492,9 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -64685,34 +62514,17 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenCchannelsf00clEnsureFeaturemapHasTheCorrectBitSet_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CCHANNEL.S.F00(CL) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenChannelsf01liEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestGivenPrssf00extEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CHANNEL.S.F01(LI) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Given PRS.S.F00(EXT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64723,19 +62535,24 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadTheGlobalMandatoryAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Read the global mandatory attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -64749,20 +62566,22 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeChannelListAttributeList_6() + CHIP_ERROR TestReadTheOptionalAttributeScaledValueInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(ChannelList): AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(ScaledValue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); NextTest(); }]; @@ -64770,20 +62589,22 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadingOptionalAttributeLineupInAttributeList_7() + CHIP_ERROR TestReadTheOptionalAttributeMinScaledValueInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reading optional attribute(Lineup) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(MinScaledValue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); NextTest(); }]; @@ -64791,20 +62612,22 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCurrentChannelAttributeList_8() + CHIP_ERROR TestReadTheOptionalAttributeMaxScaledValueInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(CurrentChannel): AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(MaxScaledValue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); NextTest(); }]; @@ -64812,20 +62635,22 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandChangeChannelInAcceptedCommandList_9() + CHIP_ERROR TestReadTheOptionalAttributeScaleInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(ChangeChannel) in AcceptedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(Scale) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); NextTest(); }]; @@ -64833,20 +62658,22 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_10() + CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(ChangeChannelByNumber) in AcceptedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -64854,20 +62681,22 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandSkipChannelInAcceptedCommandList_11() + CHIP_ERROR TestReadTheOptionalAttributeScaledToleranceInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(SkipChannel) in AcceptedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(ScaledTolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); NextTest(); }]; @@ -64875,81 +62704,56 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_12() + CHIP_ERROR + TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_13() + CHIP_ERROR + TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeEventList_14() + CHIP_ERROR + TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; + CHIP_ERROR + TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_14() + { - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } }; -class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { +class Test_TC_PRS_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MEDIAPLAYBACK_1_7() - : TestCommandBridge("Test_TC_MEDIAPLAYBACK_1_7") + Test_TC_PRS_2_1() + : TestCommandBridge("Test_TC_PRS_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -64959,7 +62763,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MEDIAPLAYBACK_1_7() {} + ~Test_TC_PRS_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -64967,11 +62771,11 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAPLAYBACK_1_7\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAPLAYBACK_1_7\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -64988,162 +62792,76 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute constraints: MinMeasuredValue\n"); + if (ShouldSkip("PRS.S.A0001")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeConstraintsMinMeasuredValue_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !MEDIAPLAYBACK.S.F00 && !MEDIAPLAYBACK.S.F01 ")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute constraints: MaxMeasuredValue\n"); + if (ShouldSkip("PRS.S.A0002")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMap_2(); + err = TestReadTheMandatoryAttributeConstraintsMaxMeasuredValue_2(); break; case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Given MEDIAPLAYBACK.S.F00(AS) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute constraints: MeasuredValue\n"); + if (ShouldSkip("PRS.S.A0000")) { NextTest(); return; } - err = TestGivenMediaplaybacksf00asEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestReadTheMandatoryAttributeConstraintsMeasuredValue_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Given MEDIAPLAYBACK.S.F01(VS) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute: Tolerance\n"); + if (ShouldSkip("PRS.S.A0003")) { NextTest(); return; } - err = TestGivenMediaplaybacksf01vsEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestReadTheOptionalAttributeTolerance_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute: MinScaledValue\n"); + if (ShouldSkip("PRS.S.A0011")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeMinScaledValue_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(StartTime) in AttributeList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute: MaxScaledValue\n"); + if (ShouldSkip("PRS.S.A0012")) { NextTest(); return; } - err = TestReadTheOptionalAttributeStartTimeInAttributeList_6(); + err = TestReadTheOptionalAttributeMaxScaledValue_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(Duration) in AttributeList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute: ScaledValue\n"); + if (ShouldSkip("PRS.S.A0010")) { NextTest(); return; } - err = TestReadTheOptionalAttributeDurationInAttributeList_7(); + err = TestReadTheOptionalAttributeScaledValue_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(SampledPosition) in AttributeList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute: ScaledTolerance\n"); + if (ShouldSkip("PRS.S.A0013")) { NextTest(); return; } - err = TestReadTheOptionalAttributeSampledPositionInAttributeList_8(); + err = TestReadTheOptionalAttributeScaledTolerance_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(PlaybackSpeed) in AttributeList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0004")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributePlaybackSpeedInAttributeList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(SeekRangeEnd) in AttributeList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0005")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeSeekRangeEndInAttributeList_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute(SeekRangeStart) in AttributeList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0006")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeSeekRangeStartInAttributeList_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional command(StartOver) in AcceptedCommandList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestReadTheOptionalCommandStartOverInAcceptedCommandList_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the optional command(Previous) in AcceptedCommandList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C04.Rsp")) { - NextTest(); - return; - } - err = TestReadTheOptionalCommandPreviousInAcceptedCommandList_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional command(Next) in AcceptedCommandList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C05.Rsp")) { - NextTest(); - return; - } - err = TestReadTheOptionalCommandNextInAcceptedCommandList_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read the optional command(Rewind) in AcceptedCommandList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp")) { - NextTest(); - return; - } - err = TestReadTheOptionalCommandRewindInAcceptedCommandList_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read the optional command(FastForward) in AcceptedCommandList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp")) { - NextTest(); - return; - } - err = TestReadTheOptionalCommandFastForwardInAcceptedCommandList_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read the optional command(SkipForward) in AcceptedCommandList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C08.Rsp")) { - NextTest(); - return; - } - err = TestReadTheOptionalCommandSkipForwardInAcceptedCommandList_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read the optional command(SkipBackward) in AcceptedCommandList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C09.Rsp")) { - NextTest(); - return; - } - err = TestReadTheOptionalCommandSkipBackwardInAcceptedCommandList_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Read the optional command(Seek) in AcceptedCommandList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0b.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute: Scale\n"); + if (ShouldSkip("PRS.S.A0014")) { NextTest(); return; } - err = TestReadTheOptionalCommandSeekInAcceptedCommandList_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_22(); + err = TestReadTheOptionalAttributeScale_9(); break; } @@ -65186,45 +62904,6 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -65238,7 +62917,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 23; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -65252,239 +62931,62 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMinMeasuredValue_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute constraints: MinMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value shortValue], -32768)); + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value shortValue], 32767)); + } { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + MinMeasuredValue = value; } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenMediaplaybacksf00asEnsureFeaturemapHasTheCorrectBitSet_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given MEDIAPLAYBACK.S.F00(AS) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenMediaplaybacksf01vsEnsureFeaturemapHasTheCorrectBitSet_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given MEDIAPLAYBACK.S.F01(VS) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeStartTimeInAttributeList_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(StartTime) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeDurationInAttributeList_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(Duration) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeSampledPositionInAttributeList_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(SampledPosition) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributePlaybackSpeedInAttributeList_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(PlaybackSpeed) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestReadTheOptionalAttributeSeekRangeEndInAttributeList_10() + CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMaxMeasuredValue_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(SeekRangeEnd) in AttributeList Error: %@", err); + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute constraints: MaxMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeSeekRangeStartInAttributeList_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(SeekRangeStart) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value shortValue], -32768)); + VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value shortValue], 32767)); + } + { + MaxMeasuredValue = value; + } NextTest(); }]; @@ -65492,43 +62994,26 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_12() + CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMeasuredValue_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute constraints: MeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalCommandStartOverInAcceptedCommandList_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(StartOver) in AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintType("measuredValue", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value shortValue], MinMeasuredValue)); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value shortValue], MaxMeasuredValue)); + } NextTest(); }]; @@ -65536,104 +63021,85 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandPreviousInAcceptedCommandList_14() + CHIP_ERROR TestReadTheOptionalAttributeTolerance_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(Previous) in AcceptedCommandList Error: %@", err); + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: Tolerance Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable MinScaledValue; - CHIP_ERROR TestReadTheOptionalCommandNextInAcceptedCommandList_15() + CHIP_ERROR TestReadTheOptionalAttributeMinScaledValue_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(Next) in AcceptedCommandList Error: %@", err); + [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: MinScaledValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalCommandRewindInAcceptedCommandList_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(Rewind) in AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); + VerifyOrReturn(CheckConstraintType("minScaledValue", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("minScaledValue", [value shortValue], -32768)); + VerifyOrReturn(CheckConstraintMaxValue("minScaledValue", [value shortValue], 32767)); + } + { + MinScaledValue = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable MaxScaledValue; - CHIP_ERROR TestReadTheOptionalCommandFastForwardInAcceptedCommandList_17() + CHIP_ERROR TestReadTheOptionalAttributeMaxScaledValue_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(FastForward) in AcceptedCommandList Error: %@", err); + [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: MaxScaledValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalCommandSkipForwardInAcceptedCommandList_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(SkipForward) in AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); + VerifyOrReturn(CheckConstraintType("maxScaledValue", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("maxScaledValue", [value shortValue], -32768)); + VerifyOrReturn(CheckConstraintMaxValue("maxScaledValue", [value shortValue], 32767)); + } + { + MaxScaledValue = value; + } NextTest(); }]; @@ -65641,41 +63107,26 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandSkipBackwardInAcceptedCommandList_19() + CHIP_ERROR TestReadTheOptionalAttributeScaledValue_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(SkipBackward) in AcceptedCommandList Error: %@", err); + [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: ScaledValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 9UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalCommandSeekInAcceptedCommandList_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(Seek) in AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 11UL)); + VerifyOrReturn(CheckConstraintType("scaledValue", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("scaledValue", [value shortValue], MinScaledValue)); + VerifyOrReturn(CheckConstraintMaxValue("scaledValue", [value shortValue], MaxScaledValue)); + } NextTest(); }]; @@ -65683,20 +63134,23 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_21() + CHIP_ERROR TestReadTheOptionalAttributeScaledTolerance_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: ScaledTolerance Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 10UL)); + VerifyOrReturn(CheckConstraintType("scaledTolerance", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("scaledTolerance", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("scaledTolerance", [value unsignedShortValue], 2048U)); NextTest(); }]; @@ -65704,24 +63158,24 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_22() + CHIP_ERROR TestReadTheOptionalAttributeScale_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: Scale Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintType("scale", "int8s", "int8s")); + VerifyOrReturn(CheckConstraintMinValue("scale", [value charValue], -127)); + VerifyOrReturn(CheckConstraintMaxValue("scale", [value charValue], 127)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; @@ -65729,11 +63183,11 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { } }; -class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { +class Test_TC_PRS_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_AUDIOOUTPUT_1_8() - : TestCommandBridge("Test_TC_AUDIOOUTPUT_1_8") + Test_TC_PRS_2_2() + : TestCommandBridge("Test_TC_PRS_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -65743,7 +63197,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_AUDIOOUTPUT_1_8() {} + ~Test_TC_PRS_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -65751,11 +63205,11 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_AUDIOOUTPUT_1_8\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_AUDIOOUTPUT_1_8\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -65772,40 +63226,33 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MeasuredValue attribute\n"); + if (ShouldSkip("PRS.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheMeasuredValueAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("AUDIOOUTPUT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Operate on device to change the pressure significantly\n"); + if (ShouldSkip("PICS_USER_PROMPT && PRS.M.PressureChange")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMap_2(); + err = TestOperateOnDeviceToChangeThePressureSignificantly_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !AUDIOOUTPUT.S.F00 ")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 2s\n"); + err = TestWait2s_3(); + break; + case 4: + ChipLogProgress( + chipTool, " ***** Test Step 4 : After a few seconds, TH reads from the DUT the MeasuredValue attribute\n"); + if (ShouldSkip("PRS.S.A0000 && PRS.M.PressureChange")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMap_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_7(); + err = TestAfterAFewSecondsThReadsFromTheDutTheMeasuredValueAttribute_4(); break; } @@ -65833,15 +63280,6 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -65855,7 +63293,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -65869,160 +63307,68 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSNumber * _Nullable ValueBeforeChange; - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the MeasuredValue attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + ValueBeforeChange = value; } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestOperateOnDeviceToChangeThePressureSignificantly_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestWait2s_3() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeEventList_7() + CHIP_ERROR TestAfterAFewSecondsThReadsFromTheDutTheMeasuredValueAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After a few seconds, TH reads from the DUT the MeasuredValue attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + if (value != nil) { } + VerifyOrReturn(CheckConstraintNotValue("measuredValue", value, ValueBeforeChange)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; @@ -66030,11 +63376,11 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { } }; -class Test_TC_TGTNAV_1_9 : public TestCommandBridge { +class Test_TC_PCC_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TGTNAV_1_9() - : TestCommandBridge("Test_TC_TGTNAV_1_9") + Test_TC_PCC_1_1() + : TestCommandBridge("Test_TC_PCC_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -66044,7 +63390,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_TGTNAV_1_9() {} + ~Test_TC_PCC_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -66052,11 +63398,11 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TGTNAV_1_9\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TGTNAV_1_9\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -66073,352 +63419,446 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); + if (ShouldSkip("PCC.S.Afffd")) { + NextTest(); + return; + } + err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); + if (ShouldSkip(" PCC.S.Afffc && !PCC.S.F00 && !PCC.S.F01 && !PCC.S.F02 && !PCC.S.F03 && !PCC.S.F04 && !PCC.S.F05 && " + "!PCC.S.F06 ")) { + NextTest(); + return; + } + err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Given PCC.S.F00(PRSCONST) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PCC.S.F00 && PCC.S.Afffc")) { + NextTest(); + return; + } + err = TestGivenPccsf00prsconstEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(CurrentTarget) in AttributeList\n"); - if (ShouldSkip("TGTNAV.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Given PCC.S.F01(PRSCOMP) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PCC.S.F01 && PCC.S.Afffc")) { NextTest(); return; } - err = TestReadTheOptionalAttributeCurrentTargetInAttributeList_4(); + err = TestGivenPccsf01prscompEnsureFeaturemapHasTheCorrectBitSet_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Given PCC.S.F02(FLW) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PCC.S.F02 && PCC.S.Afffc")) { + NextTest(); + return; + } + err = TestGivenPccsf02flwEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Given PCC.S.F03(SPD) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PCC.S.F03 && PCC.S.Afffc")) { + NextTest(); + return; + } + err = TestGivenPccsf03spdEnsureFeaturemapHasTheCorrectBitSet_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Given PCC.S.F04(TEMP) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PCC.S.F04 && PCC.S.Afffc")) { + NextTest(); + return; + } + err = TestGivenPccsf04tempEnsureFeaturemapHasTheCorrectBitSet_7(); break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Given PCC.S.F05(AUTO) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PCC.S.F05 && PCC.S.Afffc")) { + NextTest(); + return; + } + err = TestGivenPccsf05autoEnsureFeaturemapHasTheCorrectBitSet_8(); break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Given PCC.S.F06(LOCAL) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PCC.S.F06 && PCC.S.Afffc")) { + NextTest(); + return; + } + err = TestGivenPccsf06localEnsureFeaturemapHasTheCorrectBitSet_9(); break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsTheAttributeListAttributeFromTheDut_10(); break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0003 && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_11(); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0004 && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_12(); break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0005 && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_13(); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0006 && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_14(); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 15: + ChipLogProgress(chipTool, + " ***** Test Step 15 : TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0007 && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_15(); break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0008 && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_16(); + break; + case 17: + ChipLogProgress(chipTool, + " ***** Test Step 17 : TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0009 && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_17(); + break; + case 18: + ChipLogProgress(chipTool, + " ***** Test Step 18 : TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000a && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_18(); + break; + case 19: + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000b && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_19(); + break; + case 20: + ChipLogProgress(chipTool, + " ***** Test Step 20 : TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000c && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_20(); + break; + case 21: + ChipLogProgress(chipTool, + " ***** Test Step 21 : TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0010 && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_21(); + break; + case 22: + ChipLogProgress( + chipTool, " ***** Test Step 22 : TH reads optional attribute(Speed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0014 && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_22(); + break; + case 23: + ChipLogProgress(chipTool, + " ***** Test Step 23 : TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the " + "DUT\n"); + if (ShouldSkip("PCC.S.A0015 && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_23(); + break; + case 24: + ChipLogProgress( + chipTool, " ***** Test Step 24 : TH reads optional attribute(Power) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0016 && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_24(); + break; + case 25: + ChipLogProgress(chipTool, + " ***** Test Step 25 : TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the " + "DUT\n"); + if (ShouldSkip("PCC.S.A0017 && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_25(); + break; + case 26: + ChipLogProgress(chipTool, + " ***** Test Step 26 : TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0021 && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_26(); + break; + case 27: + ChipLogProgress(chipTool, + " ***** Test Step 27 : TH reads AttributeList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - " + "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads EventList from DUT\n"); + if (ShouldSkip(" PCC.S.Afffa && !PCC.S.E00 && !PCC.S.E01 && !PCC.S.E02 && !PCC.S.E03 && !PCC.S.E04 && !PCC.S.E05 && " + "!PCC.S.E06 && !PCC.S.E07 && !PCC.S.E08 && !PCC.S.E09 && !PCC.S.E0a && !PCC.S.E0b && !PCC.S.E0c && " + "!PCC.S.E0d && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 ")) { + NextTest(); + return; } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + return; + case 29: + ChipLogProgress( + chipTool, " ***** Test Step 29 : TH reads from the DUT the EventList optional (SupplyVoltageLow)attribute.\n"); + if (ShouldSkip("PCC.S.E00 && PCC.S.Afffa")) { + NextTest(); + return; } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - + return; + case 30: + ChipLogProgress( + chipTool, " ***** Test Step 30 : TH reads from the DUT the EventList optional (SupplyVoltageHigh)attribute.\n"); + if (ShouldSkip("PCC.S.E01 && PCC.S.Afffa")) { + NextTest(); + return; + } NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeCurrentTargetInAttributeList_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(CurrentTarget) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - + return; + case 31: + ChipLogProgress( + chipTool, " ***** Test Step 31 : TH reads from the DUT the EventList optional (PowerMissingPhase)attribute.\n"); + if (ShouldSkip("PCC.S.E02 && PCC.S.Afffa")) { + NextTest(); + return; + } NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - + return; + case 32: + ChipLogProgress( + chipTool, " ***** Test Step 32 : TH reads from the DUT the EventList optional (SystemPressureLow)attribute.\n"); + if (ShouldSkip("PCC.S.E03 && PCC.S.Afffa")) { + NextTest(); + return; + } NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); - + return; + case 33: + ChipLogProgress( + chipTool, " ***** Test Step 33 : TH reads from the DUT the EventList optional (SystemPressureHigh)attribute.\n"); + if (ShouldSkip("PCC.S.E04 && PCC.S.Afffa")) { + NextTest(); + return; + } NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + return; + case 34: + ChipLogProgress( + chipTool, " ***** Test Step 34 : TH reads from the DUT the EventList optional (DryRunning)attribute.\n"); + if (ShouldSkip("PCC.S.E05 && PCC.S.Afffa")) { + NextTest(); + return; } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_APBSC_1_10 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_APBSC_1_10() - : TestCommandBridge("Test_TC_APBSC_1_10") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_APBSC_1_10() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_APBSC_1_10\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APBSC_1_10\n"); - SetCommandExitStatus(CHIP_NO_ERROR); return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read FeatureMap attribute from the DUT\n"); - err = TestReadFeatureMapAttributeFromTheDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(VendorName) in AttributeList\n"); - if (ShouldSkip("APBSC.S.A0000")) { + case 35: + ChipLogProgress( + chipTool, " ***** Test Step 35 : TH reads from the DUT the EventList optional (MotorTemperatureHigh)attribute.\n"); + if (ShouldSkip("PCC.S.E06 && PCC.S.Afffa")) { NextTest(); return; } - err = TestReadTheOptionalAttributeVendorNameInAttributeList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(VendorID) in AttributeList\n"); - if (ShouldSkip("APBSC.S.A0001")) { + NextTest(); + return; + case 36: + ChipLogProgress( + chipTool, " ***** Test Step 36 : TH reads from the DUT the EventList optional (PumpMotorFatalFailure)attribute.\n"); + if (ShouldSkip("PCC.S.E07 && PCC.S.Afffa")) { NextTest(); return; } - err = TestReadTheOptionalAttributeVendorIDInAttributeList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(ProductID) in AttributeList\n"); - if (ShouldSkip("APBSC.S.A0003")) { + NextTest(); + return; + case 37: + ChipLogProgress(chipTool, + " ***** Test Step 37 : TH reads from the DUT the EventList optional (ElectronicTemperatureHigh)attribute.\n"); + if (ShouldSkip("PCC.S.E08 && PCC.S.Afffa")) { NextTest(); return; } - err = TestReadTheOptionalAttributeProductIDInAttributeList_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_7(); + NextTest(); + return; + case 38: + ChipLogProgress( + chipTool, " ***** Test Step 38 : TH reads from the DUT the EventList optional (PumpBlocked)attribute.\n"); + if (ShouldSkip("PCC.S.E09 && PCC.S.Afffa")) { + NextTest(); + return; + } + NextTest(); + return; + case 39: + ChipLogProgress( + chipTool, " ***** Test Step 39 : TH reads from the DUT the EventList optional (SensorFailure)attribute.\n"); + if (ShouldSkip("PCC.S.E0a && PCC.S.Afffa")) { + NextTest(); + return; + } + NextTest(); + return; + case 40: + ChipLogProgress(chipTool, + " ***** Test Step 40 : TH reads from the DUT the EventList optional (ElectronicNonFatalFailure)attribute.\n"); + if (ShouldSkip("PCC.S.E0b && PCC.S.Afffa")) { + NextTest(); + return; + } + NextTest(); + return; + case 41: + ChipLogProgress(chipTool, + " ***** Test Step 41 : TH reads from the DUT the EventList optional (ElectronicFatalFailure)attribute.\n"); + if (ShouldSkip("PCC.S.E0c && PCC.S.Afffa")) { + NextTest(); + return; + } + NextTest(); + return; + case 42: + ChipLogProgress( + chipTool, " ***** Test Step 42 : TH reads from the DUT the EventList optional (GeneralFault)attribute.\n"); + if (ShouldSkip("PCC.S.E0d && PCC.S.Afffa")) { + NextTest(); + return; + } + NextTest(); + return; + case 43: + ChipLogProgress(chipTool, " ***** Test Step 43 : TH reads from the DUT the EventList optional (Leakage)attribute.\n"); + if (ShouldSkip("PCC.S.E0e && PCC.S.Afffa")) { + NextTest(); + return; + } + NextTest(); + return; + case 44: + ChipLogProgress( + chipTool, " ***** Test Step 44 : TH reads from the DUT the EventList optional (AirDetection)attribute.\n"); + if (ShouldSkip("PCC.S.E0f && PCC.S.Afffa")) { + NextTest(); + return; + } + NextTest(); + return; + case 45: + ChipLogProgress( + chipTool, " ***** Test Step 45 : TH reads from the DUT the EventList optional (TurbineOperation)attribute.\n"); + if (ShouldSkip("PCC.S.E10 && PCC.S.Afffa")) { + NextTest(); + return; + } + NextTest(); + return; + case 46: + ChipLogProgress(chipTool, + " ***** Test Step 46 : TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values " + "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2. The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 3. The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " + "the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && PCC.S.Afffa")) { + NextTest(); + return; + } + err = TestThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_46(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_8(); + case 47: + ChipLogProgress(chipTool, + " ***** Test Step 47 : TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && PCC.S.Afff9")) { + NextTest(); + return; + } + err = TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_47(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_9(); + case 48: + ChipLogProgress(chipTool, + " ***** Test Step 48 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && PCC.S.Afff8")) { + NextTest(); + return; + } + err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_48(); break; } @@ -66461,6 +63901,123 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -66474,7 +64031,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 49; chip::Optional mNodeId; chip::Optional mCluster; @@ -66489,21 +64046,23 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -66513,15 +64072,17 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() + CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); + NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -66537,472 +64098,273 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestGivenPccsf00prsconstEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given PCC.S.F00(PRSCONST) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeVendorNameInAttributeList_4() + CHIP_ERROR TestGivenPccsf01prscompEnsureFeaturemapHasTheCorrectBitSet_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(VendorName) in AttributeList Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given PCC.S.F01(PRSCOMP) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeVendorIDInAttributeList_5() + CHIP_ERROR TestGivenPccsf02flwEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(VendorID) in AttributeList Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given PCC.S.F02(FLW) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeProductIDInAttributeList_6() + CHIP_ERROR TestGivenPccsf03spdEnsureFeaturemapHasTheCorrectBitSet_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(ProductID) in AttributeList Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given PCC.S.F03(SPD) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestGivenPccsf04tempEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given PCC.S.F04(TEMP) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestGivenPccsf05autoEnsureFeaturemapHasTheCorrectBitSet_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given PCC.S.F05(AUTO) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_9() + CHIP_ERROR TestGivenPccsf06localEnsureFeaturemapHasTheCorrectBitSet_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given PCC.S.F06(LOCAL) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } -}; - -class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CONTENTLAUNCHER_1_11() - : TestCommandBridge("Test_TC_CONTENTLAUNCHER_1_11") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_CONTENTLAUNCHER_1_11() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CONTENTLAUNCHER_1_11\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CONTENTLAUNCHER_1_11\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("( !CONTENTLAUNCHER.S.F00 && !CONTENTLAUNCHER.S.F01 )")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Given CONTENTLAUNCHER.S.F00 (CS) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CONTENTLAUNCHER.S.F00")) { - NextTest(); - return; - } - err = TestGivenContentlaunchersf00CsEnsureFeaturemapHasTheCorrectBitSet_3(); - break; - case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Given CONTENTLAUNCHER.S.F01(UP) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CONTENTLAUNCHER.S.F01")) { - NextTest(); - return; - } - err = TestGivenContentlaunchersf01upEnsureFeaturemapHasTheCorrectBitSet_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(AcceptHeader): AttributeList\n"); - if (ShouldSkip("CONTENTLAUNCHER.S.A0000")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeAcceptHeaderAttributeList_6(); - break; - case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Read the optional attribute(SupportedStreamingProtocols): AttributeList\n"); - if (ShouldSkip("CONTENTLAUNCHER.S.A0001")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeSupportedStreamingProtocolsAttributeList_7(); - break; - case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Read the optional command(LaunchContent) in AcceptedCommandList attribute\n"); - if (ShouldSkip("CONTENTLAUNCHER.C.C00.Tx")) { - NextTest(); - return; - } - err = TestReadTheOptionalCommandLaunchContentInAcceptedCommandListAttribute_8(); - break; - case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : Read the optional command(LaunchURL) in AcceptedCommandList attribute\n"); - if (ShouldSkip("CONTENTLAUNCHER.C.C01.Tx")) { - NextTest(); - return; - } - err = TestReadTheOptionalCommandLaunchURLInAcceptedCommandListAttribute_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_11(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_10() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the AttributeList attribute from the DUT Error: %@", err); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 32UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenContentlaunchersf00CsEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CONTENTLAUNCHER.S.F00 (CS) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenContentlaunchersf01upEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given CONTENTLAUNCHER.S.F01(UP) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); NextTest(); }]; @@ -67010,20 +64372,22 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeAcceptHeaderAttributeList_6() + CHIP_ERROR TestThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(AcceptHeader): AttributeList Error: %@", err); + NSLog(@"TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); NextTest(); }]; @@ -67031,20 +64395,22 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeSupportedStreamingProtocolsAttributeList_7() + CHIP_ERROR TestThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(SupportedStreamingProtocols): AttributeList Error: %@", err); + NSLog(@"TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); NextTest(); }]; @@ -67052,20 +64418,22 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandLaunchContentInAcceptedCommandListAttribute_8() + CHIP_ERROR TestThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(LaunchContent) in AcceptedCommandList attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); NextTest(); }]; @@ -67073,20 +64441,22 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandLaunchURLInAcceptedCommandListAttribute_9() + CHIP_ERROR TestThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command(LaunchURL) in AcceptedCommandList attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); NextTest(); }]; @@ -67094,20 +64464,22 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_10() + CHIP_ERROR TestThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_19() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); NextTest(); }]; @@ -67115,224 +64487,91 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeEventList_11() + CHIP_ERROR TestThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_20() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } -}; - -class Test_TC_ALOGIN_1_12 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ALOGIN_1_12() - : TestCommandBridge("Test_TC_ALOGIN_1_12") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_ALOGIN_1_12() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ALOGIN_1_12\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ALOGIN_1_12\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads EventList attribute from DUT\n"); - err = TestThReadsEventListAttributeFromDut_6(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_22() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(Speed) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_23() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 21UL)); NextTest(); }]; @@ -67340,22 +64579,22 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_24() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(Power) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 22UL)); NextTest(); }]; @@ -67363,20 +64602,22 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_25() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); NextTest(); }]; @@ -67384,150 +64625,79 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEventListAttributeFromDut_6() + CHIP_ERROR TestThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_26() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList attribute from DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 33UL)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } -}; - -class Test_TC_LOWPOWER_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LOWPOWER_2_1() - : TestCommandBridge("Test_TC_LOWPOWER_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_LOWPOWER_2_1() {} - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR + TestThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LOWPOWER_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LOWPOWER_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends Sleep command to DUT\n"); - if (ShouldSkip("LOWPOWER.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsSleepCommandToDut_1(); - break; - } - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR + TestThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_46() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR + TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_47() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThSendsSleepCommandToDut_1() + CHIP_ERROR + TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_48() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster sleepWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends Sleep command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } }; -class Test_TC_KEYPADINPUT_3_2 : public TestCommandBridge { +class Test_TC_PCC_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_KEYPADINPUT_3_2() - : TestCommandBridge("Test_TC_KEYPADINPUT_3_2") + Test_TC_PCC_2_1() + : TestCommandBridge("Test_TC_PCC_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -67537,7 +64707,7 @@ class Test_TC_KEYPADINPUT_3_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_KEYPADINPUT_3_2() {} + ~Test_TC_PCC_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -67545,11 +64715,11 @@ class Test_TC_KEYPADINPUT_3_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_KEYPADINPUT_3_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_KEYPADINPUT_3_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -67566,235 +64736,188 @@ class Test_TC_KEYPADINPUT_3_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends CEC Settings Keys(0x0A) to DUT\n"); - if (ShouldSkip("KEYPADINPUT.S.F01 && KEYPADINPUT.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: MaxPressure\n"); + if (ShouldSkip("PCC.S.A0000")) { NextTest(); return; } - err = TestThSendsCecSettingsKeys0x0AToDut_1(); + err = TestReadTheMandatoryAttributeMaxPressure_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends CEC Home Keys(0x09) to DUT\n"); - if (ShouldSkip("KEYPADINPUT.S.F01 && KEYPADINPUT.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MaxSpeed\n"); + if (ShouldSkip("PCC.S.A0001")) { NextTest(); return; } - err = TestThSendsCecHomeKeys0x09ToDut_2(); + err = TestReadTheMandatoryAttributeMaxSpeed_2(); break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute: MaxFlow\n"); + if (ShouldSkip("PCC.S.A0002")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeMaxFlow_3(); break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute: MinConstPressure\n"); + if (ShouldSkip("PCC.S.A0003")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeMinConstPressure_4(); break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute: MaxConstPressure\n"); + if (ShouldSkip("PCC.S.A0004")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeMaxConstPressure_5(); break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThSendsCecSettingsKeys0x0AToDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:10U]; - [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends CEC Settings Keys(0x0A) to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsCecHomeKeys0x09ToDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9U]; - [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends CEC Home Keys(0x09) to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_KEYPADINPUT_3_3() - : TestCommandBridge("Test_TC_KEYPADINPUT_3_3") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_KEYPADINPUT_3_3() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_KEYPADINPUT_3_3\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_KEYPADINPUT_3_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute: MinCompPressure\n"); + if (ShouldSkip("PCC.S.A0005")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeMinCompPressure_6(); break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send Numbers1\n"); - if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute: MaxCompPressure\n"); + if (ShouldSkip("PCC.S.A0006")) { NextTest(); return; } - err = TestSendNumbers1_1(); + err = TestReadTheOptionalAttributeMaxCompPressure_7(); break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Send Numbers2\n"); - if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute: MinConstSpeed\n"); + if (ShouldSkip("PCC.S.A0007")) { NextTest(); return; } - err = TestSendNumbers2_2(); + err = TestReadTheOptionalAttributeMinConstSpeed_8(); break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Send Numbers3\n"); - if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute: MaxConstSpeed\n"); + if (ShouldSkip("PCC.S.A0008")) { NextTest(); return; } - err = TestSendNumbers3_3(); + err = TestReadTheOptionalAttributeMaxConstSpeed_9(); break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Send Numbers4\n"); - if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute: MinConstFlow\n"); + if (ShouldSkip("PCC.S.A0009")) { NextTest(); return; } - err = TestSendNumbers4_4(); + err = TestReadTheOptionalAttributeMinConstFlow_10(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Send Numbers5\n"); - if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute: MaxConstFlow\n"); + if (ShouldSkip("PCC.S.A000a")) { NextTest(); return; } - err = TestSendNumbers5_5(); + err = TestReadTheOptionalAttributeMaxConstFlow_11(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Send Numbers6\n"); - if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Read the optional attribute: MinConstTemp\n"); + if (ShouldSkip("PCC.S.A000b")) { NextTest(); return; } - err = TestSendNumbers6_6(); + err = TestReadTheOptionalAttributeMinConstTemp_12(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Send Numbers7\n"); - if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional attribute: MaxConstTemp\n"); + if (ShouldSkip("PCC.S.A000c")) { NextTest(); return; } - err = TestSendNumbers7_7(); + err = TestReadTheOptionalAttributeMaxConstTemp_13(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Send Numbers8\n"); - if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the optional attribute: PumpStatus\n"); + if (ShouldSkip("PCC.S.A0010")) { NextTest(); return; } - err = TestSendNumbers8_8(); + err = TestReadTheOptionalAttributePumpStatus_14(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Send Numbers9\n"); - if (ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02")) { + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read attribute: EffectiveOperationMode\n"); + if (ShouldSkip("PCC.S.A0011")) { NextTest(); return; } - err = TestSendNumbers9_9(); + err = TestReadAttributeEffectiveOperationMode_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read attribute: EffectiveControlMode\n"); + if (ShouldSkip("PCC.S.A0012")) { + NextTest(); + return; + } + err = TestReadAttributeEffectiveControlMode_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Read attribute: Capacity\n"); + if (ShouldSkip("PCC.S.A0013")) { + NextTest(); + return; + } + err = TestReadAttributeCapacity_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Read the optional attribute: Speed\n"); + if (ShouldSkip("PCC.S.A0014")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeSpeed_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Read the optional attribute: LifetimeRunningHours\n"); + if (ShouldSkip("PCC.S.A0015")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeLifetimeRunningHours_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Read the optional attribute: Power\n"); + if (ShouldSkip("PCC.S.A0016")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributePower_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Read the optional attribute: LifetimeEnergyConsumed\n"); + if (ShouldSkip("PCC.S.A0017")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Read optional attribute: OperationMode\n"); + if (ShouldSkip("PCC.S.A0020")) { + NextTest(); + return; + } + err = TestReadOptionalAttributeOperationMode_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Read optional attribute: ControlMode\n"); + if (ShouldSkip("PCC.S.A0021")) { + NextTest(); + return; + } + err = TestReadOptionalAttributeControlMode_23(); break; } @@ -67837,6 +64960,48 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -67850,7 +65015,7 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 24; chip::Optional mNodeId; chip::Optional mCluster; @@ -67865,600 +65030,606 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestSendNumbers1_1() + CHIP_ERROR TestReadTheMandatoryAttributeMaxPressure_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:33U]; - [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers1 Error: %@", err); + [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MaxPressure Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + if (value != nil) { - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("maxPressure", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("maxPressure", [value shortValue], -32768)); + VerifyOrReturn(CheckConstraintMaxValue("maxPressure", [value shortValue], 32767)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendNumbers2_2() + CHIP_ERROR TestReadTheMandatoryAttributeMaxSpeed_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:34U]; - [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers2 Error: %@", err); + [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MaxSpeed Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + if (value != nil) { - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("maxSpeed", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("maxSpeed", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxSpeed", [value unsignedShortValue], 65535U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendNumbers3_3() + CHIP_ERROR TestReadTheMandatoryAttributeMaxFlow_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:35U]; - [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers3 Error: %@", err); + [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MaxFlow Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + if (value != nil) { - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("maxFlow", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("maxFlow", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxFlow", [value unsignedShortValue], 65535U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendNumbers4_4() + CHIP_ERROR TestReadTheOptionalAttributeMinConstPressure_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:36U]; - [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers4 Error: %@", err); + [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: MinConstPressure Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + if (value != nil) { - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("minConstPressure", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("minConstPressure", [value shortValue], -32768)); + VerifyOrReturn(CheckConstraintMaxValue("minConstPressure", [value shortValue], 32767)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendNumbers5_5() + CHIP_ERROR TestReadTheOptionalAttributeMaxConstPressure_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:37U]; - [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers5 Error: %@", err); + [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: MaxConstPressure Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + if (value != nil) { - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("maxConstPressure", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("maxConstPressure", [value shortValue], -32768)); + VerifyOrReturn(CheckConstraintMaxValue("maxConstPressure", [value shortValue], 32767)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendNumbers6_6() + CHIP_ERROR TestReadTheOptionalAttributeMinCompPressure_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:38U]; - [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers6 Error: %@", err); + [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: MinCompPressure Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + if (value != nil) { - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("minCompPressure", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("minCompPressure", [value shortValue], -32768)); + VerifyOrReturn(CheckConstraintMaxValue("minCompPressure", [value shortValue], 32767)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendNumbers7_7() + CHIP_ERROR TestReadTheOptionalAttributeMaxCompPressure_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:39U]; - [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers7 Error: %@", err); + [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: MaxCompPressure Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + if (value != nil) { - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("maxCompPressure", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("maxCompPressure", [value shortValue], -32768)); + VerifyOrReturn(CheckConstraintMaxValue("maxCompPressure", [value shortValue], 32767)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendNumbers8_8() + CHIP_ERROR TestReadTheOptionalAttributeMinConstSpeed_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:40U]; - [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers8 Error: %@", err); + [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: MinConstSpeed Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + if (value != nil) { - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("minConstSpeed", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("minConstSpeed", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minConstSpeed", [value unsignedShortValue], 65535U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendNumbers9_9() + CHIP_ERROR TestReadTheOptionalAttributeMaxConstSpeed_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:41U]; - [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers9 Error: %@", err); + [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: MaxConstSpeed Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + if (value != nil) { - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("maxConstSpeed", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("maxConstSpeed", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxConstSpeed", [value unsignedShortValue], 65535U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } -}; -class Test_TC_APPLAUNCHER_3_5 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_APPLAUNCHER_3_5() - : TestCommandBridge("Test_TC_APPLAUNCHER_3_5") - , mTestIndex(0) + CHIP_ERROR TestReadTheOptionalAttributeMinConstFlow_10() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_APPLAUNCHER_3_5() {} - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_APPLAUNCHER_3_5\n"); - } + [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: MinConstFlow Error: %@", err); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APPLAUNCHER_3_5\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + if (value != nil) { - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : TH reads CatalogList attribute from the DUT and where each entry in the list is a CSA-issued " - "Vendor Id of type unsigned 16 bit integer ranging between 0-65536 for the catalog\n"); - if (ShouldSkip("APPLAUNCHER.S.A0000")) { - NextTest(); - return; + VerifyOrReturn(CheckConstraintType("minConstFlow", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("minConstFlow", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minConstFlow", [value unsignedShortValue], 65535U)); } - err = TestThReadsCatalogListAttributeFromTheDutAndWhereEachEntryInTheListIsACsaIssuedVendorIdOfTypeUnsigned16BitIntegerRangingBetween065536ForTheCatalog_1(); - break; - } - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + NextTest(); + }]; + + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadTheOptionalAttributeMaxConstFlow_11() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: MaxConstFlow Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("maxConstFlow", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("maxConstFlow", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxConstFlow", [value unsignedShortValue], 65535U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestReadTheOptionalAttributeMinConstTemp_12() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: MinConstTemp Error: %@", err); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("minConstTemp", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("minConstTemp", [value shortValue], -32768)); + VerifyOrReturn(CheckConstraintMaxValue("minConstTemp", [value shortValue], 32767)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsCatalogListAttributeFromTheDutAndWhereEachEntryInTheListIsACsaIssuedVendorIdOfTypeUnsigned16BitIntegerRangingBetween065536ForTheCatalog_1() + CHIP_ERROR TestReadTheOptionalAttributeMaxConstTemp_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CatalogList attribute from the DUT and where each entry in the list is a CSA-issued Vendor Id of type " - @"unsigned 16 bit integer ranging between 0-65536 for the catalog Error: %@", - err); + [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: MaxConstTemp Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("maxConstTemp", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", [value shortValue], -32768)); + VerifyOrReturn(CheckConstraintMaxValue("maxConstTemp", [value shortValue], 32767)); + } + NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_APPLAUNCHER_3_6 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_APPLAUNCHER_3_6() - : TestCommandBridge("Test_TC_APPLAUNCHER_3_6") - , mTestIndex(0) + CHIP_ERROR TestReadTheOptionalAttributePumpStatus_14() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_APPLAUNCHER_3_6() {} + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - /////////// TestCommand Interface ///////// - void NextTest() override + [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: PumpStatus Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("pumpStatus", "bitmap16", "bitmap16")); + VerifyOrReturn(CheckConstraintMinValue("pumpStatus", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("pumpStatus", [value unsignedShortValue], 8U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeEffectiveOperationMode_15() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_APPLAUNCHER_3_6\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APPLAUNCHER_3_6\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute: EffectiveOperationMode Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : TH reads CurrentApp attribute from the DUT and Verify the in-focus application attributes, " - "which should include the display Application ID(type:uint16) Catalog Vendor ID(type:string) or Null if there is " - "no current in-focus application\n"); - if (ShouldSkip("APPLAUNCHER.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsCurrentAppAttributeFromTheDutAndVerifyTheInFocusApplicationAttributesWhichShouldIncludeTheDisplayApplicationIDtypeuint16CatalogVendorIDtypestringOrNullIfThereIsNoCurrentInFocusApplication_1(); - break; - } + VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("effectiveOperationMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("effectiveOperationMode", [value unsignedCharValue], 3U)); - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + NextTest(); + }]; + + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadAttributeEffectiveControlMode_16() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute: EffectiveControlMode Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("effectiveControlMode", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("effectiveControlMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("effectiveControlMode", [value unsignedCharValue], 7U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestReadAttributeCapacity_17() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute: Capacity Error: %@", err); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("capacity", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("capacity", [value shortValue], -32768)); + VerifyOrReturn(CheckConstraintMaxValue("capacity", [value shortValue], 32767)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsCurrentAppAttributeFromTheDutAndVerifyTheInFocusApplicationAttributesWhichShouldIncludeTheDisplayApplicationIDtypeuint16CatalogVendorIDtypestringOrNullIfThereIsNoCurrentInFocusApplication_1() + CHIP_ERROR TestReadTheOptionalAttributeSpeed_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentAppWithCompletion:^( - MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentApp attribute from the DUT and Verify the in-focus application attributes, which should " - @"include the display Application ID(type:uint16) Catalog Vendor ID(type:string) or Null if there is no current " - @"in-focus application Error: %@", - err); + [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: Speed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("speed", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("speed", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("speed", [value unsignedShortValue], 65535U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_MEDIAINPUT_3_10 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MEDIAINPUT_3_10() - : TestCommandBridge("Test_TC_MEDIAINPUT_3_10") - , mTestIndex(0) + CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_19() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MEDIAINPUT_3_10() {} + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - /////////// TestCommand Interface ///////// - void NextTest() override + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: LifetimeRunningHours Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "int24u", "int24u")); + VerifyOrReturn(CheckConstraintMinValue("lifetimeRunningHours", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("lifetimeRunningHours", [value unsignedIntValue], 16777215UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributePower_20() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAINPUT_3_10\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAINPUT_3_10\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: Power Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : TH reads the InputList attribute from the DUT to show list of Inputs available and Verify " - "list of available inputs supported by the device is provided, where each entry in the list contains an " - "index(type:uint 8), InputType (InputType Enums), Name (type: Strings), and Description(Type:String)\n"); - if (ShouldSkip("MEDIAINPUT.S.A0000")) { - NextTest(); - return; + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("power", "int24u", "int24u")); + VerifyOrReturn(CheckConstraintMinValue("power", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("power", [value unsignedIntValue], 16777215UL)); } - err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1(); - break; - } - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + NextTest(); + }]; + + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_21() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: LifetimeEnergyConsumed Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("lifetimeEnergyConsumed", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("lifetimeEnergyConsumed", [value unsignedIntValue], 4294967295UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestReadOptionalAttributeOperationMode_22() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read optional attribute: OperationMode Error: %@", err); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + VerifyOrReturn(CheckConstraintType("operationMode", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("operationMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("operationMode", [value unsignedCharValue], 3U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1() + CHIP_ERROR TestReadOptionalAttributeControlMode_23() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " - @"inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " - @"InputType (InputType Enums), Name (type: Strings), and Description(Type:String) Error: %@", - err); + [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read optional attribute: ControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("controlMode", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("controlMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("controlMode", [value unsignedCharValue], 7U)); + NextTest(); }]; @@ -68466,22 +65637,21 @@ class Test_TC_MEDIAINPUT_3_10 : public TestCommandBridge { } }; -class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { +class Test_TC_PCC_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MEDIAINPUT_3_11() - : TestCommandBridge("Test_TC_MEDIAINPUT_3_11") + Test_TC_PCC_2_2() + : TestCommandBridge("Test_TC_PCC_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("Index", 0, UINT8_MAX, &mIndex); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MEDIAINPUT_3_11() {} + ~Test_TC_PCC_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -68489,11 +65659,11 @@ class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAINPUT_3_11\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAINPUT_3_11\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -68510,34 +65680,69 @@ class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : TH reads the InputList attribute from the DUT to show list of Inputs available and Verify " - "list of available inputs supported by the device is provided, where each entry in the list contains an " - "index(type:uint 8), InputType (InputType Enums), Name (type: Strings), and Description(Type:String)\n"); - if (ShouldSkip("MEDIAINPUT.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH write 0 (Normal) to the OperationMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0020")) { NextTest(); return; } - err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1(); + err = TestThWrite0NormalToTheOperationModeAttributeToDut_1(); break; case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : TH sends SelectInput command to DUT to select an input by passing the index of the preferred " - "input.\n"); - if (ShouldSkip("MEDIAINPUT.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the EffectiveOperationMode attribute\n"); + if (ShouldSkip("PCC.S.A0011")) { NextTest(); return; } - err = TestThSendsSelectInputCommandToDutToSelectAnInputByPassingTheIndexOfThePreferredInput_2(); + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : TH reads _CurrentInput attribute from the DUT to show the current input selected.\n"); - if (ShouldSkip("MEDIAINPUT.S.A0001 && MEDIAINPUT.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH write 1 (Minimum) to the OperationMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.F03 && PCC.S.A0020")) { NextTest(); return; } - err = TestThReadsCurrentInputAttributeFromTheDutToShowTheCurrentInputSelected_3(); + err = TestThWrite1MinimumToTheOperationModeAttributeToDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the EffectiveOperationMode attribute\n"); + if (ShouldSkip("PCC.S.F03 && PCC.S.A0011")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_4(); + break; + case 5: + ChipLogProgress( + chipTool, " ***** Test Step 5 : TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time.\n"); + if (ShouldSkip("PCC.S.F03 && PCC.S.A0020")) { + NextTest(); + return; + } + err = TestThWrite2MaximumToTheOperationModeAttributeToDutOneAtATime_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the EffectiveOperationMode attribute\n"); + if (ShouldSkip("PCC.S.F03 && PCC.S.A0011")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH write 3 (Local) to the OperationMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.F06 && PCC.S.A0020")) { + NextTest(); + return; + } + err = TestThWrite3LocalToTheOperationModeAttributeToDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the EffectiveOperationMode attribute\n"); + if (ShouldSkip("PCC.S.F06 && PCC.S.A0011")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_8(); break; } @@ -68562,6 +65767,21 @@ class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -68575,12 +65795,11 @@ class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mIndex; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -68591,66 +65810,192 @@ class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR - TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1() + CHIP_ERROR TestThWrite0NormalToTheOperationModeAttributeToDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " - @"inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " - @"InputType (InputType Enums), Name (type: Strings), and Description(Type:String) Error: %@", - err); + id operationModeArgument; + operationModeArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOperationModeWithValue:operationModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH write 0 (Normal) to the OperationMode attribute to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 0U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSelectInputCommandToDutToSelectAnInputByPassingTheIndexOfThePreferredInput_2() + CHIP_ERROR TestThWrite1MinimumToTheOperationModeAttributeToDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRMediaInputClusterSelectInputParams alloc] init]; - params.index = mIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mIndex.Value()] : [NSNumber numberWithUnsignedChar:1U]; - [cluster selectInputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends SelectInput command to DUT to select an input by passing the index of the " - @"preferred input. Error: %@", - err); + id operationModeArgument; + operationModeArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeOperationModeWithValue:operationModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH write 1 (Minimum) to the OperationMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentInputAttributeFromTheDutToShowTheCurrentInputSelected_3() + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads _CurrentInput attribute from the DUT to show the current input selected. Error: %@", err); + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentInput", actualValue, mIndex.HasValue() ? mIndex.Value() : 1U)); + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrite2MaximumToTheOperationModeAttributeToDutOneAtATime_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id operationModeArgument; + operationModeArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster writeAttributeOperationModeWithValue:operationModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time. " + @"Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrite3LocalToTheOperationModeAttributeToDut_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id operationModeArgument; + operationModeArgument = [NSNumber numberWithUnsignedChar:3U]; + [cluster writeAttributeOperationModeWithValue:operationModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH write 3 (Local) to the OperationMode attribute to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 3U)); } NextTest(); @@ -68660,11 +66005,11 @@ class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { } }; -class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { +class Test_TC_PCC_2_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MEDIAINPUT_3_12() - : TestCommandBridge("Test_TC_MEDIAINPUT_3_12") + Test_TC_PCC_2_3() + : TestCommandBridge("Test_TC_PCC_2_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -68674,7 +66019,7 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MEDIAINPUT_3_12() {} + ~Test_TC_PCC_2_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -68682,11 +66027,11 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAINPUT_3_12\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAINPUT_3_12\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -68703,31 +66048,116 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : TH reads the InputList attribute from the DUT to show list of Inputs available and Verify " - "list of available inputs supported by the device is provided, where each entry in the list contains an " - "index(type:uint 8), InputType (InputType Enums), Name (type: Strings), and Description(Type:String)\n"); - if (ShouldSkip("MEDIAINPUT.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Write 0 to the OperationMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0020")) { NextTest(); return; } - err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1(); + err = TestWrite0ToTheOperationModeAttributeToDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Show Input Status Command\n"); - if (ShouldSkip("MEDIAINPUT.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the attribute: EffectiveOperationMode\n"); + if (ShouldSkip("PCC.S.A0011")) { NextTest(); return; } - err = TestShowInputStatusCommand_2(); + err = TestReadsTheAttributeEffectiveOperationMode_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Hide Input Status Command\n"); - if (ShouldSkip("MEDIAINPUT.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Write 0 to the ControlMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.F03 && PCC.S.A0021")) { NextTest(); return; } - err = TestHideInputStatusCommand_3(); + err = TestWrite0ToTheControlModeAttributeToDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the attribute: EffectiveControlMode\n"); + if (ShouldSkip("PCC.S.F03 && PCC.S.A0012")) { + NextTest(); + return; + } + err = TestReadsTheAttributeEffectiveControlMode_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Write 1 to the ControlMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.F00 && PCC.S.A0021")) { + NextTest(); + return; + } + err = TestWrite1ToTheControlModeAttributeToDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the attribute: EffectiveControlMode\n"); + if (ShouldSkip("PCC.S.F00 && PCC.S.A0012")) { + NextTest(); + return; + } + err = TestReadsTheAttributeEffectiveControlMode_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Write 2 to the ControlMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.F01 && PCC.S.A0021")) { + NextTest(); + return; + } + err = TestWrite2ToTheControlModeAttributeToDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the attribute: EffectiveControlMode\n"); + if (ShouldSkip("PCC.S.F01 && PCC.S.A0012")) { + NextTest(); + return; + } + err = TestReadsTheAttributeEffectiveControlMode_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Write 3 to the ControlMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.F02 && PCC.S.A0021")) { + NextTest(); + return; + } + err = TestWrite3ToTheControlModeAttributeToDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the attribute: EffectiveControlMode\n"); + if (ShouldSkip("PCC.S.F02 && PCC.S.A0012")) { + NextTest(); + return; + } + err = TestReadsTheAttributeEffectiveControlMode_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Write 5 to the ControlMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.F04 && PCC.S.A0021")) { + NextTest(); + return; + } + err = TestWrite5ToTheControlModeAttributeToDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the attribute: EffectiveControlMode\n"); + if (ShouldSkip("PCC.S.F04 && PCC.S.A0012")) { + NextTest(); + return; + } + err = TestReadsTheAttributeEffectiveControlMode_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Write 7 to the ControlMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.F05 && PCC.S.A0021")) { + NextTest(); + return; + } + err = TestWrite7ToTheControlModeAttributeToDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the attribute: EffectiveControlMode\n"); + if (ShouldSkip("PCC.S.F05 && PCC.S.A0012")) { + NextTest(); + return; + } + err = TestReadsTheAttributeEffectiveControlMode_14(); break; } @@ -68752,6 +66182,39 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -68765,7 +66228,7 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 15; chip::Optional mNodeId; chip::Optional mCluster; @@ -68780,357 +66243,336 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR - TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1() + CHIP_ERROR TestWrite0ToTheOperationModeAttributeToDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " - @"inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " - @"InputType (InputType Enums), Name (type: Strings), and Description(Type:String) Error: %@", - err); + id operationModeArgument; + operationModeArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOperationModeWithValue:operationModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 0 to the OperationMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestShowInputStatusCommand_2() + CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster showInputStatusWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Show Input Status Command Error: %@", err); + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: EffectiveOperationMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 0U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestHideInputStatusCommand_3() + CHIP_ERROR TestWrite0ToTheControlModeAttributeToDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster hideInputStatusWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Hide Input Status Command Error: %@", err); + id controlModeArgument; + controlModeArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeControlModeWithValue:controlModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 0 to the ControlMode attribute to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 0U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MEDIAINPUT_3_13() - : TestCommandBridge("Test_TC_MEDIAINPUT_3_13") - , mTestIndex(0) + CHIP_ERROR TestWrite1ToTheControlModeAttributeToDut_5() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("Index", 0, UINT8_MAX, &mIndex); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MEDIAINPUT_3_13() {} + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - /////////// TestCommand Interface ///////// - void NextTest() override + id controlModeArgument; + controlModeArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeControlModeWithValue:controlModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 1 to the ControlMode attribute to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_6() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAINPUT_3_13\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAINPUT_3_13\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : TH reads the InputList attribute from the DUT to show list of Inputs available\n"); - if (ShouldSkip("MEDIAINPUT.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_1(); - break; - case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : TH sends a RenameInput command to DUT to rename an input from the list returned in step 1\n"); - if (ShouldSkip("MEDIAINPUT.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestThSendsARenameInputCommandToDutToRenameAnInputFromTheListReturnedInStep1_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : TH reads the InputList attribute from the DUT to show list of Inputs available\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAINPUT.S.A0000 && MEDIAINPUT.S.C03.Rsp")) { - NextTest(); - return; + { + id actualValue = value; + VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 1U)); } - err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_3(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } + NextTest(); + }]; - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestWrite2ToTheControlModeAttributeToDut_7() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mIndex; - chip::Optional mTimeout; + id controlModeArgument; + controlModeArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster writeAttributeControlModeWithValue:controlModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 2 to the ControlMode attribute to DUT Error: %@", err); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_1() + CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available Error: %@", err); + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("inputList", "list", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 2U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsARenameInputCommandToDutToRenameAnInputFromTheListReturnedInStep1_2() + CHIP_ERROR TestWrite3ToTheControlModeAttributeToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRMediaInputClusterRenameInputParams alloc] init]; - params.index = mIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mIndex.Value()] : [NSNumber numberWithUnsignedChar:1U]; - params.name = @"A1"; - [cluster renameInputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a RenameInput command to DUT to rename an input from the list returned in step 1 " - @"Error: %@", - err); + id controlModeArgument; + controlModeArgument = [NSNumber numberWithUnsignedChar:3U]; + [cluster writeAttributeControlModeWithValue:controlModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 3 to the ControlMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_3() + CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_10() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); -class Test_TC_CHANNEL_5_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CHANNEL_5_1() - : TestCommandBridge("Test_TC_CHANNEL_5_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); - ~Test_TC_CHANNEL_5_1() {} + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - /////////// TestCommand Interface ///////// - void NextTest() override + { + id actualValue = value; + VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 3U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWrite5ToTheControlModeAttributeToDut_11() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CHANNEL_5_1\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CHANNEL_5_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + id controlModeArgument; + controlModeArgument = [NSNumber numberWithUnsignedChar:5U]; + [cluster writeAttributeControlModeWithValue:controlModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 5 to the ControlMode attribute to DUT Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : TH reads the ChannelList attribute from the DUT to show list of Inputs available and Verify " - "that the response contains a list of the known TV channels. Each list element should consist of the " - "following,Major number (unsigned 16-bit integer, mandatory),Minor number (unsigned 16-bit integer, " - "mandatory),Name (String, optional),Call sign (String, optional),Affiliate call sign (String, optional)\n"); - if (ShouldSkip("CHANNEL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheChannelListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyThatTheResponseContainsAListOfTheKnownTvChannelsEachListElementShouldConsistOfTheFollowingMajorNumberUnsigned16BitIntegerMandatoryMinorNumberUnsigned16BitIntegerMandatoryNameStringOptionalCallSignStringOptionalAffiliateCallSignStringOptional_1(); - break; - } + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_12() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 5U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestWrite7ToTheControlModeAttributeToDut_13() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + id controlModeArgument; + controlModeArgument = [NSNumber numberWithUnsignedChar:7U]; + [cluster writeAttributeControlModeWithValue:controlModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 7 to the ControlMode attribute to DUT Error: %@", err); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsTheChannelListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyThatTheResponseContainsAListOfTheKnownTvChannelsEachListElementShouldConsistOfTheFollowingMajorNumberUnsigned16BitIntegerMandatoryMinorNumberUnsigned16BitIntegerMandatoryNameStringOptionalCallSignStringOptionalAffiliateCallSignStringOptional_1() + CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ChannelList attribute from the DUT to show list of Inputs available and Verify that the response " - @"contains a list of the known TV channels. Each list element should consist of the following,Major number " - @"(unsigned 16-bit integer, mandatory),Minor number (unsigned 16-bit integer, mandatory),Name (String, " - @"optional),Call sign (String, optional),Affiliate call sign (String, optional) Error: %@", - err); + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 7U)); + } + NextTest(); }]; @@ -69138,23 +66580,21 @@ class Test_TC_CHANNEL_5_1 : public TestCommandBridge { } }; -class Test_TC_CHANNEL_5_2 : public TestCommandBridge { +class Test_TC_PCC_2_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CHANNEL_5_2() - : TestCommandBridge("Test_TC_CHANNEL_5_2") + Test_TC_PCC_2_4() + : TestCommandBridge("Test_TC_PCC_2_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); - AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CHANNEL_5_2() {} + ~Test_TC_PCC_2_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -69162,11 +66602,11 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CHANNEL_5_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CHANNEL_5_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -69183,38 +66623,100 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ChannelList attribute from the DUT\n"); - if (ShouldSkip("CHANNEL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Write 1 to the LifetimeRunningHours attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0015")) { NextTest(); return; } - err = TestThReadsTheChannelListAttributeFromTheDut_1(); + err = TestWrite1ToTheLifetimeRunningHoursAttributeToDut_1(); break; case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : TH sends a ChangeChannelByNumber command to the DUT with channel information (major and " - "minor numbers) from the list in step 1\n"); - if (ShouldSkip("CHANNEL.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the attribute: LifetimeRunningHours\n"); + if (ShouldSkip("PCC.S.A0015")) { NextTest(); return; } - err = TestThSendsAChangeChannelByNumberCommandToTheDutWithChannelInformationMajorAndMinorNumbersFromTheListInStep1_2(); + err = TestReadsTheAttributeLifetimeRunningHours_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Verify that the channel has changed on the device\n"); - if (ShouldSkip("PICS_USER_PROMPT && CHANNEL.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Write 2 to the LifetimeRunningHours attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0015")) { NextTest(); return; } - err = TestVerifyThatTheChannelHasChangedOnTheDevice_3(); + err = TestWrite2ToTheLifetimeRunningHoursAttributeToDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the CurrentChannel attribute from the DUT\n"); - if (ShouldSkip("CHANNEL.S.A0002 && CHANNEL.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the attribute: LifetimeRunningHours\n"); + if (ShouldSkip("PCC.S.A0015")) { NextTest(); return; } - err = TestThReadsTheCurrentChannelAttributeFromTheDut_4(); + err = TestReadsTheAttributeLifetimeRunningHours_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Write 3 to the LifetimeRunningHours attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0015")) { + NextTest(); + return; + } + err = TestWrite3ToTheLifetimeRunningHoursAttributeToDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the attribute: LifetimeRunningHours\n"); + if (ShouldSkip("PCC.S.A0015")) { + NextTest(); + return; + } + err = TestReadsTheAttributeLifetimeRunningHours_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Write 1 to the LifetimeEnergyConsumed attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0017")) { + NextTest(); + return; + } + err = TestWrite1ToTheLifetimeEnergyConsumedAttributeToDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the attribute: LifetimeEnergyConsumed\n"); + if (ShouldSkip("PCC.S.A0017")) { + NextTest(); + return; + } + err = TestReadsTheAttributeLifetimeEnergyConsumed_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Write 2 to the LifetimeEnergyConsumed attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0017")) { + NextTest(); + return; + } + err = TestWrite2ToTheLifetimeEnergyConsumedAttributeToDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the attribute: LifetimeEnergyConsumed\n"); + if (ShouldSkip("PCC.S.A0017")) { + NextTest(); + return; + } + err = TestReadsTheAttributeLifetimeEnergyConsumed_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Write 3 to the LifetimeEnergyConsumed attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0017")) { + NextTest(); + return; + } + err = TestWrite3ToTheLifetimeEnergyConsumedAttributeToDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the attribute: LifetimeEnergyConsumed\n"); + if (ShouldSkip("PCC.S.A0017")) { + NextTest(); + return; + } + err = TestReadsTheAttributeLifetimeEnergyConsumed_12(); break; } @@ -69242,6 +66744,30 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -69255,13 +66781,11 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mMajornumber; - chip::Optional mMinornumber; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -69272,82 +66796,295 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheChannelListAttributeFromTheDut_1() + CHIP_ERROR TestWrite1ToTheLifetimeRunningHoursAttributeToDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ChannelList attribute from the DUT Error: %@", err); + id lifetimeRunningHoursArgument; + lifetimeRunningHoursArgument = [NSNumber numberWithUnsignedInt:1UL]; + [cluster writeAttributeLifetimeRunningHoursWithValue:lifetimeRunningHoursArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 1 to the LifetimeRunningHours attribute to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheAttributeLifetimeRunningHours_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: LifetimeRunningHours Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "list", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); + VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 1UL)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAChangeChannelByNumberCommandToTheDutWithChannelInformationMajorAndMinorNumbersFromTheListInStep1_2() + CHIP_ERROR TestWrite2ToTheLifetimeRunningHoursAttributeToDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; - params.majorNumber = mMajornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMajornumber.Value()] - : [NSNumber numberWithUnsignedShort:9U]; - params.minorNumber = mMinornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMinornumber.Value()] - : [NSNumber numberWithUnsignedShort:1U]; - [cluster changeChannelByNumberWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a ChangeChannelByNumber command to the DUT with channel information " - @"(major and minor numbers) from the list in step 1 Error: %@", - err); + id lifetimeRunningHoursArgument; + lifetimeRunningHoursArgument = [NSNumber numberWithUnsignedInt:2UL]; + [cluster writeAttributeLifetimeRunningHoursWithValue:lifetimeRunningHoursArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 2 to the LifetimeRunningHours attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheChannelHasChangedOnTheDevice_3() + CHIP_ERROR TestReadsTheAttributeLifetimeRunningHours_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please enter 'y' if channel has changed on the devicegarbage: not in length on purpose", 53); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: LifetimeRunningHours Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); + VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 2UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheCurrentChannelAttributeFromTheDut_4() + CHIP_ERROR TestWrite3ToTheLifetimeRunningHoursAttributeToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletion:^( - MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the CurrentChannel attribute from the DUT Error: %@", err); + id lifetimeRunningHoursArgument; + lifetimeRunningHoursArgument = [NSNumber numberWithUnsignedInt:3UL]; + [cluster writeAttributeLifetimeRunningHoursWithValue:lifetimeRunningHoursArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 3 to the LifetimeRunningHours attribute to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheAttributeLifetimeRunningHours_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: LifetimeRunningHours Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); - VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue).majorNumber, - mMajornumber.HasValue() ? mMajornumber.Value() : 9U)); - VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue).minorNumber, - mMinornumber.HasValue() ? mMinornumber.Value() : 1U)); + VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); + VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 3UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWrite1ToTheLifetimeEnergyConsumedAttributeToDut_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id lifetimeEnergyConsumedArgument; + lifetimeEnergyConsumedArgument = [NSNumber numberWithUnsignedInt:1UL]; + [cluster + writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 1 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheAttributeLifetimeEnergyConsumed_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: LifetimeEnergyConsumed Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); + VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 1UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWrite2ToTheLifetimeEnergyConsumedAttributeToDut_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id lifetimeEnergyConsumedArgument; + lifetimeEnergyConsumedArgument = [NSNumber numberWithUnsignedInt:2UL]; + [cluster + writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 2 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheAttributeLifetimeEnergyConsumed_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: LifetimeEnergyConsumed Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); + VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 2UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWrite3ToTheLifetimeEnergyConsumedAttributeToDut_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id lifetimeEnergyConsumedArgument; + lifetimeEnergyConsumedArgument = [NSNumber numberWithUnsignedInt:3UL]; + [cluster + writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 3 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheAttributeLifetimeEnergyConsumed_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: LifetimeEnergyConsumed Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); + VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 3UL)); } NextTest(); @@ -69357,25 +67094,21 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { } }; -class Test_TC_CHANNEL_5_3 : public TestCommandBridge { +class Test_TC_PSCFG_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CHANNEL_5_3() - : TestCommandBridge("Test_TC_CHANNEL_5_3") + Test_TC_PSCFG_1_1() + : TestCommandBridge("Test_TC_PSCFG_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); - AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); - AddArgument("majornumber2", 0, UINT16_MAX, &mMajornumber2); - AddArgument("minornumber2", 0, UINT16_MAX, &mMinornumber2); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CHANNEL_5_3() {} + ~Test_TC_PSCFG_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -69383,11 +67116,11 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CHANNEL_5_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PSCFG_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CHANNEL_5_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PSCFG_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -69400,58 +67133,38 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Commission DUT to TH\n"); + err = TestCommissionDutToTh_0(); break; case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : TH reads the Lineup attribute from the DUT to show list of Inputs available and Verify that " - "the response contains a lineup info object\n"); - if (ShouldSkip("CHANNEL.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsTheLineupAttributeFromTheDutToShowListOfInputsAvailableAndVerifyThatTheResponseContainsALineupInfoObject_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); + err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the ChannelList attribute from the DUT\n"); - if (ShouldSkip("CHANNEL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheChannelListAttributeFromTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); + err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the CurrentChannel attribute from the DUT\n"); - if (ShouldSkip("CHANNEL.S.A0002")) { - NextTest(); - return; - } - err = TestThReadsTheCurrentChannelAttributeFromTheDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the AttributeList attribute from the DUT\n"); + err = TestThReadsTheAttributeListAttributeFromTheDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends a SkipChannel command to the DUT with a value of 1\n"); - if (ShouldSkip("CHANNEL.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestThSendsASkipChannelCommandToTheDutWithAValueOf1_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the AcceptedCommandList attribute from the DUT\n"); + err = TestThReadsTheAcceptedCommandListAttributeFromTheDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Verify that the channel has changed on the device\n"); - if (ShouldSkip("PICS_USER_PROMPT && CHANNEL.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestVerifyThatTheChannelHasChangedOnTheDevice_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the GeneratedCommandList attribute from the DUT\n"); + err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the CurrentChannel attribute from the DUT\n"); - if (ShouldSkip("CHANNEL.S.A0002 && CHANNEL.S.C03.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " + "contain manufacturer specific event IDs.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsTheCurrentChannelAttributeFromTheDut_6(); + err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6(); break; } @@ -69503,13 +67216,9 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mMajornumber; - chip::Optional mMinornumber; - chip::Optional mMajornumber2; - chip::Optional mMinornumber2; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestCommissionDutToTh_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -69517,67 +67226,80 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR - TestThReadsTheLineupAttributeFromTheDutToShowListOfInputsAvailableAndVerifyThatTheResponseContainsALineupInfoObject_1() + CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the Lineup attribute from the DUT to show list of Inputs available and Verify that the response " - @"contains a lineup info object Error: %@", - err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheChannelListAttributeFromTheDut_2() + CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ChannelList attribute from the DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "list", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheCurrentChannelAttributeFromTheDut_3() + CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletion:^( - MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the CurrentChannel attribute from the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the AttributeList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); - VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue).majorNumber, - mMajornumber.HasValue() ? mMajornumber.Value() : 6U)); - VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue).minorNumber, - mMinornumber.HasValue() ? mMinornumber.Value() : 0U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -69585,64 +67307,180 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsASkipChannelCommandToTheDutWithAValueOf1_4() + CHIP_ERROR TestThReadsTheAcceptedCommandListAttributeFromTheDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRChannelClusterSkipChannelParams alloc] init]; - params.count = [NSNumber numberWithShort:1]; - [cluster skipChannelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a SkipChannel command to the DUT with a value of 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the AcceptedCommandList attribute from the DUT Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - return CHIP_NO_ERROR; - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } - CHIP_ERROR TestVerifyThatTheChannelHasChangedOnTheDevice_5() - { + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please enter 'y' if channel has changed on the devicegarbage: not in length on purpose", 53); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheCurrentChannelAttributeFromTheDut_6() + CHIP_ERROR TestThReadsTheGeneratedCommandListAttributeFromTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletion:^( - MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the CurrentChannel attribute from the DUT Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the GeneratedCommandList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); - VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue).majorNumber, - mMajornumber2.HasValue() ? mMajornumber2.Value() : 9U)); - VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue).minorNumber, - mMinornumber2.HasValue() ? mMinornumber2.Value() : 1U)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentChannel", "ChannelInfoStruct", "ChannelInfoStruct")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; + +class Test_TC_PSCFG_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_PSCFG_2_1() + : TestCommandBridge("Test_TC_PSCFG_2_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_PSCFG_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PSCFG_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PSCFG_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Commission DUT to TH\n"); + err = TestCommissionDutToTh_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the Sources attribute from the DUT\n"); + if (ShouldSkip("PSCFG.S.A0000")) { + NextTest(); + return; } + err = TestThReadsTheSourcesAttributeFromTheDut_1(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestCommissionDutToTh_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheSourcesAttributeFromTheDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSourcesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the Sources attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("sources", "list", "list")); NextTest(); }]; @@ -69650,11 +67488,11 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { } }; -class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { +class Test_TC_RH_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MEDIAPLAYBACK_6_1() - : TestCommandBridge("Test_TC_MEDIAPLAYBACK_6_1") + Test_TC_RH_1_1() + : TestCommandBridge("Test_TC_RH_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -69664,7 +67502,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MEDIAPLAYBACK_6_1() {} + ~Test_TC_RH_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -69672,11 +67510,11 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAPLAYBACK_6_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_RH_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAPLAYBACK_6_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RH_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -69693,93 +67531,42 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read ClusterRevision attribute from the DUT\n"); + err = TestReadClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestReadsTheCurrentStateAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read FeatureMap attribute from the DUT\n"); + err = TestReadFeatureMapAttributeFromTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a Play command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestSendsAPlayCommand_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Verify that the media state is playing\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(Tolerance) in AttributeList\n"); + if (ShouldSkip("RH.S.A0003")) { NextTest(); return; } - err = TestVerifyThatTheMediaStateIsPlaying_4(); + err = TestReadTheOptionalAttributeToleranceInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestReadsTheCurrentStateAttribute_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : sends a Pause command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestSendsAPauseCommand_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Verify that the media is paused\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestVerifyThatTheMediaIsPaused_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp && MEDIAPLAYBACK.S.A0000")) { - NextTest(); - return; - } - err = TestReadsTheCurrentStateAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Sends a Stop command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C02.Rsp")) { - NextTest(); - return; - } - err = TestSendsAStopCommand_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Verify that the media is stoped\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C02.Rsp")) { - NextTest(); - return; - } - err = TestVerifyThatTheMediaIsStoped_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C02.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " + "contain manufacturer specific event IDs.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadsTheCurrentStateAttribute_11(); + err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); break; } @@ -69816,18 +67603,6 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -69841,7 +67616,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -69856,68 +67631,82 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() + CHIP_ERROR TestReadClusterRevisionAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentStateAttribute_2() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentState attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentState", actualValue, 1U)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAPlayCommand_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Play command Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -69925,87 +67714,240 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheMediaStateIsPlaying_4() + CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentStateAttribute_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentState attribute Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAPauseCommand_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"sends a Pause command Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheMediaIsPaused_7() + CHIP_ERROR + TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' if media state is pausedgarbage: not in length on purpose", 41); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } +}; - CHIP_ERROR TestReadsTheCurrentStateAttribute_8() +class Test_TC_RH_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_RH_2_1() + : TestCommandBridge("Test_TC_RH_2_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_RH_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_RH_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RH_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the MinMeasuredValue attribute from the DUT\n"); + if (ShouldSkip("RH.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsTheMinMeasuredValueAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the MaxMeasuredValue attribute from the DUT\n"); + if (ShouldSkip("RH.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsTheMaxMeasuredValueAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the MeasuredValue attribute from the DUT\n"); + if (ShouldSkip("RH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheMeasuredValueAttributeFromTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the Tolerance attribute from the DUT\n"); + if (ShouldSkip("RH.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsTheToleranceAttributeFromTheDut_4(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 5; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheMinMeasuredValueAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentState attribute Error: %@", err); + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the MinMeasuredValue attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentState", actualValue, 1U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 9999U)); } NextTest(); @@ -70014,21 +67956,25 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAStopCommand_9() + CHIP_ERROR TestThReadsTheMaxMeasuredValueAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Stop command Error: %@", err); + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the MaxMeasuredValue attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 10000U)); } NextTest(); @@ -70037,32 +67983,50 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheMediaIsStoped_10() + CHIP_ERROR TestThReadsTheMeasuredValueAttributeFromTheDut_3() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' if media state is stopedgarbage: not in length on purpose", 41); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the MeasuredValue attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 10000U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentStateAttribute_11() + CHIP_ERROR TestThReadsTheToleranceAttributeFromTheDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentState attribute Error: %@", err); + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the Tolerance attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentState", actualValue, 2U)); - } + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); NextTest(); }]; @@ -70071,11 +68035,11 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { } }; -class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { +class Test_TC_SC_5_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MEDIAPLAYBACK_6_2() - : TestCommandBridge("Test_TC_MEDIAPLAYBACK_6_2") + Test_TC_SC_5_1() + : TestCommandBridge("Test_TC_SC_5_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -70085,7 +68049,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MEDIAPLAYBACK_6_2() {} + ~Test_TC_SC_5_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -70093,11 +68057,11 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAPLAYBACK_6_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_5_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAPLAYBACK_6_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_5_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -70114,141 +68078,228 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the commissioner node ID\n"); + err = TestReadTheCommissionerNodeId_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH adds ACL Operate privileges for Group 0x0103\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestReadsTheCurrentStateAttributeFromTheDut_2(); + err = TestThAddsAclOperatePrivilegesForGroup0x0103_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a Play command to the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH adds ACL Operate privileges for Group 0x0103\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestSendsAPlayCommandToTheDut_3(); + err = TestThAddsAclOperatePrivilegesForGroup0x0103_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Verify that the media state is playing\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends KeySetWrite command with incorrect key\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestVerifyThatTheMediaStateIsPlaying_4(); + err = TestThSendsKeySetWriteCommandWithIncorrectKey_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends KeySetWrite command with incorrect key\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadsTheCurrentStateAttribute_5(); + err = TestThSendsKeySetWriteCommandWithIncorrectKey_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Sends a StartOver command to the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C03.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends KeySetWrite command with TH key\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestSendsAStartOverCommandToTheDut_6(); + err = TestThSendsKeySetWriteCommandWithThKey_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Verify that the media is started over\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C03.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends KeySetWrite command with TH key\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestVerifyThatTheMediaIsStartedOver_7(); + err = TestThSendsKeySetWriteCommandWithThKey_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Next command to the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C05.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH binds GroupId to GroupKeySet\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestSendsANextCommandToTheDut_8(); + err = TestThBindsGroupIdToGroupKeySet_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Verify that the next media item in the queue has been loaded\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C05.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH binds GroupId to GroupKeySet\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestVerifyThatTheNextMediaItemInTheQueueHasBeenLoaded_9(); + err = TestThBindsGroupIdToGroupKeySet_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Sends a Previous command to the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C04.Rsp")) { - NextTest(); - return; - } - err = TestSendsAPreviousCommandToTheDut_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends RemoveAllGroups command\n"); + err = TestThSendsRemoveAllGroupsCommand_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Verify that the previous media item in the queue has been loaded\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C04.Rsp")) { - NextTest(); - return; - } - err = TestVerifyThatThePreviousMediaItemInTheQueueHasBeenLoaded_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends AddGroup command\n"); + err = TestThSendsAddGroupCommand_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Sends a SkipForward command to the DUT \n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C08.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends ViewGroup command\n"); + if (ShouldSkip("G.S.F00")) { NextTest(); return; } - err = TestSendsASkipForwardCommandToTheDut_12(); + err = TestThSendsViewGroupCommand_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Verify that the media has skipped forward 10 seconds\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C08.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends ViewGroup command\n"); + if (ShouldSkip("!(G.S.F00)")) { NextTest(); return; } - err = TestVerifyThatTheMediaHasSkippedForward10Seconds_13(); + err = TestThSendsViewGroupCommand_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the SampledPosition attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C08.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends KeySetRead\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestReadsTheSampledPositionAttributeFromTheDut_14(); + err = TestThSendsKeySetRead_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Sends a SkipBackward command to the DUT \n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C09.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends KeySetRead\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestSendsASkipBackwardCommandToTheDut_15(); + err = TestThSendsKeySetRead_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Verify that the media has skipped backward 10 seconds\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C09.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestVerifyThatTheMediaHasSkippedBackward10Seconds_16(); + err = TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads the SampledPosition attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C09.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadsTheSampledPositionAttributeFromTheDut_17(); + err = TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads GroupTable attribute\n"); + if (ShouldSkip("G.S.F00 && PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestThReadsGroupTableAttribute_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads GroupTable attribute\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && G.S.F00")) { + NextTest(); + return; + } + err = TestThReadsGroupTableAttribute_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads GroupTable attribute\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY && !G.S.F00")) { + NextTest(); + return; + } + err = TestThReadsGroupTableAttribute_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads GroupTable attribute\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && !G.S.F00")) { + NextTest(); + return; + } + err = TestThReadsGroupTableAttribute_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH removes the GroupKeySet\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestThRemovesTheGroupKeySet_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH removes the GroupKeySet\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThRemovesTheGroupKeySet_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH verifies the corresponding GroupKeyMap entry has been removed\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : TH verifies the corresponding GroupKeyMap entry has been removed\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH cleans up groups using RemoveAllGroups command\n"); + err = TestThCleansUpGroupsUsingRemoveAllGroupsCommand_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : TH verifies the group has been removed in the GroupTable\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TH verifies the group has been removed in the GroupTable\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : TH removes ACL Operate privileges for Group 0x0103\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestThRemovesAclOperatePrivilegesForGroup0x0103_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : TH removes ACL Operate privileges for Group 0x0103\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThRemovesAclOperatePrivilegesForGroup0x0103_30(); break; } @@ -70315,6 +68366,45 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -70328,7 +68418,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 31; chip::Optional mNodeId; chip::Optional mCluster; @@ -70342,715 +68432,720 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSNumber * _Nonnull commissionerNodeId; - CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() + CHIP_ERROR TestReadTheCommissionerNodeId_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; + return GetCommissionerNodeId("alpha", value, ^(const chip::GetCommissionerNodeIdResponse & values) { { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + commissionerNodeId = [[NSNumber alloc] initWithUnsignedLongLong:values.nodeId]; } - NextTest(); - }]; - - return CHIP_NO_ERROR; + }); } - CHIP_ERROR TestReadsTheCurrentStateAttributeFromTheDut_2() + CHIP_ERROR TestThAddsAclOperatePrivilegesForGroup0x0103_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentState attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentState", actualValue, 1U)); + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [commissionerNodeId copy]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; } + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsAPlayCommandToTheDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Play command to the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3U]; { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:259ULL]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; } + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - NextTest(); - }]; + aclArgument = temp_0; + } + [cluster writeAttributeACLWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH adds ACL Operate privileges for Group 0x0103 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheMediaStateIsPlaying_4() + CHIP_ERROR TestThAddsAclOperatePrivilegesForGroup0x0103_3() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsTheCurrentStateAttribute_5() + CHIP_ERROR TestThSendsKeySetWriteCommandWithIncorrectKey_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentState attribute Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:419U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:111ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:222ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:333ULL]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends KeySetWrite command with incorrect key Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAStartOverCommandToTheDut_6() + CHIP_ERROR TestThSendsKeySetWriteCommandWithIncorrectKey_5() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThSendsKeySetWriteCommandWithThKey_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - startOverWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a StartOver command to the DUT Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:419U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:2220000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:2220001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:2220002ULL]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends KeySetWrite command with TH key Error: %@", err); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheMediaIsStartedOver_7() + CHIP_ERROR TestThSendsKeySetWriteCommandWithThKey_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' if media is started overgarbage: not in length on purpose", 41); + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - CHIP_ERROR TestSendsANextCommandToTheDut_8() + CHIP_ERROR TestThBindsGroupIdToGroupKeySet_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster nextWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Next command to the DUT Error: %@", err); + id groupKeyMapArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:259U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + groupKeyMapArgument = temp_0; + } + [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH binds GroupId to GroupKeySet Error: %@", err); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheNextMediaItemInTheQueueHasBeenLoaded_9() + CHIP_ERROR TestThBindsGroupIdToGroupKeySet_9() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if media item in the queue has been loadedgarbage: not in length on purpose", 59); + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - CHIP_ERROR TestSendsAPreviousCommandToTheDut_10() + CHIP_ERROR TestThSendsRemoveAllGroupsCommand_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - previousWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Previous command to the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends RemoveAllGroups command Error: %@", err); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatThePreviousMediaItemInTheQueueHasBeenLoaded_11() + CHIP_ERROR TestThSendsAddGroupCommand_11() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if previous media item in the queue has been loadedgarbage: not in length on purpose", 68); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:259U]; + params.groupName = @"Test Group"; + [cluster addGroupWithParams:params + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends AddGroup command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsASkipForwardCommandToTheDut_12() + CHIP_ERROR TestThSendsViewGroupCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; - params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:10000ULL]; - [cluster - skipForwardWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a SkipForward command to the DUT Error: %@", err); + __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:259U]; + [cluster viewGroupWithParams:params + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends ViewGroup command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); + } - return CHIP_NO_ERROR; - } + { + id actualValue = values.groupName; + VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"Test Group")); + } - CHIP_ERROR TestVerifyThatTheMediaHasSkippedForward10Seconds_13() - { + NextTest(); + }]; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if media has skipped forward 10 secondsgarbage: not in length on purpose", 56); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheSampledPositionAttributeFromTheDut_14() + CHIP_ERROR TestThSendsViewGroupCommand_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the SampledPosition attribute from the DUT Error: %@", err); + __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:259U]; + [cluster viewGroupWithParams:params + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends ViewGroup command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); - VerifyOrReturn( - CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); - VerifyOrReturn( - CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 10000ULL)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); + } + + { + id actualValue = values.groupName; + VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"")); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsASkipBackwardCommandToTheDut_15() + CHIP_ERROR TestThSendsKeySetRead_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; - params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:10000ULL]; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; [cluster - skipBackwardWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a SkipBackward command to the DUT Error: %@", err); + keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends KeySetRead Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + { + id actualValue = values.groupKeySet; + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 419U)); + VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); + VerifyOrReturn(CheckValueNull( + "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); + VerifyOrReturn(CheckValue("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2220000ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); + VerifyOrReturn(CheckValue("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2220001ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); + VerifyOrReturn(CheckValue("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2220002ULL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheMediaHasSkippedBackward10Seconds_16() + CHIP_ERROR TestThSendsKeySetRead_15() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if media has skipped backward 10 secondsgarbage: not in length on purpose", 57); + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsTheSampledPositionAttributeFromTheDut_17() + CHIP_ERROR TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the SampledPosition attribute from the DUT Error: %@", err); + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupKeyMapWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); - VerifyOrReturn( - CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); - VerifyOrReturn( - CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 0ULL)); - } + { + id actualValue = value; + VerifyOrReturn( + CheckValue("GroupKeyMap", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 259U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, + 419U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, + 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } -}; -class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MEDIAPLAYBACK_6_3() - : TestCommandBridge("Test_TC_MEDIAPLAYBACK_6_3") - , mTestIndex(0) + CHIP_ERROR TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_17() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("SeekPosition", 0, UINT64_MAX, &mSeekPosition); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MEDIAPLAYBACK_6_3() {} + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestThReadsGroupTableAttribute_18() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAPLAYBACK_6_3\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAPLAYBACK_6_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GroupTable attribute Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a Seek command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0b.Rsp")) { - NextTest(); - return; - } - err = TestSendsASeekCommand_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Verify that the media has moved to 10 seconds from the starting point\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0b.Rsp")) { - NextTest(); - return; - } - err = TestVerifyThatTheMediaHasMovedTo10SecondsFromTheStartingPoint_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the SampledPosition attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C0b.Rsp")) { - NextTest(); - return; - } - err = TestReadsTheSampledPositionAttribute_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the StartTime attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0001 && PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheStartTimeAttributeFromTheDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the SeekRangeEnd attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0005")) { - NextTest(); - return; - } - err = TestThReadsTheSeekRangeEndAttributeFromTheDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads the SeekRangeStart attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0006")) { - NextTest(); - return; - } - err = TestThReadsTheSeekRangeStartAttributeFromTheDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads the Duration attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0002")) { - NextTest(); - return; - } - err = TestThReadsTheDurationAttributeFromTheDut_8(); - break; - case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : Sends a Seek command Position value beyond the furthest valid position\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0b.Rsp")) { - NextTest(); - return; - } - err = TestSendsASeekCommandPositionValueBeyondTheFurthestValidPosition_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : verify that the media has not moved.\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0b.Rsp")) { - NextTest(); - return; - } - err = TestVerifyThatTheMediaHasNotMoved_10(); - break; - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 259U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[0]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], + mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, + @"Test Group")); + } - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + NextTest(); + }]; + + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestThReadsGroupTableAttribute_19() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestThReadsGroupTableAttribute_20() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mSeekPosition; - chip::Optional mTimeout; + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GroupTable attribute Error: %@", err); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 259U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[0]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], + mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, @"")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsGroupTableAttribute_21() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() + CHIP_ERROR TestThRemovesTheGroupKeySet_22() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; + [cluster keySetRemoveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH removes the GroupKeySet Error: %@", err); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsASeekCommand_2() + CHIP_ERROR TestThRemovesTheGroupKeySet_23() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_24() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; - params.position = [NSNumber numberWithUnsignedLongLong:10000ULL]; - [cluster seekWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Seek command Error: %@", err); + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupKeyMapWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH verifies the corresponding GroupKeyMap entry has been removed Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + { + id actualValue = value; + VerifyOrReturn( + CheckValue("GroupKeyMap", [actualValue count], static_cast(0))); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheMediaHasMovedTo10SecondsFromTheStartingPoint_3() + CHIP_ERROR TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_25() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if media has moved to 10 seconds from the starting pointgarbage: not in length on purpose", 73); + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsTheSampledPositionAttribute_4() + CHIP_ERROR TestThCleansUpGroupsUsingRemoveAllGroupsCommand_26() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the SampledPosition attribute Error: %@", err); + [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH cleans up groups using RemoveAllGroups command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); - VerifyOrReturn( - CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); - VerifyOrReturn( - CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 10000ULL)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheStartTimeAttributeFromTheDut_5() + CHIP_ERROR TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_27() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestThReadsTheSeekRangeEndAttributeFromTheDut_6() - { + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH verifies the group has been removed in the GroupTable Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestThReadsTheSeekRangeStartAttributeFromTheDut_7() - { + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(0))); + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheDurationAttributeFromTheDut_8() + CHIP_ERROR TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_28() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - CHIP_ERROR TestSendsASeekCommandPositionValueBeyondTheFurthestValidPosition_9() + CHIP_ERROR TestThRemovesAclOperatePrivilegesForGroup0x0103_29() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; - params.position = mSeekPosition.HasValue() ? [NSNumber numberWithUnsignedLongLong:mSeekPosition.Value()] - : [NSNumber numberWithUnsignedLongLong:100000000ULL]; - [cluster seekWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Seek command Position value beyond the furthest valid position Error: %@", err); + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [commissionerNodeId copy]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + aclArgument = temp_0; + } + [cluster writeAttributeACLWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH removes ACL Operate privileges for Group 0x0103 Error: %@", err); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 5U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheMediaHasNotMoved_10() + CHIP_ERROR TestThRemovesAclOperatePrivilegesForGroup0x0103_30() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' if media has not movedgarbage: not in length on purpose", 39); + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } }; -class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { +class Test_TC_SWTCH_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MEDIAPLAYBACK_6_4() - : TestCommandBridge("Test_TC_MEDIAPLAYBACK_6_4") + Test_TC_SWTCH_1_1() + : TestCommandBridge("Test_TC_SWTCH_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -71060,7 +69155,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MEDIAPLAYBACK_6_4() {} + ~Test_TC_SWTCH_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -71068,11 +69163,11 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAPLAYBACK_6_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWTCH_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAPLAYBACK_6_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWTCH_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -71089,183 +69184,145 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 2 : Read FeatureMap attribute and Check values of flags in this FeatureMap\n"); + if (ShouldSkip("!SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04")) { NextTest(); return; } - err = TestReadsTheCurrentStateAttributeFromTheDut_2(); + err = TestReadFeatureMapAttributeAndCheckValuesOfFlagsInThisFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Given SWTCH.S.F00(LS) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("SWTCH.S.F00")) { NextTest(); return; } - err = TestReadsThePlaybackSpeedAttributeFromTheDut_3(); + err = TestGivenSwtchsf00lsEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Sends a FastForward command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Given SWTCH.S.F01(MS) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("SWTCH.S.F01")) { NextTest(); return; } - err = TestSendsAFastForwardCommand_4(); + err = TestGivenSwtchsf01msEnsureFeaturemapHasTheCorrectBitSet_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : verify that the media state is playing\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Given SWTCH.S.F02(MSR) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("SWTCH.S.F02")) { NextTest(); return; } - err = TestVerifyThatTheMediaStateIsPlaying_5(); + err = TestGivenSwtchsf02msrEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C07.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Given SWTCH.S.F03(MSL) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("SWTCH.S.F03")) { NextTest(); return; } - err = TestReadsTheCurrentStateAttribute_6(); + err = TestGivenSwtchsf03mslEnsureFeaturemapHasTheCorrectBitSet_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Given SWTCH.S.F04(MSM) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("SWTCH.S.F04")) { NextTest(); return; } - err = TestReadsThePlaybackSpeedAttributeFromTheDut_7(); + err = TestGivenSwtchsf04msmEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a FastForward command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("SWTCH.S.F04")) { NextTest(); return; } - err = TestSendsAFastForwardCommand_8(); + err = TestReadTheGlobalAttributeAttributeList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : verify that the media play speed has increased.\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("!SWTCH.S.F04")) { NextTest(); return; } - err = TestVerifyThatTheMediaPlaySpeedHasIncreased_9(); + err = TestReadTheGlobalAttributeAttributeList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: EventList \n"); + if (ShouldSkip(" !SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 ")) { NextTest(); return; } - err = TestReadsThePlaybackSpeedAttributeFromTheDut_10(); - break; + NextTest(); + return; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Sends a Rewind command to the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Read EventList if SWTCH.S.F00(LS)\n"); + if (ShouldSkip("SWTCH.S.F00")) { NextTest(); return; } - err = TestSendsARewindCommandToTheDut_11(); - break; + NextTest(); + return; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : verify that the media play has reversed direction.\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C06.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Read EventList if SWTCH.S.F01(MS) & !SWTCH.S.F02(MSR)\n"); + if (ShouldSkip("SWTCH.S.F01 && !SWTCH.S.F02")) { NextTest(); return; } - err = TestVerifyThatTheMediaPlayHasReversedDirection_12(); - break; + NextTest(); + return; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C06.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 13 : Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & " + "!SWTCH.S.F04(MSM)\n"); + if (ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04")) { NextTest(); return; } - err = TestReadsTheCurrentStateAttribute_13(); - break; + NextTest(); + return; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C06.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & " + "!SWTCH.S.F04(MSM)\n"); + if (ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && !SWTCH.S.F04")) { NextTest(); return; } - err = TestReadsThePlaybackSpeedAttributeFromTheDut_14(); - break; + NextTest(); + return; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Sends a Rewind command to the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 15 : Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) " + "\n"); + if (ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && SWTCH.S.F04")) { NextTest(); return; } - err = TestSendsARewindCommandToTheDut_15(); - break; + NextTest(); + return; case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : verify that the media play speed has increased in the reverse direction.\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C06.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 16 : Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) " + "\n"); + if (ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && SWTCH.S.F04")) { NextTest(); return; } - err = TestVerifyThatTheMediaPlaySpeedHasIncreasedInTheReverseDirection_16(); - break; + NextTest(); + return; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C06.Rsp")) { - NextTest(); - return; - } - err = TestReadsThePlaybackSpeedAttributeFromTheDut_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Sends a Play command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestSendsAPlayCommand_18(); - break; - case 19: - ChipLogProgress( - chipTool, " ***** Test Step 19 : verify that the media is has resumed playing forward at the default speed.\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestVerifyThatTheMediaIsHasResumedPlayingForwardAtTheDefaultSpeed_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestReadsThePlaybackSpeedAttributeFromTheDut_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Sends consecutive FastForward commands\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp")) { - NextTest(); - return; - } - err = TestSendsConsecutiveFastForwardCommands_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Sends consecutive Rewind commands\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C06.Rsp")) { - NextTest(); - return; - } - err = TestSendsConsecutiveRewindCommands_22(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_18(); break; } @@ -71335,18 +69392,6 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -71360,7 +69405,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 23; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -71375,263 +69420,163 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentStateAttributeFromTheDut_2() + CHIP_ERROR TestReadFeatureMapAttributeAndCheckValuesOfFlagsInThisFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentState attribute from the DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read FeatureMap attribute and Check values of flags in this FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentState", actualValue, 1U)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_3() + CHIP_ERROR TestGivenSwtchsf00lsEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given SWTCH.S.F00(LS) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 0.0f)); - } - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAFastForwardCommand_4() + CHIP_ERROR TestGivenSwtchsf01msEnsureFeaturemapHasTheCorrectBitSet_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - fastForwardWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a FastForward command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given SWTCH.S.F01(MS) ensure featuremap has the correct bit set Error: %@", err); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheMediaStateIsPlaying_5() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadsTheCurrentStateAttribute_6() + CHIP_ERROR TestGivenSwtchsf02msrEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentState attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given SWTCH.S.F02(MSR) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); - } - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_7() + CHIP_ERROR TestGivenSwtchsf03mslEnsureFeaturemapHasTheCorrectBitSet_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given SWTCH.S.F03(MSL) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 1.0f)); - } - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAFastForwardCommand_8() + CHIP_ERROR TestGivenSwtchsf04msmEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - fastForwardWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a FastForward command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given SWTCH.S.F04(MSM) ensure featuremap has the correct bit set Error: %@", err); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheMediaPlaySpeedHasIncreased_9() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please enter 'y' if media play speed has increased.garbage: not in length on purpose", 51); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 2.0f)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsARewindCommandToTheDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster rewindWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Rewind command to the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyThatTheMediaPlayHasReversedDirection_12() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please enter 'y' if media play has reversed directiongarbage: not in length on purpose", 53); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadsTheCurrentStateAttribute_13() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentState attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); }]; @@ -71639,33 +69584,27 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_14() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please enter 'y' if PlaybackSpeed value is -1garbage: not in length on purpose", 45); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestSendsARewindCommandToTheDut_15() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster rewindWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Rewind command to the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -71673,122 +69612,65 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheMediaPlaySpeedHasIncreasedInTheReverseDirection_16() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if media play speed has increased in the reverse directiongarbage: not in length on purpose", 75); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_17() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please enter 'y' if PlaybackSpeed value is -2garbage: not in length on purpose", 45); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestSendsAPlayCommand_18() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Play command Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatTheMediaIsHasResumedPlayingForwardAtTheDefaultSpeed_19() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if media is has resumed playing forward at the default speedgarbage: not in length on purpose", 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_20() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 1.0f)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - - CHIP_ERROR TestSendsConsecutiveFastForwardCommands_21() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestSendsConsecutiveRewindCommands_22() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; -class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { +class Test_TC_TMP_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_AUDIOOUTPUT_7_1() - : TestCommandBridge("Test_TC_AUDIOOUTPUT_7_1") + Test_TC_TMP_1_1() + : TestCommandBridge("Test_TC_TMP_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("Index", 0, UINT8_MAX, &mIndex); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_AUDIOOUTPUT_7_1() {} + ~Test_TC_TMP_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -71796,11 +69678,11 @@ class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_AUDIOOUTPUT_7_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TMP_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_AUDIOOUTPUT_7_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TMP_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -71817,28 +69699,42 @@ class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OutputList attribute\n"); - if (ShouldSkip("AUDIOOUTPUT.S.A0000")) { - NextTest(); - return; - } - err = TestReadsTheOutputListAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read ClusterRevision attribute from the DUT\n"); + err = TestReadClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a SelectAudioOutput command\n"); - if (ShouldSkip("AUDIOOUTPUT.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read FeatureMap attribute from the DUT\n"); + err = TestReadFeatureMapAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(Tolerance) in AttributeList\n"); + if (ShouldSkip("TMP.S.A0003")) { NextTest(); return; } - err = TestSendsASelectAudioOutputCommand_2(); + err = TestReadTheOptionalAttributeToleranceInAttributeList_4(); break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentOutput attribute\n"); - if (ShouldSkip("AUDIOOUTPUT.S.A0001 && AUDIOOUTPUT.S.C00.Rsp")) { + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read AcceptedCommandList attribute from the DUT\n"); + err = TestReadAcceptedCommandListAttributeFromTheDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read GeneratedCommandList attribute from the DUT\n"); + err = TestReadGeneratedCommandListAttributeFromTheDut_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " + "contain manufacturer specific event IDs.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadsTheCurrentOutputAttribute_3(); + err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); break; } @@ -71863,6 +69759,18 @@ class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -71876,12 +69784,11 @@ class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mIndex; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -71892,242 +69799,166 @@ class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheOutputListAttribute_1() + CHIP_ERROR TestReadClusterRevisionAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OutputList attribute Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("outputList", "list", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsASelectAudioOutputCommand_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; - params.index = mIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mIndex.Value()] : [NSNumber numberWithUnsignedChar:1U]; - [cluster selectOutputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends a SelectAudioOutput command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheCurrentOutputAttribute_3() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentOutput attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentOutput", actualValue, mIndex.HasValue() ? mIndex.Value() : 1U)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_AUDIOOUTPUT_7_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_AUDIOOUTPUT_7_2() - : TestCommandBridge("Test_TC_AUDIOOUTPUT_7_2") - , mTestIndex(0) + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("Index", 0, UINT8_MAX, &mIndex); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_AUDIOOUTPUT_7_2() {} - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_AUDIOOUTPUT_7_2\n"); - } + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_AUDIOOUTPUT_7_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the OutputList attribute from the DUT\n"); - if (ShouldSkip("AUDIOOUTPUT.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheOutputListAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : TH sends a RenameOutput command to the DUT with an index from the list in step 1 and the " - "name 'CertTest'\n"); - if (ShouldSkip("AUDIOOUTPUT.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestThSendsARenameOutputCommandToTheDutWithAnIndexFromTheListInStep1AndTheNameCertTest_2(); - break; - case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : TH reads the OutputList attribute from the DUT. Verify that the output at the index provided " - "in step 2 has the name CertTest\n"); - if (ShouldSkip("PICS_USER_PROMPT && AUDIOOUTPUT.S.A0001 && AUDIOOUTPUT.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestThReadsTheOutputListAttributeFromTheDutVerifyThatTheOutputAtTheIndexProvidedInStep2HasTheNameCertTest_3(); - break; - } + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mIndex; - chip::Optional mTimeout; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - NSArray * _Nonnull audioOutputListValues; - CHIP_ERROR TestThReadsTheOutputListAttributeFromTheDut_1() + CHIP_ERROR TestReadAcceptedCommandListAttributeFromTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the OutputList attribute from the DUT Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read AcceptedCommandList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("outputList", "list", "list")); { - audioOutputListValues = value; + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsARenameOutputCommandToTheDutWithAnIndexFromTheListInStep1AndTheNameCertTest_2() + CHIP_ERROR TestReadGeneratedCommandListAttributeFromTheDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; - params.index = mIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mIndex.Value()] : [NSNumber numberWithUnsignedChar:1U]; - params.name = @"CertTest"; - [cluster renameOutputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a RenameOutput command to the DUT with an index from the list in step 1 and the " - @"name 'CertTest' Error: %@", - err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read GeneratedCommandList attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheOutputListAttributeFromTheDutVerifyThatTheOutputAtTheIndexProvidedInStep2HasTheNameCertTest_3() + CHIP_ERROR + TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -72138,22 +69969,21 @@ class Test_TC_AUDIOOUTPUT_7_2 : public TestCommandBridge { } }; -class Test_TC_TGTNAV_8_1 : public TestCommandBridge { +class Test_TC_TMP_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TGTNAV_8_1() - : TestCommandBridge("Test_TC_TGTNAV_8_1") + Test_TC_TMP_2_1() + : TestCommandBridge("Test_TC_TMP_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("targetvalue", 0, UINT8_MAX, &mTargetvalue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_TGTNAV_8_1() {} + ~Test_TC_TMP_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -72161,11 +69991,11 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TGTNAV_8_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TMP_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TGTNAV_8_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TMP_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -72182,36 +70012,36 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentTarget attribute\n"); - if (ShouldSkip("TGTNAV.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: MinMeasuredValue\n"); + if (ShouldSkip("TMP.S.A0001")) { NextTest(); return; } - err = TestReadsTheCurrentTargetAttribute_1(); + err = TestReadTheMandatoryAttributeMinMeasuredValue_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the TargetList attribute\n"); - if (ShouldSkip("TGTNAV.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MaxMeasuredValue\n"); + if (ShouldSkip("TMP.S.A0002")) { NextTest(); return; } - err = TestReadsTheTargetListAttribute_2(); + err = TestReadTheMandatoryAttributeMaxMeasuredValue_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a NavigateTarget command\n"); - if (ShouldSkip("TGTNAV.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute: MeasuredValue\n"); + if (ShouldSkip("TMP.S.A0000")) { NextTest(); return; } - err = TestSendsANavigateTargetCommand_3(); + err = TestReadTheMandatoryAttributeMeasuredValue_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentTarget attribute\n"); - if (ShouldSkip("TGTNAV.S.A0001 && TGTNAV.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute: Tolerance\n"); + if (ShouldSkip("TMP.S.A0003")) { NextTest(); return; } - err = TestReadsTheCurrentTargetAttribute_4(); + err = TestReadTheOptionalAttributeTolerance_4(); break; } @@ -72257,7 +70087,6 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTargetvalue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -72267,45 +70096,61 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestReadsTheCurrentTargetAttribute_1() + CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentTarget attribute Error: %@", err); + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MinMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentTarget", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentTarget", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentTarget", [value unsignedCharValue], 255U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value shortValue], -27315)); + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value shortValue], 32767)); + } + { + MinMeasuredValue = value; + } NextTest(); }]; return CHIP_NO_ERROR; } - NSArray * _Nonnull TargetListValues; + NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestReadsTheTargetListAttribute_2() + CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the TargetList attribute Error: %@", err); + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MaxMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("targetList", "list", "list")); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value shortValue], -27314)); + VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value shortValue], 32767)); + } { - TargetListValues = value; + MaxMeasuredValue = value; } NextTest(); @@ -72314,45 +70159,50 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsANavigateTargetCommand_3() + CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; - params.target = mTargetvalue.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue.Value()] - : [NSNumber numberWithUnsignedChar:1U]; - [cluster navigateTargetWithParams:params - completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Sends a NavigateTarget command Error: %@", err); + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MeasuredValue Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("measuredValue", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value shortValue], MinMeasuredValue)); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value shortValue], MaxMeasuredValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentTargetAttribute_4() + CHIP_ERROR TestReadTheOptionalAttributeTolerance_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentTarget attribute Error: %@", err); + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: Tolerance Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue.HasValue() ? mTargetvalue.Value() : 1U)); - } + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); NextTest(); }]; @@ -72361,11 +70211,11 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { } }; -class Test_TC_APBSC_9_1 : public TestCommandBridge { +class Test_TC_TSTAT_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_APBSC_9_1() - : TestCommandBridge("Test_TC_APBSC_9_1") + Test_TC_TSTAT_1_1() + : TestCommandBridge("Test_TC_TSTAT_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -72375,7 +70225,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_APBSC_9_1() {} + ~Test_TC_TSTAT_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -72383,11 +70233,11 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_APBSC_9_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APBSC_9_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -72404,68 +70254,201 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the VendorName attribute\n"); - if (ShouldSkip("APBSC.S.A0000")) { - NextTest(); - return; - } - err = TestReadsTheVendorNameAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the VendorID attribute\n"); - if (ShouldSkip("APBSC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("!TSTAT.S.F00 && !TSTAT.S.F01 && !TSTAT.S.F02 && !TSTAT.S.F03 && !TSTAT.S.F04 && !TSTAT.S.F05")) { NextTest(); return; } - err = TestReadsTheVendorIDAttribute_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the ApplicationName attribute\n"); - if (ShouldSkip("APBSC.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Given TSTAT.S.F00(HEAT ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestReadsTheApplicationNameAttribute_3(); + err = TestGivenTstatsf00heatEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the ProductID attribute\n"); - if (ShouldSkip("APBSC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Given TSTAT.S.F01(COOL) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestReadsTheProductIDAttribute_4(); + err = TestGivenTstatsf01coolEnsureFeaturemapHasTheCorrectBitSet_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the Application attribute\n"); - if (ShouldSkip("APBSC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Given TSTAT.S.F02(OCC) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TSTAT.S.F02")) { NextTest(); return; } - err = TestReadsTheApplicationAttribute_5(); + err = TestGivenTstatsf02occEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the Status attribute\n"); - if (ShouldSkip("APBSC.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Given TSTAT.S.F03(SCH) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestReadsTheStatusAttribute_6(); + err = TestGivenTstatsf03schEnsureFeaturemapHasTheCorrectBitSet_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the ApplicationVersion attribute\n"); - if (ShouldSkip("APBSC.S.A0006")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Given TSTAT.S.F04(SB) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TSTAT.S.F04")) { NextTest(); return; } - err = TestReadsTheApplicationVersionAttribute_7(); + err = TestGivenTstatsf04sbEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the AllowedVendorList attribute\n"); - if (ShouldSkip("APBSC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Given TSTAT.S.F05(AUTO) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestReadsTheAllowedVendorListAttribute_8(); + err = TestGivenTstatsf05autoEnsureFeaturemapHasTheCorrectBitSet_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_9(); + break; + case 10: + ChipLogProgress( + chipTool, " ***** Test Step 10 : Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_10(); + break; + case 11: + ChipLogProgress( + chipTool, " ***** Test Step 11 : Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_11(); + break; + case 12: + ChipLogProgress( + chipTool, " ***** Test Step 12 : Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F02")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_14(); + break; + case 15: + ChipLogProgress( + chipTool, " ***** Test Step 15 : Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F05")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_15(); + break; + case 16: + ChipLogProgress( + chipTool, " ***** Test Step 16 : Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F03")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_16(); + break; + case 17: + ChipLogProgress( + chipTool, " ***** Test Step 17 : Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F04")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_17(); + break; + case 18: + ChipLogProgress(chipTool, + " ***** Test Step 18 : Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_19(); + break; + case 20: + ChipLogProgress( + chipTool, " ***** Test Step 20 : Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList\n"); + if (ShouldSkip("TSTAT.S.F03")) { + NextTest(); + return; + } + err = TestReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip(" !TSTAT.S.C04.Rsp && !TSTAT.S.C02.Rsp ")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeGeneratedCommandList_21(); + break; + case 22: + ChipLogProgress( + chipTool, " ***** Test Step 22 : Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList\n"); + if (ShouldSkip("TSTAT.S.F03")) { + NextTest(); + return; + } + err = TestReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_22(); + break; + case 23: + ChipLogProgress( + chipTool, " ***** Test Step 23 : Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList\n"); + if (ShouldSkip("TSTAT.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_23(); + break; + case 24: + ChipLogProgress(chipTool, + " ***** Test Step 24 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " + "contain manufacturer specific event IDs.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_24(); break; } @@ -72505,6 +70488,54 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -72518,7 +70549,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 25; chip::Optional mNodeId; chip::Optional mCluster; @@ -72533,739 +70564,522 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheVendorNameAttribute_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the VendorName attribute Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("vendorName", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("vendorName", value, 32)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheVendorIDAttribute_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the VendorID attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("vendorID", "vendor_id", "vendor_id")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheApplicationNameAttribute_3() + CHIP_ERROR TestGivenTstatsf00heatEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ApplicationName attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given TSTAT.S.F00(HEAT ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("applicationName", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("applicationName", value, 256)); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheProductIDAttribute_4() + CHIP_ERROR TestGivenTstatsf01coolEnsureFeaturemapHasTheCorrectBitSet_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ProductID attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given TSTAT.S.F01(COOL) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("productID", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("productID", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("productID", [value unsignedShortValue], 65535U)); - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheApplicationAttribute_5() + CHIP_ERROR TestGivenTstatsf02occEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationWithCompletion:^( - MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Application attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given TSTAT.S.F02(OCC) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("application", "ApplicationStruct", "ApplicationStruct")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheStatusAttribute_6() + CHIP_ERROR TestGivenTstatsf03schEnsureFeaturemapHasTheCorrectBitSet_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Status attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given TSTAT.S.F03(SCH) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("status", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("status", [value unsignedCharValue], 3U)); - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheApplicationVersionAttribute_7() + CHIP_ERROR TestGivenTstatsf04sbEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ApplicationVersion attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given TSTAT.S.F04(SB) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("applicationVersion", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("applicationVersion", value, 32)); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAllowedVendorListAttribute_8() + CHIP_ERROR TestGivenTstatsf05autoEnsureFeaturemapHasTheCorrectBitSet_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the AllowedVendorList attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given TSTAT.S.F05(AUTO) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("allowedVendorList", "list", "list")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_CONTENTLAUNCHER_10_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CONTENTLAUNCHER_10_1() - : TestCommandBridge("Test_TC_CONTENTLAUNCHER_10_1") - , mTestIndex(0) + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_9() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CONTENTLAUNCHER_10_1() {} + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CONTENTLAUNCHER_10_1\n"); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CONTENTLAUNCHER_10_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 27UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 28UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - Wait(); + NextTest(); + }]; - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the AcceptHeader attribute from the DUT\n"); - if (ShouldSkip("CONTENTLAUNCHER.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheAcceptHeaderAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the SupportedStreamingProtocols attribute from the DUT\n"); - if (ShouldSkip("CONTENTLAUNCHER.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_10() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList Error: %@", err); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheAcceptHeaderAttributeFromTheDut_1() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the AcceptHeader attribute from the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptHeader", "list", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the SupportedStreamingProtocols attribute from the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("supportedStreamingProtocols", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_WAKEONLAN_4_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WAKEONLAN_4_1() - : TestCommandBridge("Test_TC_WAKEONLAN_4_1") - , mTestIndex(0) + CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_13() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WAKEONLAN_4_1() {} - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WAKEONLAN_4_1\n"); - } + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WAKEONLAN_4_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the MACAddress attribute from the DUT\n"); - if (ShouldSkip("WAKEONLAN.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheMACAddressAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends a Sleep command to DUT\n"); - if (ShouldSkip("LOWPOWER.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsASleepCommandToDut_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : TH sends a Wake-On LAN magic packet containing the MAC address from step 1\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThSendsAWakeOnLanMagicPacketContainingTheMacAddressFromStep1_3(); - break; - } + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_14() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheMACAddressAttributeFromTheDut_1() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the MACAddress attribute from the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinLength("MACAddress", value, 12)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 25UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsASleepCommandToDut_2() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster sleepWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends a Sleep command to DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 32UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 33UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 34UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAWakeOnLanMagicPacketContainingTheMacAddressFromStep1_3() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_17() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); -class Test_TC_ALOGIN_12_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ALOGIN_12_1() - : TestCommandBridge("Test_TC_ALOGIN_12_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("TempAccountIdentifier", &mTempAccountIdentifier); - AddArgument("catalogVendorId", 0, UINT16_MAX, &mCatalogVendorId); - AddArgument("applicationId", &mApplicationId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList Error: %@", err); - ~Test_TC_ALOGIN_12_1() {} + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - /////////// TestCommand Interface ///////// - void NextTest() override + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 52UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 53UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 54UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_18() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ALOGIN_12_1\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ALOGIN_12_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Launch an app with the provided a application ID\n"); - if (ShouldSkip("APPLAUNCHER.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestLaunchAnAppWithTheProvidedAApplicationId_1(); - break; - case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : TH sends a GetSetupPIN command to the DUT with test values provided by the product maker.\n"); - if (ShouldSkip("ALOGIN.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAGetSetupPINCommandToTheDutWithTestValuesProvidedByTheProductMaker_2(); - break; - case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : TH sends a Login command to the DUT with test values provided by the product maker.\n"); - if (ShouldSkip("ALOGIN.S.C02.Rsp")) { - NextTest(); - return; - } - err = TestThSendsALoginCommandToTheDutWithTestValuesProvidedByTheProductMaker_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH sends a Logout command to the DUT with test values provided by the product maker.\n"); - if (ShouldSkip("ALOGIN.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestThSendsALogoutCommandToTheDutWithTestValuesProvidedByTheProductMaker_4(); - break; - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 55UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 56UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 57UL)); - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + NextTest(); + }]; + + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_19() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTempAccountIdentifier; - chip::Optional mCatalogVendorId; - chip::Optional mApplicationId; - chip::Optional mTimeout; + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestLaunchAnAppWithTheProvidedAApplicationId_1() + CHIP_ERROR TestReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_20() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; - params.application = [[MTRApplicationLauncherClusterApplicationStruct alloc] init]; - ((MTRApplicationLauncherClusterApplicationStruct *) params.application).catalogVendorID = mCatalogVendorId.HasValue() - ? [NSNumber numberWithUnsignedShort:mCatalogVendorId.Value()] - : [NSNumber numberWithUnsignedShort:123U]; - ((MTRApplicationLauncherClusterApplicationStruct *) params.application).applicationID = mApplicationId.HasValue() - ? [[NSString alloc] initWithBytes:mApplicationId.Value().data() - length:mApplicationId.Value().size() - encoding:NSUTF8StringEncoding] - : @"exampleid"; - - params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; - [cluster - launchAppWithParams:params - completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch an app with the provided a application ID Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSString * _Nonnull setupPIN; - CHIP_ERROR TestThSendsAGetSetupPINCommandToTheDutWithTestValuesProvidedByTheProductMaker_2() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; - params.tempAccountIdentifier = mTempAccountIdentifier.HasValue() - ? [[NSString alloc] initWithBytes:mTempAccountIdentifier.Value().data() - length:mTempAccountIdentifier.Value().size() - encoding:NSUTF8StringEncoding] - : @"1111"; - [cluster - getSetupPINWithParams:params - completion:^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends a GetSetupPIN command to the DUT with test values provided by the product maker. " - @"Error: %@", - err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - setupPIN = values.setupPIN; - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsALoginCommandToTheDutWithTestValuesProvidedByTheProductMaker_3() + CHIP_ERROR TestReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_22() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRAccountLoginClusterLoginParams alloc] init]; - params.tempAccountIdentifier = mTempAccountIdentifier.HasValue() - ? [[NSString alloc] initWithBytes:mTempAccountIdentifier.Value().data() - length:mTempAccountIdentifier.Value().size() - encoding:NSUTF8StringEncoding] - : @"1111"; - params.setupPIN = [setupPIN copy]; - [cluster - loginWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a Login command to the DUT with test values provided by the product maker. Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 0UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsALogoutCommandToTheDutWithTestValuesProvidedByTheProductMaker_4() + CHIP_ERROR TestReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_23() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster logoutWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends a Logout command to the DUT with test values provided by the product maker. Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR + TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_24() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; -class Test_TC_MOD_1_1 : public TestCommandBridge { +class Test_TC_TSUIC_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MOD_1_1() - : TestCommandBridge("Test_TC_MOD_1_1") + Test_TC_TSUIC_1_1() + : TestCommandBridge("Test_TC_TSUIC_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -73275,7 +71089,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MOD_1_1() {} + ~Test_TC_TSUIC_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -73283,11 +71097,11 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -73304,58 +71118,34 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); - err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH read ClusterRevision attribute from the DUT\n"); + err = TestThReadClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); - if (ShouldSkip("MOD.S.F00")) { - NextTest(); - return; - } - err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read FeatureMap attribute from the DUT\n"); + err = TestReadFeatureMapAttributeFromTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the FeatureMap attribute from the DUT\n"); - if (ShouldSkip(" !MOD.S.F00 ")) { - NextTest(); - return; - } - err = TestThReadsTheFeatureMapAttributeFromTheDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the AttributeList attribute from the DUT\n"); - err = TestThReadsTheAttributeListAttributeFromTheDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : TH reads the optional attribute(StartUpMode) in AttributeList from the DUT\n"); - if (ShouldSkip("MOD.S.A0004")) { - NextTest(); - return; - } - err = TestThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : TH reads the optional attribute(OnMode) in AttributeList from the DUT\n"); - if (ShouldSkip("MOD.S.A0005")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " + "contain manufacturer specific event IDs.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsTheOptionalAttributeOnModeInAttributeListFromTheDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_9(); + err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6(); break; } @@ -73389,15 +71179,6 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -73411,7 +71192,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -73426,21 +71207,23 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() + CHIP_ERROR TestThReadClusterRevisionAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); + NSLog(@"TH read ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -73450,39 +71233,17 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_3() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); + NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -73498,15 +71259,17 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_4() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the AttributeList attribute from the DUT Error: %@", err); + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -73514,7 +71277,6 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -73528,98 +71290,39 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the optional attribute(StartUpMode) in AttributeList from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsTheOptionalAttributeOnModeInAttributeListFromTheDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the optional attribute(OnMode) in AttributeList from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_7() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_9() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -73638,31 +71341,34 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR + TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; -class OTA_SuccessfulTransfer : public TestCommandBridge { +class Test_TC_TSUIC_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - OTA_SuccessfulTransfer() - : TestCommandBridge("OTA_SuccessfulTransfer") + Test_TC_TSUIC_2_1() + : TestCommandBridge("Test_TC_TSUIC_2_1") , mTestIndex(0) { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("requestorNodeId", 0, UINT64_MAX, &mRequestorNodeId); - AddArgument("providerNodeId", 0, UINT64_MAX, &mProviderNodeId); - AddArgument("providerPayload", &mProviderPayload); - AddArgument("providerDiscriminator", 0, UINT16_MAX, &mProviderDiscriminator); - AddArgument("providerPort", 0, UINT16_MAX, &mProviderPort); - AddArgument("providerKvs", &mProviderKvs); - AddArgument("otaImageFilePath", &mOtaImageFilePath); - AddArgument("rawImageFilePath", &mRawImageFilePath); - AddArgument("rawImageContent", &mRawImageContent); - AddArgument("downloadImageFilePath", &mDownloadImageFilePath); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~OTA_SuccessfulTransfer() {} + ~Test_TC_TSUIC_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -73670,11 +71376,11 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: OTA_SuccessfulTransfer\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: OTA_SuccessfulTransfer\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -73687,48 +71393,32 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Create OTA image\n"); - err = TestCreateOtaImage_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Start the provider with an image\n"); - err = TestStartTheProviderWithAnImage_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: TemperatureDisplayMode\n"); + if (ShouldSkip("TSUIC.S.A0000")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeTemperatureDisplayMode_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Commission the provider from alpha\n"); - err = TestCommissionTheProviderFromAlpha_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: KeypadLockout\n"); + if (ShouldSkip("TSUIC.S.A0001")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeKeypadLockout_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait for the commissioned provider to be retrieved for alpha\n"); - err = TestWaitForTheCommissionedProviderToBeRetrievedForAlpha_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Install ACL for QueryImage\n"); - err = TestInstallAclForQueryImage_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Stop the requestor\n"); - err = TestStopTheRequestor_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Start the requestor with an OTA download path\n"); - err = TestStartTheRequestorWithAnOtaDownloadPath_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait for the commissioned requestor to be retrieved for alpha\n"); - err = TestWaitForTheCommissionedRequestorToBeRetrievedForAlpha_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Send an announce OTA provider command to the requestor\n"); - err = TestSendAnAnnounceOtaProviderCommandToTheRequestor_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait for transfer complete message\n"); - err = TestWaitForTransferCompleteMessage_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Compare original file to downloaded file\n"); - err = TestCompareOriginalFileToDownloadedFile_10(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the optional attribute: ScheduleProgrammingVisibility\n"); + if (ShouldSkip("TSUIC.S.A0002")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_3(); break; } @@ -73753,27 +71443,6 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -73787,199 +71456,99 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 4; + chip::Optional mNodeId; + chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mRequestorNodeId; - chip::Optional mProviderNodeId; - chip::Optional mProviderPayload; - chip::Optional mProviderDiscriminator; - chip::Optional mProviderPort; - chip::Optional mProviderKvs; - chip::Optional mOtaImageFilePath; - chip::Optional mRawImageFilePath; - chip::Optional mRawImageContent; - chip::Optional mDownloadImageFilePath; chip::Optional mTimeout; - CHIP_ERROR TestCreateOtaImage_0() - { - - chip::app::Clusters::SystemCommands::Commands::CreateOtaImage::Type value; - value.otaImageFilePath - = mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); - value.rawImageFilePath - = mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); - value.rawImageContent - = mRawImageContent.HasValue() ? mRawImageContent.Value() : chip::Span("Have a hootenanny!", 18); - return CreateOtaImage("alpha", value); - } - - CHIP_ERROR TestStartTheProviderWithAnImage_1() - { - - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("chip-ota-provider-appgarbage: not in length on purpose", 21); - value.discriminator.Emplace(); - value.discriminator.Value() = mProviderDiscriminator.HasValue() ? mProviderDiscriminator.Value() : 50U; - value.port.Emplace(); - value.port.Value() = mProviderPort.HasValue() ? mProviderPort.Value() : 5560U; - value.kvs.Emplace(); - value.kvs.Value() = mProviderKvs.HasValue() ? mProviderKvs.Value() : chip::Span("/tmp/chip_kvs_provider", 22); - value.filepath.Emplace(); - value.filepath.Value() - = mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); - return Start("alpha", value); - } - - CHIP_ERROR TestCommissionTheProviderFromAlpha_2() - { - - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; - value.payload - = mProviderPayload.HasValue() ? mProviderPayload.Value() : chip::Span("MT:-24J0IX4122-.548G00", 22); - return PairWithCode("alpha", value); - } - - CHIP_ERROR TestWaitForTheCommissionedProviderToBeRetrievedForAlpha_3() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestInstallAclForQueryImage_4() + CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = nil; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [[MTRAccessControlClusterAccessControlTargetStruct alloc] init]; - ((MTRAccessControlClusterAccessControlTargetStruct *) temp_3[0]).cluster = [NSNumber numberWithUnsignedInt:41UL]; - ((MTRAccessControlClusterAccessControlTargetStruct *) temp_3[0]).endpoint = nil; - ((MTRAccessControlClusterAccessControlTargetStruct *) temp_3[0]).deviceType = nil; - - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = temp_3; - } - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: TemperatureDisplayMode Error: %@", err); - aclArgument = temp_0; - } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Install ACL for QueryImage Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("temperatureDisplayMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("temperatureDisplayMode", [value unsignedCharValue], 1U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStopTheRequestor_5() + CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_2() { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestStartTheRequestorWithAnOtaDownloadPath_6() - { + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: KeypadLockout Error: %@", err); - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.otaDownloadPath.Emplace(); - value.otaDownloadPath.Value() = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() - : chip::Span("/tmp/downloadedImage", 20); - return Start("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestWaitForTheCommissionedRequestorToBeRetrievedForAlpha_7() - { + VerifyOrReturn(CheckConstraintType("keypadLockout", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("keypadLockout", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("keypadLockout", [value unsignedCharValue], 5U)); - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mRequestorNodeId.HasValue() ? mRequestorNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestSendAnAnnounceOtaProviderCommandToTheRequestor_8() + CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; - params.providerNodeID = mProviderNodeId.HasValue() ? [NSNumber numberWithUnsignedLongLong:mProviderNodeId.Value()] - : [NSNumber numberWithUnsignedLongLong:12648430ULL]; - params.vendorID = [NSNumber numberWithUnsignedShort:0U]; - params.announcementReason = [NSNumber numberWithUnsignedChar:0U]; - params.endpoint - = mEndpoint.HasValue() ? [NSNumber numberWithUnsignedShort:mEndpoint.Value()] : [NSNumber numberWithUnsignedShort:0U]; - [cluster announceOTAProviderWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Send an announce OTA provider command to the requestor Error: %@", err); + [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("scheduleProgrammingVisibility", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("scheduleProgrammingVisibility", [value unsignedCharValue], 1U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestWaitForTransferCompleteMessage_9() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMessage::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); - value.message = chip::Span("OTA image downloadedgarbage: not in length on purpose", 20); - return WaitForMessage("alpha", value); - } - - CHIP_ERROR TestCompareOriginalFileToDownloadedFile_10() - { - - chip::app::Clusters::SystemCommands::Commands::CompareFiles::Type value; - value.file1 = mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); - value.file2 = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() - : chip::Span("/tmp/downloadedImage", 20); - return CompareFiles("alpha", value); - } -}; - -class Test_TC_OCC_1_1 : public TestCommandBridge { +class Test_TC_TSUIC_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OCC_1_1() - : TestCommandBridge("Test_TC_OCC_1_1") + Test_TC_TSUIC_2_2() + : TestCommandBridge("Test_TC_TSUIC_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -73989,7 +71558,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_OCC_1_1() {} + ~Test_TC_TSUIC_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -73997,11 +71566,11 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -74018,380 +71587,298 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Writes a value of 0 to TemperatureDisplayMode attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0000")) { + NextTest(); + return; + } + err = TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Verify device temperature displayed in °C\n"); + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0000")) { + NextTest(); + return; + } + err = TestVerifyDeviceTemperatureDisplayedInc_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the TemperatureDisplayMode attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheTemperatureDisplayModeAttributeOfDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Writes a value of 1 to TemperatureDisplayMode attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0000")) { + NextTest(); + return; + } + err = TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Verify device temperature displayed in °F\n"); + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0000")) { + NextTest(); + return; + } + err = TestVerifyDeviceTemperatureDisplayedInf_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the TemperatureDisplayMode attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheTemperatureDisplayModeAttributeOfDut_6(); break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 7: + ChipLogProgress( + chipTool, " ***** Test Step 7 : Writes a value of greater than 1 to TemperatureDisplayMode attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0000")) { + NextTest(); + return; + } + err = TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_7(); break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads the TemperatureDisplayMode attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheTemperatureDisplayModeAttributeOfDut_8(); break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Writes a value of 0 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { + NextTest(); + return; + } + err = TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_9(); break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Verify all device functionality available to the user\n"); + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { + NextTest(); + return; + } + err = TestVerifyAllDeviceFunctionalityAvailableToTheUser_10(); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads the KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsTheKeypadLockoutAttributeOfDut_11(); break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Writes a value of 1 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { + NextTest(); + return; + } + err = TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_12(); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Verify device operates at Level 1 reduced functionality\n"); + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { + NextTest(); + return; + } + err = TestVerifyDeviceOperatesAtLevel1ReducedFunctionality_13(); break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads the KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { + NextTest(); + return; } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + err = TestThReadsTheKeypadLockoutAttributeOfDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Writes a value of 2 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { + NextTest(); + return; } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + err = TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Verify device operates at Level 2 reduced functionality\n"); + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { + NextTest(); + return; } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + err = TestVerifyDeviceOperatesAtLevel2ReducedFunctionality_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads the KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { + NextTest(); + return; } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + err = TestThReadsTheKeypadLockoutAttributeOfDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Writes a value of 3 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { + NextTest(); + return; } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OCC_2_1() - : TestCommandBridge("Test_TC_OCC_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_OCC_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + err = TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_18(); break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attribute constrains: Occupancy\n"); - if (ShouldSkip("OCC.S.A0000")) { + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Verify device operates at Level 3 reduced functionality\n"); + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } - err = TestReadsMandatoryAttributeConstrainsOccupancy_1(); + err = TestVerifyDeviceOperatesAtLevel3ReducedFunctionality_19(); break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads mandatory attribute constrains: OccupancySensorType\n"); - if (ShouldSkip("OCC.S.A0001")) { + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads the KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { NextTest(); return; } - err = TestReadsMandatoryAttributeConstrainsOccupancySensorType_2(); + err = TestThReadsTheKeypadLockoutAttributeOfDut_20(); break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads mandatory attribute constrains: OccupancySensorTypeBitmap\n"); - if (ShouldSkip("OCC.S.A0002")) { + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Writes a value of 4 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { NextTest(); return; } - err = TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_3(); + err = TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_21(); break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads optional attribute: PIROccupiedToUnoccupiedDelay\n"); - if (ShouldSkip("OCC.S.A0010")) { + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Verify device operates at Level 4 reduced functionality\n"); + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } - err = TestReadsOptionalAttributePIROccupiedToUnoccupiedDelay_4(); + err = TestVerifyDeviceOperatesAtLevel4ReducedFunctionality_22(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay\n"); - if (ShouldSkip("OCC.S.A0011")) { + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads the KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { NextTest(); return; } - err = TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedDelay_5(); + err = TestThReadsTheKeypadLockoutAttributeOfDut_23(); break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold\n"); - if (ShouldSkip("OCC.S.A0012")) { + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Writes a value of 5 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { NextTest(); return; } - err = TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedThreshold_6(); + err = TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_24(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay\n"); - if (ShouldSkip("OCC.S.A0020")) { + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Verify device operates at least functionality level\n"); + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } - err = TestReadOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_7(); + err = TestVerifyDeviceOperatesAtLeastFunctionalityLevel_25(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute: UltrasonicUnoccupiedToOccupiedDelay\n"); - if (ShouldSkip("OCC.S.A0021")) { + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads the KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { NextTest(); return; } - err = TestReadAttributeUltrasonicUnoccupiedToOccupiedDelay_8(); + err = TestThReadsTheKeypadLockoutAttributeOfDut_26(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read attribute: UltrasonicUnoccupiedToOccupiedThreshold\n"); - if (ShouldSkip("OCC.S.A0022")) { + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Writes a value of greater than 5 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { NextTest(); return; } - err = TestReadAttributeUltrasonicUnoccupiedToOccupiedThreshold_9(); + err = TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_27(); break; - case 10: + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads the KeypadLockout attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsTheKeypadLockoutAttributeOfDut_28(); + break; + case 29: ChipLogProgress( - chipTool, " ***** Test Step 10 : Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay\n"); - if (ShouldSkip("OCC.S.A0030")) { + chipTool, " ***** Test Step 29 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0002")) { NextTest(); return; } - err = TestReadsOptionalAttributeConstrainsPhysicalContactOccupiedToUnoccupiedDelay_10(); + err = TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_29(); break; - case 11: + case 30: ChipLogProgress( - chipTool, " ***** Test Step 11 : Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay\n"); - if (ShouldSkip("OCC.S.A0031")) { + chipTool, " ***** Test Step 30 : Verify local schedule programming functionality is enabled at the thermostat\n"); + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0002")) { NextTest(); return; } - err = TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedDelay_11(); + err = TestVerifyLocalScheduleProgrammingFunctionalityIsEnabledAtTheThermostat_30(); break; - case 12: + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads the ScheduleProgrammingVisibility attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_31(); + break; + case 32: + ChipLogProgress( + chipTool, " ***** Test Step 32 : Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0002")) { + NextTest(); + return; + } + err = TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_32(); + break; + case 33: + ChipLogProgress( + chipTool, " ***** Test Step 33 : Verify local schedule programming functionality is disabled at the thermostat\n"); + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0002")) { + NextTest(); + return; + } + err = TestVerifyLocalScheduleProgrammingFunctionalityIsDisabledAtTheThermostat_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads the ScheduleProgrammingVisibility attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_34(); + break; + case 35: ChipLogProgress(chipTool, - " ***** Test Step 12 : Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold\n"); - if (ShouldSkip("OCC.S.A0032")) { + " ***** Test Step 35 : Writes a value of greater than 1 to ScheduleProgrammingVisibility attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0002")) { NextTest(); return; } - err = TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedThreshold_12(); + err = TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads the ScheduleProgrammingVisibility attribute of DUT\n"); + if (ShouldSkip("TSUIC.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_36(); break; } @@ -74426,7 +71913,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -74443,6 +71930,78 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -74456,7 +72015,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 37; chip::Optional mNodeId; chip::Optional mCluster; @@ -74471,43 +72030,60 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancy_1() + CHIP_ERROR TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute constrains: Occupancy Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id temperatureDisplayModeArgument; + temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster + writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Writes a value of 0 to TemperatureDisplayMode attribute of DUT Error: %@", + err); - VerifyOrReturn(CheckConstraintType("occupancy", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("occupancy", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancy", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorType_2() + CHIP_ERROR TestVerifyDeviceTemperatureDisplayedInc_2() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsTheTemperatureDisplayModeAttributeOfDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute constrains: OccupancySensorType Error: %@", err); + [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupancySensorType", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("TemperatureDisplayMode", actualValue, 0U)); + } NextTest(); }]; @@ -74515,43 +72091,60 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_3() + CHIP_ERROR TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute constrains: OccupancySensorTypeBitmap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id temperatureDisplayModeArgument; + temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster + writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Writes a value of 1 to TemperatureDisplayMode attribute of DUT Error: %@", + err); - VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 7U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributePIROccupiedToUnoccupiedDelay_4() + CHIP_ERROR TestVerifyDeviceTemperatureDisplayedInf_5() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsTheTemperatureDisplayModeAttributeOfDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute: PIROccupiedToUnoccupiedDelay Error: %@", err); + [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("PIROccupiedToUnoccupiedDelay", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("PIROccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PIROccupiedToUnoccupiedDelay", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("TemperatureDisplayMode", actualValue, 1U)); + } NextTest(); }]; @@ -74559,44 +72152,53 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedDelay_5() + CHIP_ERROR TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("PIRUnoccupiedToOccupiedDelay", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("PIRUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PIRUnoccupiedToOccupiedDelay", [value unsignedShortValue], 65535U)); + id temperatureDisplayModeArgument; + temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of greater than 1 to TemperatureDisplayMode " + @"attribute of DUT Error: %@", + err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedThreshold_6() + CHIP_ERROR TestThReadsTheTemperatureDisplayModeAttributeOfDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold Error: %@", err); + [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("PIRUnoccupiedToOccupiedThreshold", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("PIRUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("PIRUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("TemperatureDisplayMode", actualValue, 1U)); + } NextTest(); }]; @@ -74604,99 +72206,115 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_7() + CHIP_ERROR TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id keypadLockoutArgument; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 0 to KeypadLockout attribute of DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("ultrasonicOccupiedToUnoccupiedDelay", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("ultrasonicOccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("ultrasonicOccupiedToUnoccupiedDelay", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedDelay_8() + CHIP_ERROR TestVerifyAllDeviceFunctionalityAvailableToTheUser_10() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedDelay Error: %@", err); + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedDelay", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("ultrasonicUnoccupiedToOccupiedDelay", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedThreshold_9() + CHIP_ERROR TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedThreshold Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id keypadLockoutArgument; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 1 to KeypadLockout attribute of DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedThreshold", "int8u", "int8u")); - VerifyOrReturn( - CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactOccupiedToUnoccupiedDelay_10() + CHIP_ERROR TestVerifyDeviceOperatesAtLevel1ReducedFunctionality_13() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("physicalContactOccupiedToUnoccupiedDelay", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("physicalContactOccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("physicalContactOccupiedToUnoccupiedDelay", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 1U)); + } NextTest(); }]; @@ -74704,178 +72322,115 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedDelay_11() + CHIP_ERROR TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id keypadLockoutArgument; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 2 to KeypadLockout attribute of DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedDelay", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("physicalContactUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("physicalContactUnoccupiedToOccupiedDelay", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedThreshold_12() + CHIP_ERROR TestVerifyDeviceOperatesAtLevel2ReducedFunctionality_16() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedThreshold", "int8u", "int8u")); - VerifyOrReturn( - CheckConstraintMinValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 2U)); + } NextTest(); }]; return CHIP_NO_ERROR; } -}; - -class Test_TC_OCC_2_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OCC_2_3() - : TestCommandBridge("Test_TC_OCC_2_3") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_OCC_2_3() {} - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_18() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_3\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + id keypadLockoutArgument; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:3U]; + [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 3 to KeypadLockout attribute of DUT Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attribute constrains: OccupancySensorType\n"); - if (ShouldSkip("OCC.S.A0001")) { - NextTest(); - return; - } - err = TestReadsMandatoryAttributeConstrainsOccupancySensorType_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads mandatory attribute constrains: OccupancySensorTypeBitmap\n"); - if (ShouldSkip("OCC.S.A0002")) { - NextTest(); - return; - } - err = TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_2(); - break; - } + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestVerifyDeviceOperatesAtLevel3ReducedFunctionality_19() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorType_1() + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_20() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute constrains: OccupancySensorType Error: %@", err); + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupancySensorType", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 3U)); + } NextTest(); }]; @@ -74883,310 +72438,115 @@ class Test_TC_OCC_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_2() + CHIP_ERROR TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute constrains: OccupancySensorTypeBitmap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id keypadLockoutArgument; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:4U]; + [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 4 to KeypadLockout attribute of DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 7U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } -}; - -class Test_TC_OO_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OO_1_1() - : TestCommandBridge("Test_TC_OO_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_OO_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !OO.S.F00 ")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given OO.S.F00(LT) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("OO.S.F00")) { - NextTest(); - return; - } - err = TestGivenOosf00ltEnsureFeaturemapHasTheCorrectBitSet_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the feature dependent(OO.S.F00) attribute in AttributeList\n"); - if (ShouldSkip("OO.S.F00")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentOOSF00AttributeInAttributeList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_6(); - break; - case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Read the feature dependent(OO.S.F00) commands in AcceptedCommandList\n"); - if (ShouldSkip("OO.S.F00")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " - "contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_9(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestVerifyDeviceOperatesAtLevel4ReducedFunctionality_22() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_23() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 4U)); } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenOosf00ltEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_24() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given OO.S.F00(LT) ensure featuremap has the correct bit set Error: %@", err); + id keypadLockoutArgument; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:5U]; + [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 5 to KeypadLockout attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestVerifyDeviceOperatesAtLeastFunctionalityLevel_25() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheFeatureDependentOOSF00AttributeInAttributeList_5() + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_26() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent(OO.S.F00) attribute in AttributeList Error: %@", err); + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16385UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16386UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16387UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 5U)); + } NextTest(); }]; @@ -75194,45 +72554,53 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_6() + CHIP_ERROR TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_27() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + id keypadLockoutArgument; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:6U]; + [cluster + writeAttributeKeypadLockoutWithValue:keypadLockoutArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Writes a value of greater than 5 to KeypadLockout attribute of DUT Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_7() + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_28() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent(OO.S.F00) commands in AcceptedCommandList Error: %@", err); + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 64UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 65UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 66UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 5U)); + } NextTest(); }]; @@ -75240,32 +72608,32 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_29() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id scheduleProgrammingVisibilityArgument; + scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 0 to ScheduleProgrammingVisibility " + @"attribute of DUT Error: %@", + err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_9() + CHIP_ERROR TestVerifyLocalScheduleProgrammingFunctionalityIsEnabledAtTheThermostat_30() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -75274,200 +72642,85 @@ class Test_TC_OO_1_1 : public TestCommandBridge { value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } -}; - -class Test_TC_OO_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OO_2_1() - : TestCommandBridge("Test_TC_OO_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_OO_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: OnOff\n"); - if (ShouldSkip("OO.S.A0000")) { - NextTest(); - return; - } - err = TestReadTheMandatoryAttributeOnOff_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read LT attribute: GlobalSceneControl\n"); - if (ShouldSkip("OO.S.A4000")) { - NextTest(); - return; - } - err = TestReadLtAttributeGlobalSceneControl_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read LT attribute: OnTime\n"); - if (ShouldSkip("OO.S.A4001")) { - NextTest(); - return; - } - err = TestReadLtAttributeOnTime_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read LT attribute: OffWaitTime\n"); - if (ShouldSkip("OO.S.A4002")) { - NextTest(); - return; - } - err = TestReadLtAttributeOffWaitTime_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read LT attribute: StartUpOnOff\n"); - if (ShouldSkip("OO.S.A4003")) { - NextTest(); - return; - } - err = TestReadLtAttributeStartUpOnOff_5(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - CHIP_ERROR TestReadTheMandatoryAttributeOnOff_1() + CHIP_ERROR TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_31() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: OnOff Error: %@", err); + [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOff", "boolean", "boolean")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ScheduleProgrammingVisibility", actualValue, 0U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadLtAttributeGlobalSceneControl_2() + CHIP_ERROR TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_32() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGlobalSceneControlWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read LT attribute: GlobalSceneControl Error: %@", err); + id scheduleProgrammingVisibilityArgument; + scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 1 to ScheduleProgrammingVisibility " + @"attribute of DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("globalSceneControl", "boolean", "boolean")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadLtAttributeOnTime_3() + CHIP_ERROR TestVerifyLocalScheduleProgrammingFunctionalityIsDisabledAtTheThermostat_33() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_34() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read LT attribute: OnTime Error: %@", err); + [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("onTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onTime", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ScheduleProgrammingVisibility", actualValue, 1U)); + } NextTest(); }]; @@ -75475,43 +72728,52 @@ class Test_TC_OO_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadLtAttributeOffWaitTime_4() + CHIP_ERROR TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_35() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffWaitTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read LT attribute: OffWaitTime Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("offWaitTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("offWaitTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("offWaitTime", [value unsignedShortValue], 65535U)); + id scheduleProgrammingVisibilityArgument; + scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of greater than 1 to " + @"ScheduleProgrammingVisibility attribute of DUT Error: %@", + err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadLtAttributeStartUpOnOff_5() + CHIP_ERROR TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_36() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read LT attribute: StartUpOnOff Error: %@", err); + [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("startUpOnOff", "enum8", "enum8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ScheduleProgrammingVisibility", actualValue, 1U)); } NextTest(); @@ -75521,11 +72783,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { } }; -class Test_TC_OO_2_2 : public TestCommandBridge { +class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OO_2_2() - : TestCommandBridge("Test_TC_OO_2_2") + Test_TC_DGTHREAD_1_1() + : TestCommandBridge("Test_TC_DGTHREAD_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -75535,7 +72797,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_OO_2_2() {} + ~Test_TC_DGTHREAD_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -75543,11 +72805,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGTHREAD_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGTHREAD_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -75564,172 +72826,151 @@ class Test_TC_OO_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestSendOffCommand_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("OO.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip(" !DGTHREAD.S.F00 && !DGTHREAD.S.F01 && !DGTHREAD.S.F02 && !DGTHREAD.S.F03 ")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2(); + err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Send On Command\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Given DGTHREAD.S.F00(PKTCNT) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("DGTHREAD.S.F00")) { NextTest(); return; } - err = TestSendOnCommand_3(); + err = TestGivenDgthreadsf00pktcntEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Check on/off attribute value is true after on command\n"); - if (ShouldSkip("OO.S.A0000")) { + ChipLogProgress( + chipTool, " ***** Test Step 4 : Given DGTHREAD.S.F01(ERRCNT) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("DGTHREAD.S.F01")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4(); + err = TestGivenDgthreadsf01errcntEnsureFeaturemapHasTheCorrectBitSet_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Send On Command\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Given DGTHREAD.S.F02(MLECNT) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("DGTHREAD.S.F02")) { NextTest(); return; } - err = TestSendOnCommand_5(); + err = TestGivenDgthreadsf02mlecntEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is true after on command\n"); - if (ShouldSkip("OO.S.A0000")) { + ChipLogProgress( + chipTool, " ***** Test Step 6 : Given DGTHREAD.S.F03(MACCNT) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("DGTHREAD.S.F03")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_6(); + err = TestGivenDgthreadsf03maccntEnsureFeaturemapHasTheCorrectBitSet_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Send Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestSendOffCommand_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads mandatory attributes in AttributeList from DUT\n"); + err = TestThReadsMandatoryAttributesInAttributeListFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("OO.S.A0000")) { + ChipLogProgress( + chipTool, " ***** Test Step 8 : TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0006 && DGTHREAD.S.F01")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); + err = TestThReadsFeatureDependentAttributeDGTHREADSF01ERRCNTInAttributeList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Send Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : TH reads Feature dependent attribute (DGTHREAD.S.F02(MLECNT)) in attributeList\n"); + if (ShouldSkip("DGTHREAD.S.F02")) { NextTest(); return; } - err = TestSendOffCommand_9(); + err = TestThReadsFeatureDependentAttributeDgthreadsf02mlecntInAttributeList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("OO.S.A0000")) { + ChipLogProgress( + chipTool, " ***** Test Step 10 : TH reads Feature dependent attribute (DGTHREAD.S.F03(MACCNT)) in attributeList\n"); + if (ShouldSkip("DGTHREAD.S.F03")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); + err = TestThReadsFeatureDependentAttributeDgthreadsf03maccntInAttributeList_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Send Toggle Command\n"); - if (ShouldSkip("OO.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute (ActiveTimestamp) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0038")) { NextTest(); return; } - err = TestSendToggleCommand_11(); + err = TestReadTheOptionalAttributeActiveTimestampInAttributeList_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); - err = TestWait1000ms_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Read the optional attribute (PendingTimestamp) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0039")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributePendingTimestampInAttributeList_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Check on/off attribute value is true after toggle command\n"); - if (ShouldSkip("OO.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional attribute (Delay) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A003a")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_13(); + err = TestReadTheOptionalAttributeDelayInAttributeList_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Send Toggle Command\n"); - if (ShouldSkip("OO.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads EventList from DUT\n"); + if (ShouldSkip(" !DGTHREAD.S.E00 && !DGTHREAD.S.E01 ")) { NextTest(); return; } - err = TestSendToggleCommand_14(); - break; + NextTest(); + return; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); - err = TestWait1000ms_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads DGTHREAD.S.E00(ConnectionStatus) event in EventList\n"); + if (ShouldSkip("DGTHREAD.S.E00")) { + NextTest(); + return; + } + NextTest(); + return; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Check on/off attribute value is false after toggle command\n"); - if (ShouldSkip("OO.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads DGTHREAD.S.E01(NetworkFaultChange) event in EventList\n"); + if (ShouldSkip("DGTHREAD.S.E01")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_16(); - break; + NextTest(); + return; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Operate on device to set OnOff attribute manually to on\n"); - if (ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip(" !DGTHREAD.S.F01 ")) { NextTest(); return; } - err = TestOperateOnDeviceToSetOnOffAttributeManuallyToOn_17(); + err = TestThReadsAcceptedCommandListFromDut_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Check on/off attribute value is true after on command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip("DGTHREAD.S.F01")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_18(); + err = TestThReadsAcceptedCommandListFromDut_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Operate on device to set OnOff attribute manually to off\n"); - if (ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000")) { - NextTest(); - return; - } - err = TestOperateOnDeviceToSetOnOffAttributeManuallyToOff_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled")) { - NextTest(); - return; - } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Reset Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestResetOffCommand_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("OO.S.A0000")) { - NextTest(); - return; - } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_19(); break; } @@ -75802,15 +73043,6 @@ class Test_TC_OO_2_2 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -75824,7 +73056,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 23; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -75839,163 +73071,203 @@ class Test_TC_OO_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestSendOffCommand_1() + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Send Off Command Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2() + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendOnCommand_3() + CHIP_ERROR TestGivenDgthreadsf00pktcntEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Send On Command Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given DGTHREAD.S.F00(PKTCNT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4() + CHIP_ERROR TestGivenDgthreadsf01errcntEnsureFeaturemapHasTheCorrectBitSet_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given DGTHREAD.S.F01(ERRCNT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendOnCommand_5() + CHIP_ERROR TestGivenDgthreadsf02mlecntEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Send On Command Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given DGTHREAD.S.F02(MLECNT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_6() + CHIP_ERROR TestGivenDgthreadsf03maccntEnsureFeaturemapHasTheCorrectBitSet_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given DGTHREAD.S.F03(MACCNT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendOffCommand_7() + CHIP_ERROR TestThReadsMandatoryAttributesInAttributeListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Send Off Command Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads mandatory attributes in AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 13UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 59UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 60UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 61UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 62UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() + CHIP_ERROR TestThReadsFeatureDependentAttributeDGTHREADSF01ERRCNTInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); NextTest(); }]; @@ -76003,58 +73275,29 @@ class Test_TC_OO_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendOffCommand_9() + CHIP_ERROR TestThReadsFeatureDependentAttributeDgthreadsf02mlecntInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Send Off Command Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent attribute (DGTHREAD.S.F02(MLECNT)) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendToggleCommand_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster toggleWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Send Toggle Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 21UL)); NextTest(); }]; @@ -76062,30 +73305,55 @@ class Test_TC_OO_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_12() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_13() + CHIP_ERROR TestThReadsFeatureDependentAttributeDgthreadsf03maccntInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after toggle command Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent attribute (DGTHREAD.S.F03(MACCNT)) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 22UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 24UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 25UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 26UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 27UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 28UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 29UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 30UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 31UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 32UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 33UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 34UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 35UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 36UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 37UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 38UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 39UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 40UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 41UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 42UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 43UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 44UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 45UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 46UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 47UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 48UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 49UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 50UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 51UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 52UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 53UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 54UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 55UL)); NextTest(); }]; @@ -76093,48 +73361,45 @@ class Test_TC_OO_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendToggleCommand_14() + CHIP_ERROR TestReadTheOptionalAttributeActiveTimestampInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster toggleWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Send Toggle Command Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute (ActiveTimestamp) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 56UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_15() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_16() + CHIP_ERROR TestReadTheOptionalAttributePendingTimestampInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after toggle command Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute (PendingTimestamp) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 57UL)); NextTest(); }]; @@ -76142,32 +73407,22 @@ class Test_TC_OO_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOperateOnDeviceToSetOnOffAttributeManuallyToOn_17() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_18() + CHIP_ERROR TestReadTheOptionalAttributeDelayInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute (Delay) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 58UL)); NextTest(); }]; @@ -76175,74 +73430,75 @@ class Test_TC_OO_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOperateOnDeviceToSetOnOffAttributeManuallyToOff_19() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestResetOffCommand_21() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Reset Off Command Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -76250,11 +73506,11 @@ class Test_TC_OO_2_2 : public TestCommandBridge { } }; -class Test_TC_OO_2_4 : public TestCommandBridge { +class Test_TC_ULABEL_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OO_2_4() - : TestCommandBridge("Test_TC_OO_2_4") + Test_TC_ULABEL_1_1() + : TestCommandBridge("Test_TC_ULABEL_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -76264,7 +73520,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_OO_2_4() {} + ~Test_TC_ULABEL_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -76272,11 +73528,11 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -76293,228 +73549,81 @@ class Test_TC_OO_2_4 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + if (ShouldSkip("ULABEL.S.Afffd")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_1(); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes a value of 0 to StartUpOnOff attribute of DUT\n"); - if (ShouldSkip("OO.S.A4003")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("ULABEL.S.Afffc")) { NextTest(); return; } - err = TestThWritesAValueOf0ToStartUpOnOffAttributeOfDut_2(); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("ULABEL.S.Afffb")) { NextTest(); return; } - err = TestRebootTargetDevice_3(); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Read the global attribute: AttributeList. 1.The list SHALL NOT contain any additional values " + "in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY " + "contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is " + "the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " + "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and " + "(0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afffb")) { NextTest(); return; } - err = TestRebootTargetDeviceDUT_4(); + err = TestReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the OnOff attribute from the DUT\n"); - if (ShouldSkip("OO.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheOnOffAttributeFromTheDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH writes a value of 1 to StartUpOnOff attribute of DUT\n"); - if (ShouldSkip("OO.S.A4003")) { - NextTest(); - return; - } - err = TestThWritesAValueOf1ToStartUpOnOffAttributeOfDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestRebootTargetDevice_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestRebootTargetDeviceDUT_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads the OnOff attribute from the DUT\n"); - if (ShouldSkip("OO.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheOnOffAttributeFromTheDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH writes a value of 2 to StartUpOnOff attribute of DUT\n"); - if (ShouldSkip("OO.S.A4003")) { - NextTest(); - return; - } - err = TestThWritesAValueOf2ToStartUpOnOffAttributeOfDut_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestRebootTargetDevice_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestRebootTargetDeviceDUT_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads the OnOff attribute from the DUT\n"); - if (ShouldSkip("OO.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheOnOffAttributeFromTheDut_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestRebootTargetDevice_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestRebootTargetDeviceDUT_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads the OnOff attribute from the DUT\n"); - if (ShouldSkip("OO.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheOnOffAttributeFromTheDut_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH writes NULL to StartUpOnOff attribute of DUT\n"); - if (ShouldSkip("OO.S.A4003")) { - NextTest(); - return; - } - err = TestThWritesNullToStartUpOnOffAttributeOfDut_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestRebootTargetDevice_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestRebootTargetDeviceDUT_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads the OnOff attribute from the DUT\n"); - if (ShouldSkip("OO.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheOnOffAttributeFromTheDut_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsOffCommandToDut_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads the OnOff attribute from the DUT\n"); - if (ShouldSkip("OO.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheOnOffAttributeFromTheDut_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { + ChipLogProgress(chipTool, + " ***** Test Step 5 : Read the global attribute: EventList. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " + "the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afffa")) { NextTest(); return; } - err = TestRebootTargetDevice_28(); + err = TestReadTheGlobalAttributeEventList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : Read the global attribute: AcceptedCommandList. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afff9")) { NextTest(); return; } - err = TestRebootTargetDeviceDUT_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_30(); + err = TestReadTheGlobalAttributeAcceptedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads the OnOff attribute from the DUT\n"); - if (ShouldSkip("OO.S.A0000")) { + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read the global attribute: GeneratedCommandList. 1.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afff8")) { NextTest(); return; } - err = TestThReadsTheOnOffAttributeFromTheDut_31(); + err = TestReadTheGlobalAttributeGeneratedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); break; } @@ -76551,78 +73660,6 @@ class Test_TC_OO_2_4 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -76636,7 +73673,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 32; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -76651,227 +73688,74 @@ class Test_TC_OO_2_4 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThSendsOnCommandToDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends On command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThWritesAValueOf0ToStartUpOnOffAttributeOfDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id startUpOnOffArgument; - startUpOnOffArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes a value of 0 to StartUpOnOff attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestRebootTargetDevice_3() - { - - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } - - CHIP_ERROR TestRebootTargetDeviceDUT_4() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_5() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_6() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesAValueOf1ToStartUpOnOffAttributeOfDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id startUpOnOffArgument; - startUpOnOffArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes a value of 1 to StartUpOnOff attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestRebootTargetDevice_8() - { - - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } - - CHIP_ERROR TestRebootTargetDeviceDUT_9() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_10() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_11() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesAValueOf2ToStartUpOnOffAttributeOfDut_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id startUpOnOffArgument; - startUpOnOffArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes a value of 2 to StartUpOnOff attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestRebootTargetDevice_13() - { - - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } - - CHIP_ERROR TestRebootTargetDeviceDUT_14() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_15() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_16() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -76879,185 +73763,139 @@ class Test_TC_OO_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRebootTargetDevice_17() - { - - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } - - CHIP_ERROR TestRebootTargetDeviceDUT_18() + CHIP_ERROR + TestReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_19() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThWritesNullToStartUpOnOffAttributeOfDut_21() + CHIP_ERROR + TestReadTheGlobalAttributeEventList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id startUpOnOffArgument; - startUpOnOffArgument = nil; - [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes NULL to StartUpOnOff attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestRebootTargetDevice_22() + CHIP_ERROR + TestReadTheGlobalAttributeAcceptedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestRebootTargetDeviceDUT_23() + CHIP_ERROR + TestReadTheGlobalAttributeGeneratedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } +}; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_24() +class Test_TC_ULABEL_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_ULABEL_2_1() + : TestCommandBridge("Test_TC_ULABEL_2_1") + , mTestIndex(0) { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_25() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } + ~Test_TC_ULABEL_2_1() {} - CHIP_ERROR TestThSendsOffCommandToDut_26() + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_1\n"); + } - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends Off command to DUT Error: %@", err); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + Wait(); - NextTest(); - }]; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads LabelList attribute of the DUT\n"); + if (ShouldSkip("ULABEL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsLabelListAttributeOfTheDut_1(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_27() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestRebootTargetDevice_28() + chip::System::Clock::Timeout GetWaitDuration() const override { - - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); } - CHIP_ERROR TestRebootTargetDeviceDUT_29() - { +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_30() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -77065,23 +73903,19 @@ class Test_TC_OO_2_4 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_31() + CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } - + VerifyOrReturn(CheckConstraintType("labelList", "list", "list")); NextTest(); }]; @@ -77089,11 +73923,11 @@ class Test_TC_OO_2_4 : public TestCommandBridge { } }; -class Test_TC_PS_1_1 : public TestCommandBridge { +class Test_TC_ULABEL_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PS_1_1() - : TestCommandBridge("Test_TC_PS_1_1") + Test_TC_ULABEL_2_2() + : TestCommandBridge("Test_TC_ULABEL_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -77103,7 +73937,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PS_1_1() {} + ~Test_TC_ULABEL_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -77111,11 +73945,11 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PS_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PS_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -77132,138 +73966,717 @@ class Test_TC_PS_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !PS.S.F00 && !PS.S.F01 && !PS.S.F02 && !PS.S.F03 ")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute from the DUT\n"); + if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMap_2(); + err = TestThWritesLabelListAttributeFromTheDut_1(); break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given PS.S.F00(WIRED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PS.S.F00")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads LabelList attribute from the DUT\n"); + if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestGivenPssf00wiredEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestThReadsLabelListAttributeFromTheDut_2(); break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given PS.S.F01(BAT) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PS.S.F01")) { - NextTest(); - return; - } - err = TestGivenPssf01batEnsureFeaturemapHasTheCorrectBitSet_4(); + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Given PS.S.F02(RECHG) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PS.S.F02")) { - NextTest(); + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThWritesLabelListAttributeFromTheDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"roomName"; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"master bedroom 1"; + + temp_0[1] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[1]).label = @"Orientation"; + ((MTRUserLabelClusterLabelStruct *) temp_0[1]).value = @"east"; + + temp_0[2] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[2]).label = @"floor"; + ((MTRUserLabelClusterLabelStruct *) temp_0[2]).value = @"2"; + + temp_0[3] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[3]).label = @"roomType"; + ((MTRUserLabelClusterLabelStruct *) temp_0[3]).value = @"bedroom"; + + labelListArgument = temp_0; + } + [cluster writeAttributeLabelListWithValue:labelListArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsLabelListAttributeFromTheDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads LabelList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("LabelList", [actualValue count], static_cast(4))); + VerifyOrReturn(CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"roomName")); + VerifyOrReturn( + CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"master bedroom 1")); + VerifyOrReturn( + CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).label, @"Orientation")); + VerifyOrReturn(CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).value, @"east")); + VerifyOrReturn(CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).label, @"floor")); + VerifyOrReturn(CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).value, @"2")); + VerifyOrReturn(CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).label, @"roomType")); + VerifyOrReturn(CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).value, @"bedroom")); + } + + VerifyOrReturn(CheckConstraintType("labelList", "list", "list")); + VerifyOrReturn(CheckConstraintMinLength("labelList", value, 4)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ULABEL_2_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_ULABEL_2_3() + : TestCommandBridge("Test_TC_ULABEL_2_3") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_ULABEL_2_3() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_3\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute of the DUT\n"); + if (ShouldSkip("ULABEL.S.A0000")) { + NextTest(); return; } - err = TestGivenPssf02rechgEnsureFeaturemapHasTheCorrectBitSet_5(); + err = TestThWritesLabelListAttributeOfTheDut_1(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given PS.S.F03(REPLC) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PS.S.F03")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes LabelList attribute of the DUT\n"); + if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestGivenPssf03replcEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestThWritesLabelListAttributeOfTheDut_2(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_7(); + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList\n"); - if (ShouldSkip("PS.S.F00")) { + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"room"; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"17_bytesIsTooLongforuserlabelnotexpected"; + + labelListArgument = temp_0; + } + [cluster + writeAttributeLabelListWithValue:labelListArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"17_bytesIsTooLongforuserlabelnotexpected"; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"foobar"; + + labelListArgument = temp_0; + } + [cluster + writeAttributeLabelListWithValue:labelListArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ULABEL_2_4 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_ULABEL_2_4() + : TestCommandBridge("Test_TC_ULABEL_2_4") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_ULABEL_2_4() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_4\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_4\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute of the DUT\n"); + if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestReadTheFeatureDependentPSSF00WiredAttributeInAttributeList_8(); + err = TestThWritesLabelListAttributeOfTheDut_1(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList\n"); - if (ShouldSkip("PS.S.F01")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads LabelList attribute of the DUT\n"); + if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestReadTheFeatureDependentPSSF01BatAttributeInAttributeList_9(); + err = TestThReadsLabelListAttributeOfTheDut_2(); break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList\n"); - if (ShouldSkip("PS.S.F02")) { + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes LabelList attribute of the DUT\n"); + if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestReadTheFeatureDependentPSSF02RechgAttributeInAttributeList_10(); + err = TestThWritesLabelListAttributeOfTheDut_3(); break; - case 11: + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads LabelList attribute of the DUT\n"); + if (ShouldSkip("ULABEL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsLabelListAttributeOfTheDut_4(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 5; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"room"; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"bedroom 1"; + + temp_0[1] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[1]).label = @"Orientation"; + ((MTRUserLabelClusterLabelStruct *) temp_0[1]).value = @"east"; + + labelListArgument = temp_0; + } + [cluster writeAttributeLabelListWithValue:labelListArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("LabelList", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"room")); + VerifyOrReturn( + CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"bedroom 1")); + VerifyOrReturn( + CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).label, @"Orientation")); + VerifyOrReturn(CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).value, @"east")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @""; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @""; + + labelListArgument = temp_0; + } + [cluster writeAttributeLabelListWithValue:labelListArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("LabelList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"")); + VerifyOrReturn(CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DGWIFI_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DGWIFI_1_1() + : TestCommandBridge("Test_TC_DGWIFI_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_DGWIFI_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGWIFI_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGWIFI_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip("( !DGWIFI.S.F00 && !DGWIFI.S.F01 )")) { + NextTest(); + return; + } + err = TestThReadsTheFeatureMapFromDut_2(); + break; + case 3: ChipLogProgress( - chipTool, " ***** Test Step 11 : Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList\n"); - if (ShouldSkip("PS.S.F03")) { + chipTool, " ***** Test Step 3 : Given DGWIFI.S.F00(PacketCounts) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("DGWIFI.S.F00")) { NextTest(); return; } - err = TestReadTheFeatureDependentPSSF03ReplcAttributeInAttributeList_11(); + err = TestGivenDGWIFISF00PacketCountsEnsureFeaturemapHasTheCorrectBitSet_3(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_12(); + case 4: + ChipLogProgress( + chipTool, " ***** Test Step 4 : Given DGWIFI.S.F01(ErrorCounts) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("DGWIFI.S.F01")) { + NextTest(); + return; + } + err = TestGivenDGWIFISF01ErrorCountsEnsureFeaturemapHasTheCorrectBitSet_4(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_13(); + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_5(); break; - case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " - "contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT\n"); + if (ShouldSkip("DGWIFI.S.F00")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_14(); + err = TestThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_6(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the global attribute: EventList\n"); - if (ShouldSkip(" !PS.S.E00 && !PS.S.E01 && !PS.S.E02 ")) { + case 7: + ChipLogProgress( + chipTool, " ***** Test Step 7 : TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT\n"); + if (ShouldSkip("DGWIFI.S.F01")) { NextTest(); return; } - err = TestReadTheGlobalAttributeEventList_15(); + err = TestThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_7(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read PS.S.E00(WiredFaultChange) event in EventList\n"); - if (ShouldSkip("PS.S.E00")) { + case 8: + ChipLogProgress( + chipTool, " ***** Test Step 8 : TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT\n"); + if (ShouldSkip("DGWIFI.S.A000b")) { NextTest(); return; } - err = TestReadPSSE00WiredFaultChangeEventInEventList_16(); + err = TestThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_8(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read PS.S.E01(BatFaultChange) event in EventList\n"); - if (ShouldSkip("PS.S.E01")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip(" !DGWIFI.S.F01 ")) { NextTest(); return; } - err = TestReadPSSE01BatFaultChangeEventInEventList_17(); + err = TestThReadsAcceptedCommandListFromDut_9(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read PS.S.E02(BatChargeFaultChange) event in EventList\n"); - if (ShouldSkip("PS.S.E02")) { + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT\n"); + if (ShouldSkip("DGWIFI.S.F01")) { NextTest(); return; } - err = TestReadPSSE02BatChargeFaultChangeEventInEventList_18(); + err = TestThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_11(); break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads EventList from DUT\n"); + if (ShouldSkip(" !DGWIFI.S.E00 && !DGWIFI.S.E01 && !DGWIFI.S.E02 ")) { + NextTest(); + return; + } + NextTest(); + return; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads optional attribute (Disconnection) in EventList from DUT\n"); + if (ShouldSkip("DGWIFI.S.E00")) { + NextTest(); + return; + } + NextTest(); + return; + case 14: + ChipLogProgress( + chipTool, " ***** Test Step 14 : TH reads optional attribute (AssociationFailure) in EventList from DUT\n"); + if (ShouldSkip("DGWIFI.S.E01")) { + NextTest(); + return; + } + NextTest(); + return; + case 15: + ChipLogProgress( + chipTool, " ***** Test Step 15 : TH reads optional attribute (ConnectionStatus) in EventList from DUT\n"); + if (ShouldSkip("DGWIFI.S.E02")) { + NextTest(); + return; + } + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -77323,15 +74736,6 @@ class Test_TC_PS_1_1 : public TestCommandBridge { case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -77345,7 +74749,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -77360,15 +74764,17 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77384,15 +74790,17 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77408,53 +74816,17 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPssf00wiredEnsureFeaturemapHasTheCorrectBitSet_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PS.S.F00(WIRED) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPssf01batEnsureFeaturemapHasTheCorrectBitSet_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PS.S.F01(BAT) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenPssf02rechgEnsureFeaturemapHasTheCorrectBitSet_5() + CHIP_ERROR TestGivenDGWIFISF00PacketCountsEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PS.S.F02(RECHG) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Given DGWIFI.S.F00(PacketCounts) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77465,15 +74837,17 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPssf03replcEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestGivenDGWIFISF01ErrorCountsEnsureFeaturemapHasTheCorrectBitSet_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PS.S.F03(REPLC) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Given DGWIFI.S.F01(ErrorCounts) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77484,15 +74858,17 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_7() + CHIP_ERROR TestThReadsAttributeListFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77500,6 +74876,8 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -77513,43 +74891,26 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentPSSF00WiredAttributeInAttributeList_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentPSSF01BatAttributeInAttributeList_9() + CHIP_ERROR TestThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList Error: %@", err); + NSLog(@"TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); NextTest(); }]; @@ -77557,21 +74918,23 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentPSSF02RechgAttributeInAttributeList_10() + CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList Error: %@", err); + NSLog(@"TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 26UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 28UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); NextTest(); }]; @@ -77579,21 +74942,22 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentPSSF03ReplcAttributeInAttributeList_11() + CHIP_ERROR TestThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList Error: %@", err); + NSLog(@"TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 25UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); NextTest(); }]; @@ -77601,15 +74965,17 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_12() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77625,122 +74991,49 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_13() + CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_14() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_15() + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadPSSE00WiredFaultChangeEventInEventList_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PS.S.E00(WiredFaultChange) event in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 0UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadPSSE01BatFaultChangeEventInEventList_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PS.S.E01(BatFaultChange) event in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadPSSE02BatChargeFaultChangeEventInEventList_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PS.S.E02(BatChargeFaultChange) event in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 2UL)); - + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -77748,11 +75041,11 @@ class Test_TC_PS_1_1 : public TestCommandBridge { } }; -class Test_TC_PS_2_1 : public TestCommandBridge { +class Test_TC_DGWIFI_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PS_2_1() - : TestCommandBridge("Test_TC_PS_2_1") + Test_TC_DGWIFI_2_1() + : TestCommandBridge("Test_TC_DGWIFI_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -77762,7 +75055,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PS_2_1() {} + ~Test_TC_DGWIFI_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -77770,11 +75063,11 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PS_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGWIFI_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PS_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGWIFI_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -77791,258 +75084,108 @@ class Test_TC_PS_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Test Harness Client reads Status attribute from Server DUT\n"); - if (ShouldSkip("PS.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads BSSID attribute from DUT\n"); + if (ShouldSkip("DGWIFI.S.A0000")) { NextTest(); return; } - err = TestTestHarnessClientReadsStatusAttributeFromServerDut_1(); + err = TestThReadsBssidAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Test Harness Client reads Order attribute from Server DUT\n"); - if (ShouldSkip("PS.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads SecurityType attribute constraints\n"); + if (ShouldSkip("DGWIFI.S.A0001")) { NextTest(); return; } - err = TestTestHarnessClientReadsOrderAttributeFromServerDut_2(); + err = TestReadsSecurityTypeAttributeConstraints_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Test Harness Client reads Description attribute from Server DUT\n"); - if (ShouldSkip("PS.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads WiFiVersion attribute constraints\n"); + if (ShouldSkip("DGWIFI.S.A0002")) { NextTest(); return; } - err = TestTestHarnessClientReadsDescriptionAttributeFromServerDut_3(); + err = TestReadsWiFiVersionAttributeConstraints_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Test Harness Client reads WiredAssessedInputVoltage attribue from Server DUT\n"); - if (ShouldSkip("PS.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads ChannelNumber attribute constraints\n"); + if (ShouldSkip("DGWIFI.S.A0003")) { NextTest(); return; } - err = TestTestHarnessClientReadsWiredAssessedInputVoltageAttribueFromServerDut_4(); + err = TestReadsChannelNumberAttributeConstraints_4(); break; case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : Test Harness Client reads WiredAssessedInputFrequency attribute from Server DUT\n"); - if (ShouldSkip("PS.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads RSSI attribute constraints\n"); + if (ShouldSkip("DGWIFI.S.A0004")) { NextTest(); return; } - err = TestTestHarnessClientReadsWiredAssessedInputFrequencyAttributeFromServerDut_5(); + err = TestReadsRssiAttributeConstraints_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Test Harness Client reads WiredCurrentType attribute from Server DUT\n"); - if (ShouldSkip("PS.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads BeaconLostCount attribute constraints\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A0005")) { NextTest(); return; } - err = TestTestHarnessClientReadsWiredCurrentTypeAttributeFromServerDut_6(); + err = TestReadsBeaconLostCountAttributeConstraints_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Test Harness Client reads WiredAssessedCurrent attribute from Server DUT\n"); - if (ShouldSkip("PS.S.A0006")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads BeaconRxCount attribute constraints\n"); + if (ShouldSkip("DGWIFI.S.A0006")) { NextTest(); return; } - err = TestTestHarnessClientReadsWiredAssessedCurrentAttributeFromServerDut_7(); + err = TestReadsBeaconRxCountAttributeConstraints_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Test Harness Client reads WiredNominalVoltage from Server DUT\n"); - if (ShouldSkip("PS.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads PacketMulticastRxCount attribute constraints\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A0007")) { NextTest(); return; } - err = TestTestHarnessClientReadsWiredNominalVoltageFromServerDut_8(); + err = TestReadsPacketMulticastRxCountAttributeConstraints_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Test Harness Client reads WiredMaximumCurrent from Server DUT\n"); - if (ShouldSkip("PS.S.A0008")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads PacketMulticastTxCount attribute constraints\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A0008")) { NextTest(); return; } - err = TestTestHarnessClientReadsWiredMaximumCurrentFromServerDut_9(); + err = TestReadsPacketMulticastTxCountAttributeConstraints_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Test Harness Client reads WiredPresent from Server DUT\n"); - if (ShouldSkip("PS.S.A0009")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads PacketUnicastRxCount attribute constraints\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A0009")) { NextTest(); return; } - err = TestTestHarnessClientReadsWiredPresentFromServerDut_10(); + err = TestReadsPacketUnicastRxCountAttributeConstraints_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Test Harness Client reads ActiveWiredFaults from Server DUT\n"); - if (ShouldSkip("PS.S.A000a")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads PacketUnicastTxCount attribute constraints\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A000a")) { NextTest(); return; } - err = TestTestHarnessClientReadsActiveWiredFaultsFromServerDut_11(); + err = TestReadsPacketUnicastTxCountAttributeConstraints_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Test Harness Client reads BatVoltage from Server DUT\n"); - if (ShouldSkip("PS.S.A000b")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads CurrentMaxRate attribute constraints\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A000b")) { NextTest(); return; } - err = TestTestHarnessClientReadsBatVoltageFromServerDut_12(); + err = TestReadsCurrentMaxRateAttributeConstraints_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Test Harness Client reads BatPercentRemaining from Server DUT\n"); - if (ShouldSkip("PS.S.A000c")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads OverrunCount attribute constraints\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A000c")) { NextTest(); return; } - err = TestTestHarnessClientReadsBatPercentRemainingFromServerDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Test Harness Client reads BatTimeRemaining from Server DUT\n"); - if (ShouldSkip("PS.S.A000d")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatTimeRemainingFromServerDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Test Harness Client reads BatChargeLevel from Server DUT\n"); - if (ShouldSkip("PS.S.A000e")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatChargeLevelFromServerDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Test Harness Client reads BatReplacementNeeded from Server DUT\n"); - if (ShouldSkip("PS.S.A000f")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatReplacementNeededFromServerDut_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Test Harness Client reads BatReplaceability from Server DUT\n"); - if (ShouldSkip("PS.S.A0010")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatReplaceabilityFromServerDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Test Harness Client reads BatPresent from Server DUT\n"); - if (ShouldSkip("PS.S.A0011")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatPresentFromServerDut_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Test Harness Client readsActiveBatFaults from Server DUT\n"); - if (ShouldSkip("PS.S.A0012")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsActiveBatFaultsFromServerDut_19(); - break; - case 20: - ChipLogProgress( - chipTool, " ***** Test Step 20 : Test Harness Client reads BatReplacementDescription from Server DUT\n"); - if (ShouldSkip("PS.S.A0013")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatReplacementDescriptionFromServerDut_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Test Harness Client reads BatCommonDesignation from Server DUT\n"); - if (ShouldSkip("PS.S.A0014")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatCommonDesignationFromServerDut_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Test Harness Client reads BatANSIDesignation from Server DUT\n"); - if (ShouldSkip("PS.S.A0015")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatANSIDesignationFromServerDut_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Test Harness Client reads BatIECDesignation from Server DUT\n"); - if (ShouldSkip("PS.S.A0016")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatIECDesignationFromServerDut_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Test Harness Client reads BatApprovedChemistry from Server DUT\n"); - if (ShouldSkip("PS.S.A0017")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatApprovedChemistryFromServerDut_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Test Harness Client reads BatCapacity from Server DUT\n"); - if (ShouldSkip("PS.S.A0018")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatCapacityFromServerDut_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Test Harness Client reads BatQuantity from Server DUT\n"); - if (ShouldSkip("PS.S.A0019")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatQuantityFromServerDut_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Test Harness Client reads BatChargeState from Server DUT\n"); - if (ShouldSkip("PS.S.A001a")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatChargeStateFromServerDut_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Test Harness Client reads BatTimeToFullCharge from Server DUT\n"); - if (ShouldSkip("PS.S.A001b")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatTimeToFullChargeFromServerDut_28(); - break; - case 29: - ChipLogProgress( - chipTool, " ***** Test Step 29 : Test Harness Client reads BatFunctionalWhileCharging from Server DUT\n"); - if (ShouldSkip("PS.S.A001c")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatFunctionalWhileChargingFromServerDut_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Test Harness Client reads BatChargingCurrent from Server DUT\n"); - if (ShouldSkip("PS.S.A001d")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsBatChargingCurrentFromServerDut_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Test Harness Client reads ActiveBatChargeFaults from Server DUT\n"); - if (ShouldSkip("PS.S.A001e")) { - NextTest(); - return; - } - err = TestTestHarnessClientReadsActiveBatChargeFaultsFromServerDut_31(); + err = TestReadsOverrunCountAttributeConstraints_13(); break; } @@ -78097,60 +75240,6 @@ class Test_TC_PS_2_1 : public TestCommandBridge { case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -78164,7 +75253,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 32; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mCluster; @@ -78179,21 +75268,24 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTestHarnessClientReadsStatusAttributeFromServerDut_1() + CHIP_ERROR TestThReadsBssidAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads Status attribute from Server DUT Error: %@", err); + [cluster readAttributeBSSIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads BSSID attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("status", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("status", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("status", [value unsignedCharValue], 3U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("bssid", "octet_string", "octet_string")); + } NextTest(); }]; @@ -78201,65 +75293,50 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsOrderAttributeFromServerDut_2() + CHIP_ERROR TestReadsSecurityTypeAttributeConstraints_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOrderWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads Order attribute from Server DUT Error: %@", err); + [cluster readAttributeSecurityTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads SecurityType attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("order", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("order", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("order", [value unsignedCharValue], 255U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTestHarnessClientReadsDescriptionAttributeFromServerDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads Description attribute from Server DUT Error: %@", err); + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("securityType", "enum8", "enum8")); + } - VerifyOrReturn(CheckConstraintType("description", "char_string", "char_string")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsWiredAssessedInputVoltageAttribueFromServerDut_4() + CHIP_ERROR TestReadsWiFiVersionAttributeConstraints_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredAssessedInputVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads WiredAssessedInputVoltage attribue from Server DUT Error: %@", err); + [cluster readAttributeWiFiVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads WiFiVersion attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("wiredAssessedInputVoltage", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("wiredAssessedInputVoltage", [value unsignedIntValue], 0UL)); - VerifyOrReturn( - CheckConstraintMaxValue("wiredAssessedInputVoltage", [value unsignedIntValue], 4294967295UL)); + VerifyOrReturn(CheckConstraintType("wiFiVersion", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("wiFiVersion", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("wiFiVersion", [value unsignedCharValue], 5U)); } NextTest(); @@ -78268,24 +75345,25 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsWiredAssessedInputFrequencyAttributeFromServerDut_5() + CHIP_ERROR TestReadsChannelNumberAttributeConstraints_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredAssessedInputFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads WiredAssessedInputFrequency attribute from Server DUT Error: %@", err); + [cluster readAttributeChannelNumberWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads ChannelNumber attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("wiredAssessedInputFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("wiredAssessedInputFrequency", [value unsignedShortValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("wiredAssessedInputFrequency", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("channelNumber", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("channelNumber", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("channelNumber", [value unsignedShortValue], 65535U)); } NextTest(); @@ -78294,21 +75372,26 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsWiredCurrentTypeAttributeFromServerDut_6() + CHIP_ERROR TestReadsRssiAttributeConstraints_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredCurrentTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads WiredCurrentType attribute from Server DUT Error: %@", err); + [cluster readAttributeRSSIWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads RSSI attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("wiredCurrentType", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("wiredCurrentType", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("wiredCurrentType", [value unsignedCharValue], 1U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("rssi", "int8s", "int8s")); + VerifyOrReturn(CheckConstraintMinValue("rssi", [value charValue], -120)); + VerifyOrReturn(CheckConstraintMaxValue("rssi", [value charValue], 0)); + } NextTest(); }]; @@ -78316,23 +75399,25 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsWiredAssessedCurrentAttributeFromServerDut_7() + CHIP_ERROR TestReadsBeaconLostCountAttributeConstraints_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredAssessedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads WiredAssessedCurrent attribute from Server DUT Error: %@", err); + [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads BeaconLostCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("wiredAssessedCurrent", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("wiredAssessedCurrent", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("wiredAssessedCurrent", [value unsignedIntValue], 4294967295UL)); + VerifyOrReturn(CheckConstraintType("beaconLostCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("beaconLostCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("beaconLostCount", [value unsignedIntValue], 4294967295UL)); } NextTest(); @@ -78341,43 +75426,26 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsWiredNominalVoltageFromServerDut_8() + CHIP_ERROR TestReadsBeaconRxCountAttributeConstraints_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredNominalVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads WiredNominalVoltage from Server DUT Error: %@", err); + [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads BeaconRxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("wiredNominalVoltage", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("wiredNominalVoltage", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("wiredNominalVoltage", [value unsignedIntValue], 4294967295UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTestHarnessClientReadsWiredMaximumCurrentFromServerDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeWiredMaximumCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads WiredMaximumCurrent from Server DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { - VerifyOrReturn(CheckConstraintType("wiredMaximumCurrent", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("wiredMaximumCurrent", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("wiredMaximumCurrent", [value unsignedIntValue], 4294967295UL)); + VerifyOrReturn(CheckConstraintType("beaconRxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("beaconRxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("beaconRxCount", [value unsignedIntValue], 4294967295UL)); + } NextTest(); }]; @@ -78385,62 +75453,52 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsWiredPresentFromServerDut_10() + CHIP_ERROR TestReadsPacketMulticastRxCountAttributeConstraints_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads WiredPresent from Server DUT Error: %@", err); + [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads PacketMulticastRxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("wiredPresent", "boolean", "boolean")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTestHarnessClientReadsActiveWiredFaultsFromServerDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeActiveWiredFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads ActiveWiredFaults from Server DUT Error: %@", err); + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("packetMulticastRxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("packetMulticastRxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("packetMulticastRxCount", [value unsignedIntValue], 4294967295UL)); + } - VerifyOrReturn(CheckConstraintType("activeWiredFaults", "list", "list")); - VerifyOrReturn(CheckConstraintMaxLength("activeWiredFaults", value, 8)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsBatVoltageFromServerDut_12() + CHIP_ERROR TestReadsPacketMulticastTxCountAttributeConstraints_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatVoltage from Server DUT Error: %@", err); + [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads PacketMulticastTxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("batVoltage", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("batVoltage", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("batVoltage", [value unsignedIntValue], 4294967295UL)); + VerifyOrReturn(CheckConstraintType("packetMulticastTxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("packetMulticastTxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("packetMulticastTxCount", [value unsignedIntValue], 4294967295UL)); } NextTest(); @@ -78449,23 +75507,25 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsBatPercentRemainingFromServerDut_13() + CHIP_ERROR TestReadsPacketUnicastRxCountAttributeConstraints_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatPercentRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatPercentRemaining from Server DUT Error: %@", err); + [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads PacketUnicastRxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("batPercentRemaining", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("batPercentRemaining", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("batPercentRemaining", [value unsignedCharValue], 200U)); + VerifyOrReturn(CheckConstraintType("packetUnicastRxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("packetUnicastRxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("packetUnicastRxCount", [value unsignedIntValue], 4294967295UL)); } NextTest(); @@ -78474,23 +75534,25 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsBatTimeRemainingFromServerDut_14() + CHIP_ERROR TestReadsPacketUnicastTxCountAttributeConstraints_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatTimeRemaining from Server DUT Error: %@", err); + [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads PacketUnicastTxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("batTimeRemaining", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("batTimeRemaining", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("batTimeRemaining", [value unsignedIntValue], 4294967295UL)); + VerifyOrReturn(CheckConstraintType("packetUnicastTxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("packetUnicastTxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("packetUnicastTxCount", [value unsignedIntValue], 4294967295UL)); } NextTest(); @@ -78499,249 +75561,258 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsBatChargeLevelFromServerDut_15() + CHIP_ERROR TestReadsCurrentMaxRateAttributeConstraints_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatChargeLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatChargeLevel from Server DUT Error: %@", err); + [cluster readAttributeCurrentMaxRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads CurrentMaxRate attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batChargeLevel", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("batChargeLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("batChargeLevel", [value unsignedCharValue], 2U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTestHarnessClientReadsBatReplacementNeededFromServerDut_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBatReplacementNeededWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatReplacementNeeded from Server DUT Error: %@", err); + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("currentMaxRate", "int64u", "int64u")); + } - VerifyOrReturn(CheckConstraintType("batReplacementNeeded", "boolean", "boolean")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsBatReplaceabilityFromServerDut_17() + CHIP_ERROR TestReadsOverrunCountAttributeConstraints_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatReplaceabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatReplaceability from Server DUT Error: %@", err); + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads OverrunCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batReplaceability", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("batReplaceability", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("batReplaceability", [value unsignedCharValue], 3U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTestHarnessClientReadsBatPresentFromServerDut_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBatPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatPresent from Server DUT Error: %@", err); + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("overrunCount", "int64u", "int64u")); + } - VerifyOrReturn(CheckConstraintType("batPresent", "boolean", "boolean")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestTestHarnessClientReadsActiveBatFaultsFromServerDut_19() +class Test_TC_DGWIFI_2_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DGWIFI_2_3() + : TestCommandBridge("Test_TC_DGWIFI_2_3") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeActiveBatFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client readsActiveBatFaults from Server DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("activeBatFaults", "list", "list")); - VerifyOrReturn(CheckConstraintMaxLength("activeBatFaults", value, 8)); - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestTestHarnessClientReadsBatReplacementDescriptionFromServerDut_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBatReplacementDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatReplacementDescription from Server DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("batReplacementDescription", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("batReplacementDescription", value, 60)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } + ~Test_TC_DGWIFI_2_3() {} - CHIP_ERROR TestTestHarnessClientReadsBatCommonDesignationFromServerDut_21() + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBatCommonDesignationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatCommonDesignation from Server DUT Error: %@", err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGWIFI_2_3\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGWIFI_2_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckConstraintType("batCommonDesignation", "enum16", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("batCommonDesignation", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("batCommonDesignation", [value unsignedShortValue], 80U)); + Wait(); - NextTest(); - }]; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends ResetCounts command to DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsResetCountsCommandToDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads BeaconLostCount attribute from DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0005")) { + NextTest(); + return; + } + err = TestReadsBeaconLostCountAttributeFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads BeaconRxCount attribute from DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0006")) { + NextTest(); + return; + } + err = TestReadsBeaconRxCountAttributeFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads PacketMulticastRxCount attribute from DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0007")) { + NextTest(); + return; + } + err = TestReadsPacketMulticastRxCountAttributeFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads PacketMulticastTxCount attribute from DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0008")) { + NextTest(); + return; + } + err = TestReadsPacketMulticastTxCountAttributeFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads PacketUnicastRxCount attribute from DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0009")) { + NextTest(); + return; + } + err = TestReadsPacketUnicastRxCountAttributeFromDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads PacketUnicastTxCount attribute from DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A000a")) { + NextTest(); + return; + } + err = TestReadsPacketUnicastTxCountAttributeFromDut_7(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestTestHarnessClientReadsBatANSIDesignationFromServerDut_22() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBatANSIDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatANSIDesignation from Server DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("batANSIDesignation", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("batANSIDesignation", value, 20)); - NextTest(); - }]; - - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestTestHarnessClientReadsBatIECDesignationFromServerDut_23() + chip::System::Clock::Timeout GetWaitDuration() const override { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBatIECDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatIECDesignation from Server DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("batIECDesignation", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("batIECDesignation", value, 20)); - NextTest(); - }]; - - return CHIP_NO_ERROR; + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); } - CHIP_ERROR TestTestHarnessClientReadsBatApprovedChemistryFromServerDut_24() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBatApprovedChemistryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatApprovedChemistry from Server DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 8; - VerifyOrReturn(CheckConstraintType("batApprovedChemistry", "enum16", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("batApprovedChemistry", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("batApprovedChemistry", [value unsignedShortValue], 32U)); + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTestHarnessClientReadsBatCapacityFromServerDut_25() + CHIP_ERROR TestThSendsResetCountsCommandToDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatCapacity from Server DUT Error: %@", err); + [cluster resetCountsWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends ResetCounts command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batCapacity", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("batCapacity", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("batCapacity", [value unsignedIntValue], 4294967295UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsBatQuantityFromServerDut_26() + CHIP_ERROR TestReadsBeaconLostCountAttributeFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatQuantity from Server DUT Error: %@", err); + [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads BeaconLostCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batQuantity", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("batQuantity", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("batQuantity", [value unsignedCharValue], 255U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("beaconLostCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("beaconLostCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("beaconLostCount", [value unsignedIntValue], 4294967295UL)); + } NextTest(); }]; @@ -78749,21 +75820,26 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsBatChargeStateFromServerDut_27() + CHIP_ERROR TestReadsBeaconRxCountAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatChargeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatChargeState from Server DUT Error: %@", err); + [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads BeaconRxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batChargeState", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("batChargeState", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("batChargeState", [value unsignedCharValue], 3U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("beaconRxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("beaconRxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("beaconRxCount", [value unsignedIntValue], 4294967295UL)); + } NextTest(); }]; @@ -78771,23 +75847,25 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsBatTimeToFullChargeFromServerDut_28() + CHIP_ERROR TestReadsPacketMulticastRxCountAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatTimeToFullChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatTimeToFullCharge from Server DUT Error: %@", err); + [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads PacketMulticastRxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("batTimeToFullCharge", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("batTimeToFullCharge", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("batTimeToFullCharge", [value unsignedIntValue], 4294967295UL)); + VerifyOrReturn(CheckConstraintType("packetMulticastRxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("packetMulticastRxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("packetMulticastRxCount", [value unsignedIntValue], 4294967295UL)); } NextTest(); @@ -78796,42 +75874,52 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsBatFunctionalWhileChargingFromServerDut_29() + CHIP_ERROR TestReadsPacketMulticastTxCountAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatFunctionalWhileChargingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatFunctionalWhileCharging from Server DUT Error: %@", err); + [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads PacketMulticastTxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batFunctionalWhileCharging", "boolean", "boolean")); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("packetMulticastTxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("packetMulticastTxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("packetMulticastTxCount", [value unsignedIntValue], 4294967295UL)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsBatChargingCurrentFromServerDut_30() + CHIP_ERROR TestReadsPacketUnicastRxCountAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatChargingCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatChargingCurrent from Server DUT Error: %@", err); + [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads PacketUnicastRxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("batChargingCurrent", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("batChargingCurrent", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("batChargingCurrent", [value unsignedIntValue], 4294967295UL)); + VerifyOrReturn(CheckConstraintType("packetUnicastRxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("packetUnicastRxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("packetUnicastRxCount", [value unsignedIntValue], 4294967295UL)); } NextTest(); @@ -78840,19 +75928,27 @@ class Test_TC_PS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTestHarnessClientReadsActiveBatChargeFaultsFromServerDut_31() + CHIP_ERROR TestReadsPacketUnicastTxCountAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeActiveBatChargeFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads ActiveBatChargeFaults from Server DUT Error: %@", err); + [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads PacketUnicastTxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("activeBatChargeFaults", "list", "list")); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("packetUnicastTxCount", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("packetUnicastTxCount", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("packetUnicastTxCount", [value unsignedIntValue], 4294967295UL)); + } + NextTest(); }]; @@ -78860,11 +75956,11 @@ class Test_TC_PS_2_1 : public TestCommandBridge { } }; -class Test_TC_PRS_1_1 : public TestCommandBridge { +class Test_TC_WNCV_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PRS_1_1() - : TestCommandBridge("Test_TC_PRS_1_1") + Test_TC_WNCV_1_1() + : TestCommandBridge("Test_TC_WNCV_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -78874,7 +75970,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PRS_1_1() {} + ~Test_TC_WNCV_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -78882,11 +75978,11 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -78903,137 +75999,161 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PRS.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the (0xFFFD) ClusterRevision attribute\n"); + if (ShouldSkip("WNCV.S.Afffd")) { NextTest(); return; } - err = TestReadTheGlobalAttributeClusterRevision_1(); + err = TestThReadsFromTheDutThe0xFFFDClusterRevisionAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("PRS.S.Afffc && !PRS.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the (0xFFFC) FeatureMap attribute\n"); + if (ShouldSkip(" WNCV.S.Afffc && !WNCV.S.F00 && !WNCV.S.F01 && !WNCV.S.F02 && !WNCV.S.F03 && !WNCV.S.F04 ")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMap_2(); + err = TestThReadsFromTheDutThe0xFFFCFeatureMapAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given PRS.S.F00(EXT) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PRS.S.F00 && PRS.S.Afffc")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Given WNCV.S.F00(LF) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("WNCV.S.F00")) { NextTest(); return; } - err = TestGivenPrssf00extEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestGivenWncvsf00lfEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global mandatory attribute: AttributeList\n"); - if (ShouldSkip("PRS.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Given WNCV.S.F01(TL) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("WNCV.S.F01")) { NextTest(); return; } - err = TestReadTheGlobalMandatoryAttributeAttributeList_4(); + err = TestGivenWncvsf01tlEnsureFeaturemapHasTheCorrectBitSet_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(ScaledValue) in AttributeList\n"); - if (ShouldSkip("PRS.S.A0010 && PRS.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Given WNCV.S.F02(PA_LF) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("WNCV.S.F02")) { NextTest(); return; } - err = TestReadTheOptionalAttributeScaledValueInAttributeList_5(); + err = TestGivenWncvsf02paLfEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(MinScaledValue) in AttributeList\n"); - if (ShouldSkip("PRS.S.A0011 && PRS.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Given WNCV.S.F03(ABS) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("WNCV.S.F03")) { NextTest(); return; } - err = TestReadTheOptionalAttributeMinScaledValueInAttributeList_6(); + err = TestGivenWncvsf03absEnsureFeaturemapHasTheCorrectBitSet_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(MaxScaledValue) in AttributeList\n"); - if (ShouldSkip("PRS.S.A0012 && PRS.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Given WNCV.S.F04(PA_TL) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("WNCV.S.F04")) { NextTest(); return; } - err = TestReadTheOptionalAttributeMaxScaledValueInAttributeList_7(); + err = TestGivenWncvsf04paTlEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(Scale) in AttributeList\n"); - if (ShouldSkip("PRS.S.A0014 && PRS.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the (0xFFFB) AttributeList attribute\n"); + if (ShouldSkip("WNCV.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalAttributeScaleInAttributeList_8(); + err = TestThReadsFromTheDutThe0xFFFBAttributeListAttribute_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(Tolerance) in AttributeList\n"); - if (ShouldSkip("PRS.S.A0003 && PRS.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads optional attribute(SafetyStatus) in AttributeList\n"); + if (ShouldSkip("WNCV.S.Afffb && WNCV.S.A001a")) { NextTest(); return; } - err = TestReadTheOptionalAttributeToleranceInAttributeList_9(); + err = TestThReadsOptionalAttributeSafetyStatusInAttributeList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(ScaledTolerance) in AttributeList\n"); - if (ShouldSkip("PRS.S.A0013 && PRS.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 & WNCV.S.F03) attribute in " + "AttributeList\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.F03 && WNCV.S.Afffb")) { NextTest(); return; } - err = TestReadTheOptionalAttributeScaledToleranceInAttributeList_10(); + err = TestReadTheFeatureDependentWNCVSF00Wncvsf02Wncvsf03AttributeInAttributeList_10(); break; case 11: ChipLogProgress(chipTool, - " ***** Test Step 11 : TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list " - "MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " - "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " - "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PRS.S.Afffb")) { + " ***** Test Step 11 : Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.Afffb")) { NextTest(); return; } - err = TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11(); + err = TestReadTheFeatureDependentWNCVSF00Wncvsf02AttributeInAttributeList_11(); break; case 12: ChipLogProgress(chipTool, - " ***** Test Step 12 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " - "the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PRS.S.Afffa")) { + " ***** Test Step 12 : Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in " + "AttributeList\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 && WNCV.S.Afffb")) { NextTest(); return; } - err = TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); + err = TestReadTheFeatureDependentWNCVSF01Wncvsf04Wncvsf03AttributeInAttributeList_12(); break; case 13: ChipLogProgress(chipTool, - " ***** Test Step 13 : TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PRS.S.Afff9")) { + " ***** Test Step 13 : Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.Afffb")) { NextTest(); return; } - err = TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13(); + err = TestReadTheFeatureDependentWNCVSF01Wncvsf04AttributeInAttributeList_13(); break; case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: EventList\n"); + NextTest(); + return; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute\n"); + if (ShouldSkip("WNCV.S.Afff9")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_15(); + break; + case 16: ChipLogProgress(chipTool, - " ***** Test Step 14 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PRS.S.Afff8")) { + " ***** Test Step 16 : TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in AcceptedCommandList\n"); + if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F00 && WNCV.S.F02")) { NextTest(); return; } - err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_14(); + err = TestThReadsFeatureDependentWNCVSF00Wncvsf02CommandInAcceptedCommandList_16(); + break; + case 17: + ChipLogProgress(chipTool, + " ***** Test Step 17 : TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in AcceptedCommandList\n"); + if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F03")) { + NextTest(); + return; + } + err = TestThReadsFeatureDependentWNCVSF01Wncvsf03CommandInAcceptedCommandList_17(); + break; + case 18: + ChipLogProgress(chipTool, + " ***** Test Step 18 : TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in AcceptedCommandList\n"); + if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F04")) { + NextTest(); + return; + } + err = TestThReadsFeatureDependentWNCVSF01Wncvsf04CommandInAcceptedCommandList_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute\n"); + if (ShouldSkip("WNCV.S.Afff8")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutThe0xFFF8GeneratedCommandListAttribute_19(); break; } @@ -79091,8 +76211,23 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - } - + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + // Go on to the next test. ContinueOnChipMainThread(CHIP_NO_ERROR); } @@ -79104,7 +76239,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 15; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -79119,43 +76254,42 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsFromTheDutThe0xFFFDClusterRevisionAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"TH reads from the DUT the (0xFFFD) ClusterRevision attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("clusterRevision", [value unsignedShortValue], 5U)); + VerifyOrReturn(CheckConstraintMaxValue("clusterRevision", [value unsignedShortValue], 200U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestThReadsFromTheDutThe0xFFFCFeatureMapAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"TH reads from the DUT the (0xFFFC) FeatureMap attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -79171,17 +76305,15 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPrssf00extEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestGivenWncvsf00lfEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PRS.S.F00(EXT) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Given WNCV.S.F00(LF) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -79192,24 +76324,100 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalMandatoryAttributeAttributeList_4() + CHIP_ERROR TestGivenWncvsf01tlEnsureFeaturemapHasTheCorrectBitSet_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given WNCV.S.F01(TL) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestGivenWncvsf02paLfEnsureFeaturemapHasTheCorrectBitSet_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given WNCV.S.F02(PA_LF) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestGivenWncvsf03absEnsureFeaturemapHasTheCorrectBitSet_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given WNCV.S.F03(ABS) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestGivenWncvsf04paTlEnsureFeaturemapHasTheCorrectBitSet_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given WNCV.S.F04(PA_TL) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutThe0xFFFBAttributeListAttribute_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global mandatory attribute: AttributeList Error: %@", err); + NSLog(@"TH reads from the DUT the (0xFFFB) AttributeList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 13UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -79223,22 +76431,20 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeScaledValueInAttributeList_5() + CHIP_ERROR TestThReadsOptionalAttributeSafetyStatusInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(ScaledValue) in AttributeList Error: %@", err); + NSLog(@"TH reads optional attribute(SafetyStatus) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 26UL)); NextTest(); }]; @@ -79246,21 +76452,20 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMinScaledValueInAttributeList_6() + CHIP_ERROR TestReadTheFeatureDependentWNCVSF00Wncvsf02Wncvsf03AttributeInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(MinScaledValue) in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 & WNCV.S.F03) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); NextTest(); @@ -79269,22 +76474,21 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMaxScaledValueInAttributeList_7() + CHIP_ERROR TestReadTheFeatureDependentWNCVSF00Wncvsf02AttributeInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(MaxScaledValue) in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); NextTest(); }]; @@ -79292,22 +76496,21 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeScaleInAttributeList_8() + CHIP_ERROR TestReadTheFeatureDependentWNCVSF01Wncvsf04Wncvsf03AttributeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(Scale) in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); NextTest(); }]; @@ -79315,22 +76518,21 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_9() + CHIP_ERROR TestReadTheFeatureDependentWNCVSF01Wncvsf04AttributeInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); NextTest(); }]; @@ -79338,22 +76540,22 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeScaledToleranceInAttributeList_10() + CHIP_ERROR TestThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(ScaledTolerance) in AttributeList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); NextTest(); }]; @@ -79361,56 +76563,99 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11() + CHIP_ERROR TestThReadsFeatureDependentWNCVSF00Wncvsf02CommandInAcceptedCommandList_16() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() + CHIP_ERROR TestThReadsFeatureDependentWNCVSF01Wncvsf03CommandInAcceptedCommandList_17() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13() + CHIP_ERROR TestThReadsFeatureDependentWNCVSF01Wncvsf04CommandInAcceptedCommandList_18() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_14() + CHIP_ERROR TestThReadsFromTheDutThe0xFFF8GeneratedCommandListAttribute_19() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_PRS_2_1 : public TestCommandBridge { +class Test_TC_WNCV_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PRS_2_1() - : TestCommandBridge("Test_TC_PRS_2_1") + Test_TC_WNCV_2_1() + : TestCommandBridge("Test_TC_WNCV_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -79420,7 +76665,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PRS_2_1() {} + ~Test_TC_WNCV_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -79428,11 +76673,11 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -79449,76 +76694,214 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute constraints: MinMeasuredValue\n"); - if (ShouldSkip("PRS.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : 1a: read the RO mandatory attribute default: Type\n"); + if (ShouldSkip("WNCV.S.A0000")) { NextTest(); return; } - err = TestReadTheMandatoryAttributeConstraintsMinMeasuredValue_1(); + err = Test1aReadTheRoMandatoryAttributeDefaultType_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute constraints: MaxMeasuredValue\n"); - if (ShouldSkip("PRS.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: read the RO mandatory attribute default: ConfigStatus\n"); + if (ShouldSkip("WNCV.S.A0007")) { NextTest(); return; } - err = TestReadTheMandatoryAttributeConstraintsMaxMeasuredValue_2(); + err = Test1bReadTheRoMandatoryAttributeDefaultConfigStatus_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute constraints: MeasuredValue\n"); - if (ShouldSkip("PRS.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : 1c: read the RO mandatory attribute default: OperationalStatus\n"); + if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestReadTheMandatoryAttributeConstraintsMeasuredValue_3(); + err = Test1cReadTheRoMandatoryAttributeDefaultOperationalStatus_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute: Tolerance\n"); - if (ShouldSkip("PRS.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : 1d: read the RO mandatory attribute default: EndProductType\n"); + if (ShouldSkip("WNCV.S.A000d")) { NextTest(); return; } - err = TestReadTheOptionalAttributeTolerance_4(); + err = Test1dReadTheRoMandatoryAttributeDefaultEndProductType_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute: MinScaledValue\n"); - if (ShouldSkip("PRS.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : 1e: read the RW mandatory attribute default: Mode\n"); + if (ShouldSkip("WNCV.S.A0017")) { NextTest(); return; } - err = TestReadTheOptionalAttributeMinScaledValue_5(); + err = Test1eReadTheRwMandatoryAttributeDefaultMode_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute: MaxScaledValue\n"); - if (ShouldSkip("PRS.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : 1f: write a value into the RW mandatory attribute:: Mode\n"); + if (ShouldSkip("WNCV.S.A0017")) { NextTest(); return; } - err = TestReadTheOptionalAttributeMaxScaledValue_6(); + err = Test1fWriteAValueIntoTheRwMandatoryAttributeMode_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute: ScaledValue\n"); - if (ShouldSkip("PRS.S.A0010")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : 2a: read the RO optional attribute default: TargetPositionLiftPercent100ths\n"); + if (ShouldSkip("WNCV.S.A000b")) { NextTest(); return; } - err = TestReadTheOptionalAttributeScaledValue_7(); + err = Test2aReadTheRoOptionalAttributeDefaultTargetPositionLiftPercent100ths_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute: ScaledTolerance\n"); - if (ShouldSkip("PRS.S.A0013")) { + ChipLogProgress( + chipTool, " ***** Test Step 8 : 2b: read the RO optional attribute default: TargetPositionTiltPercent100ths\n"); + if (ShouldSkip("WNCV.S.A000c")) { NextTest(); return; } - err = TestReadTheOptionalAttributeScaledTolerance_8(); + err = Test2bReadTheRoOptionalAttributeDefaultTargetPositionTiltPercent100ths_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute: Scale\n"); - if (ShouldSkip("PRS.S.A0014")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : 2c: read the RO optional attribute default: CurrentPositionLiftPercent100ths\n"); + if (ShouldSkip("WNCV.S.A000e")) { NextTest(); return; } - err = TestReadTheOptionalAttributeScale_9(); + err = Test2cReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercent100ths_9(); + break; + case 10: + ChipLogProgress( + chipTool, " ***** Test Step 10 : 2d: read the RO optional attribute default: CurrentPositionTiltPercent100ths\n"); + if (ShouldSkip("WNCV.S.A000f")) { + NextTest(); + return; + } + err = Test2dReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercent100ths_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : 2e: read the RO optional attribute default: InstalledOpenLimitLift\n"); + if (ShouldSkip("WNCV.S.A0010")) { + NextTest(); + return; + } + err = Test2eReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_11(); + break; + case 12: + ChipLogProgress( + chipTool, " ***** Test Step 12 : 2f: read the RO optional attribute default: InstalledClosedLimitLift\n"); + if (ShouldSkip("WNCV.S.A0011")) { + NextTest(); + return; + } + err = Test2fReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : 2g: read the RO optional attribute default: InstalledOpenLimitTilt\n"); + if (ShouldSkip("WNCV.S.A0012")) { + NextTest(); + return; + } + err = Test2gReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_13(); + break; + case 14: + ChipLogProgress( + chipTool, " ***** Test Step 14 : 2h: read the RO optional attribute default: InstalledClosedLimitTilt\n"); + if (ShouldSkip("WNCV.S.A0013")) { + NextTest(); + return; + } + err = Test2hReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : 3a: read the RO mandatory attribute default: SafetyStatus\n"); + if (ShouldSkip("WNCV.S.A001a")) { + NextTest(); + return; + } + err = Test3aReadTheRoMandatoryAttributeDefaultSafetyStatus_15(); + break; + case 16: + ChipLogProgress( + chipTool, " ***** Test Step 16 : 3b: read the RO optional attribute default: PhysicalClosedLimitLift\n"); + if (ShouldSkip("WNCV.S.A0001")) { + NextTest(); + return; + } + err = Test3bReadTheRoOptionalAttributeDefaultPhysicalClosedLimitLift_16(); + break; + case 17: + ChipLogProgress( + chipTool, " ***** Test Step 17 : 3c: read the RO optional attribute default: PhysicalClosedLimitTilt\n"); + if (ShouldSkip("WNCV.S.A0002")) { + NextTest(); + return; + } + err = Test3cReadTheRoOptionalAttributeDefaultPhysicalClosedLimitTilt_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : 3d: read the RO optional attribute default: CurrentPositionLift\n"); + if (ShouldSkip("WNCV.S.A0003 && !WNCV.S.A0010 && !WNCV.S.A0011")) { + NextTest(); + return; + } + err = Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : 3d: read the RO optional attribute default: CurrentPositionLift\n"); + if (ShouldSkip("WNCV.S.A0003 && WNCV.S.A0010 && WNCV.S.A0011")) { + NextTest(); + return; + } + err = Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : 3e: read the RO optional attribute default: CurrentPositionTilt\n"); + if (ShouldSkip("WNCV.S.A0004 && !WNCV.S.A0012 && !WNCV.S.A0013")) { + NextTest(); + return; + } + err = Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : 3e: read the RO optional attribute default: CurrentPositionTilt\n"); + if (ShouldSkip("WNCV.S.A0004 && WNCV.S.A0012 && WNCV.S.A0013")) { + NextTest(); + return; + } + err = Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : 3f: read the RO optional attribute default: NumberOfActuationsLift\n"); + if (ShouldSkip("WNCV.S.A0005")) { + NextTest(); + return; + } + err = Test3fReadTheRoOptionalAttributeDefaultNumberOfActuationsLift_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : 3g: read the RO optional attribute default: NumberOfActuationsTilt\n"); + if (ShouldSkip("WNCV.S.A0006")) { + NextTest(); + return; + } + err = Test3gReadTheRoOptionalAttributeDefaultNumberOfActuationsTilt_23(); + break; + case 24: + ChipLogProgress( + chipTool, " ***** Test Step 24 : 3h: read the RO optional attribute default: CurrentPositionLiftPercentage\n"); + if (ShouldSkip("WNCV.S.A0008")) { + NextTest(); + return; + } + err = Test3hReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_24(); + break; + case 25: + ChipLogProgress( + chipTool, " ***** Test Step 25 : 3i:read the RO optional attribute default: CurrentPositionTiltPercentage\n"); + if (ShouldSkip("WNCV.S.A0009")) { + NextTest(); + return; + } + err = Test3ireadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_25(); break; } @@ -79561,6 +76944,54 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -79574,7 +77005,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 26; chip::Optional mNodeId; chip::Optional mCluster; @@ -79588,62 +77019,44 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMinMeasuredValue_1() + CHIP_ERROR Test1aReadTheRoMandatoryAttributeDefaultType_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute constraints: MinMeasuredValue Error: %@", err); + [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1a: read the RO mandatory attribute default: Type Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value shortValue], -32768)); - VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value shortValue], 32767)); - } - { - MinMeasuredValue = value; - } + VerifyOrReturn(CheckConstraintType("type", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("type", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("type", [value unsignedCharValue], 9U)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMaxMeasuredValue_2() + CHIP_ERROR Test1bReadTheRoMandatoryAttributeDefaultConfigStatus_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute constraints: MaxMeasuredValue Error: %@", err); + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1b: read the RO mandatory attribute default: ConfigStatus Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value shortValue], -32768)); - VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value shortValue], 32767)); - } - { - MaxMeasuredValue = value; - } + VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); NextTest(); }]; @@ -79651,26 +77064,21 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMeasuredValue_3() + CHIP_ERROR Test1cReadTheRoMandatoryAttributeDefaultOperationalStatus_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute constraints: MeasuredValue Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1c: read the RO mandatory attribute default: OperationalStatus Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("measuredValue", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value shortValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value shortValue], MaxMeasuredValue)); - } + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 127U)); NextTest(); }]; @@ -79678,111 +77086,90 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeTolerance_4() + CHIP_ERROR Test1dReadTheRoMandatoryAttributeDefaultEndProductType_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: Tolerance Error: %@", err); + [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1d: read the RO mandatory attribute default: EndProductType Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); + VerifyOrReturn(CheckConstraintType("endProductType", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("endProductType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("endProductType", [value unsignedCharValue], 23U)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable MinScaledValue; - CHIP_ERROR TestReadTheOptionalAttributeMinScaledValue_5() + CHIP_ERROR Test1eReadTheRwMandatoryAttributeDefaultMode_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: MinScaledValue Error: %@", err); + [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1e: read the RW mandatory attribute default: Mode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minScaledValue", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("minScaledValue", [value shortValue], -32768)); - VerifyOrReturn(CheckConstraintMaxValue("minScaledValue", [value shortValue], 32767)); - } - { - MinScaledValue = value; - } + VerifyOrReturn(CheckConstraintType("mode", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("mode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("mode", [value unsignedCharValue], 15U)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable MaxScaledValue; - CHIP_ERROR TestReadTheOptionalAttributeMaxScaledValue_6() + CHIP_ERROR Test1fWriteAValueIntoTheRwMandatoryAttributeMode_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: MaxScaledValue Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + id modeArgument; + modeArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeModeWithValue:modeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"1f: write a value into the RW mandatory attribute:: Mode Error: %@", err); - VerifyOrReturn(CheckConstraintType("maxScaledValue", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("maxScaledValue", [value shortValue], -32768)); - VerifyOrReturn(CheckConstraintMaxValue("maxScaledValue", [value shortValue], 32767)); - } - { - MaxScaledValue = value; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeScaledValue_7() + CHIP_ERROR Test2aReadTheRoOptionalAttributeDefaultTargetPositionLiftPercent100ths_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: ScaledValue Error: %@", err); + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2a: read the RO optional attribute default: TargetPositionLiftPercent100ths Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("scaledValue", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("scaledValue", [value shortValue], MinScaledValue)); - VerifyOrReturn(CheckConstraintMaxValue("scaledValue", [value shortValue], MaxScaledValue)); + VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "targetPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "targetPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); } NextTest(); @@ -79791,23 +77178,26 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeScaledTolerance_8() + CHIP_ERROR Test2bReadTheRoOptionalAttributeDefaultTargetPositionTiltPercent100ths_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: ScaledTolerance Error: %@", err); + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2b: read the RO optional attribute default: TargetPositionTiltPercent100ths Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("scaledTolerance", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("scaledTolerance", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("scaledTolerance", [value unsignedShortValue], 2048U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "targetPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "targetPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + } NextTest(); }]; @@ -79815,173 +77205,106 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeScale_9() + CHIP_ERROR Test2cReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercent100ths_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: Scale Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2c: read the RO optional attribute default: CurrentPositionLiftPercent100ths Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("scale", "int8s", "int8s")); - VerifyOrReturn(CheckConstraintMinValue("scale", [value charValue], -127)); - VerifyOrReturn(CheckConstraintMaxValue("scale", [value charValue], 127)); + if (value != nil) { - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } -}; -class Test_TC_PRS_2_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PRS_2_2() - : TestCommandBridge("Test_TC_PRS_2_2") - , mTestIndex(0) + CHIP_ERROR Test2dReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercent100ths_10() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PRS_2_2() {} + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2d: read the RO optional attribute default: CurrentPositionTiltPercent100ths Error: %@", err); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_2_2\n"); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (value != nil) { - Wait(); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + } - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MeasuredValue attribute\n"); - if (ShouldSkip("PRS.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheMeasuredValueAttribute_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Operate on device to change the pressure significantly\n"); - if (ShouldSkip("PICS_USER_PROMPT && PRS.M.PressureChange")) { - NextTest(); - return; - } - err = TestOperateOnDeviceToChangeThePressureSignificantly_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 2s\n"); - err = TestWait2s_3(); - break; - case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : After a few seconds, TH reads from the DUT the MeasuredValue attribute\n"); - if (ShouldSkip("PRS.S.A0000 && PRS.M.PressureChange")) { NextTest(); - return; - } - err = TestAfterAFewSecondsThReadsFromTheDutTheMeasuredValueAttribute_4(); - break; - } + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } + NSNumber * _Nonnull InstalledOpenLimitLift; - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR Test2eReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_11() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2e: read the RO optional attribute default: InstalledOpenLimitLift Error: %@", err); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitLift", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", [value unsignedShortValue], 65535U)); + { + InstalledOpenLimitLift = value; + } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - NSNumber * _Nullable ValueBeforeChange; + NSNumber * _Nonnull InstalledClosedLimitLift; - CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_1() + CHIP_ERROR Test2fReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the MeasuredValue attribute Error: %@", err); + [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2f: read the RO optional attribute default: InstalledClosedLimitLift Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitLift", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", [value unsignedShortValue], 65535U)); { - ValueBeforeChange = value; + InstalledClosedLimitLift = value; } NextTest(); @@ -79989,533 +77312,758 @@ class Test_TC_PRS_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull InstalledOpenLimitTilt; - CHIP_ERROR TestOperateOnDeviceToChangeThePressureSignificantly_2() + CHIP_ERROR Test2gReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_13() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestWait2s_3() - { + [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2g: read the RO optional attribute default: InstalledOpenLimitTilt Error: %@", err); - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs("alpha", value); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitTilt", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", [value unsignedShortValue], 65535U)); + { + InstalledOpenLimitTilt = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } + NSNumber * _Nonnull InstalledClosedLimitTilt; - CHIP_ERROR TestAfterAFewSecondsThReadsFromTheDutTheMeasuredValueAttribute_4() + CHIP_ERROR Test2hReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"After a few seconds, TH reads from the DUT the MeasuredValue attribute Error: %@", err); + [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2h: read the RO optional attribute default: InstalledClosedLimitTilt Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitTilt", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", [value unsignedShortValue], 65535U)); + { + InstalledClosedLimitTilt = value; } - VerifyOrReturn(CheckConstraintNotValue("measuredValue", value, ValueBeforeChange)); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_PCC_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PCC_1_1() - : TestCommandBridge("Test_TC_PCC_1_1") - , mTestIndex(0) + CHIP_ERROR Test3aReadTheRoMandatoryAttributeDefaultSafetyStatus_15() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PCC_1_1() {} + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - /////////// TestCommand Interface ///////// - void NextTest() override + [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: read the RO mandatory attribute default: SafetyStatus Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("safetyStatus", "bitmap16", "bitmap16")); + VerifyOrReturn(CheckConstraintMinValue("safetyStatus", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("safetyStatus", [value unsignedShortValue], 2047U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3bReadTheRoOptionalAttributeDefaultPhysicalClosedLimitLift_16() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_1_1\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: read the RO optional attribute default: PhysicalClosedLimitLift Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); - if (ShouldSkip("PCC.S.Afffd")) { - NextTest(); - return; - } - err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); - if (ShouldSkip(" PCC.S.Afffc && !PCC.S.F00 && !PCC.S.F01 && !PCC.S.F02 && !PCC.S.F03 && !PCC.S.F04 && !PCC.S.F05 && " - "!PCC.S.F06 ")) { - NextTest(); - return; - } - err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given PCC.S.F00(PRSCONST) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F00 && PCC.S.Afffc")) { - NextTest(); - return; - } - err = TestGivenPccsf00prsconstEnsureFeaturemapHasTheCorrectBitSet_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given PCC.S.F01(PRSCOMP) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F01 && PCC.S.Afffc")) { - NextTest(); - return; - } - err = TestGivenPccsf01prscompEnsureFeaturemapHasTheCorrectBitSet_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Given PCC.S.F02(FLW) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F02 && PCC.S.Afffc")) { - NextTest(); - return; - } - err = TestGivenPccsf02flwEnsureFeaturemapHasTheCorrectBitSet_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given PCC.S.F03(SPD) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F03 && PCC.S.Afffc")) { - NextTest(); - return; - } - err = TestGivenPccsf03spdEnsureFeaturemapHasTheCorrectBitSet_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Given PCC.S.F04(TEMP) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F04 && PCC.S.Afffc")) { - NextTest(); - return; - } - err = TestGivenPccsf04tempEnsureFeaturemapHasTheCorrectBitSet_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Given PCC.S.F05(AUTO) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F05 && PCC.S.Afffc")) { - NextTest(); - return; - } - err = TestGivenPccsf05autoEnsureFeaturemapHasTheCorrectBitSet_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Given PCC.S.F06(LOCAL) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F06 && PCC.S.Afffc")) { - NextTest(); - return; - } - err = TestGivenPccsf06localEnsureFeaturemapHasTheCorrectBitSet_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads the AttributeList attribute from the DUT\n"); - if (ShouldSkip("PCC.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsTheAttributeListAttributeFromTheDut_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0003 && PCC.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0004 && PCC.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0005 && PCC.S.Afffb")) { - NextTest(); - return; + VerifyOrReturn(CheckConstraintType("physicalClosedLimitLift", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("physicalClosedLimitLift", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("physicalClosedLimitLift", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3cReadTheRoOptionalAttributeDefaultPhysicalClosedLimitTilt_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: read the RO optional attribute default: PhysicalClosedLimitTilt Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("physicalClosedLimitTilt", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("physicalClosedLimitTilt", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("physicalClosedLimitTilt", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_18() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: read the RO optional attribute default: CurrentPositionLift Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionLift", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionLift", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", [value unsignedShortValue], 65535U)); } - err = TestThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_13(); - break; - case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0006 && PCC.S.Afffb")) { - NextTest(); - return; + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_19() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: read the RO optional attribute default: CurrentPositionLift Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionLift", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLift", [value unsignedShortValue], InstalledOpenLimitLift)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLift", [value unsignedShortValue], InstalledClosedLimitLift)); } - err = TestThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_14(); - break; - case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0007 && PCC.S.Afffb")) { - NextTest(); - return; + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_20() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3e: read the RO optional attribute default: CurrentPositionTilt Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionTilt", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionTilt", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", [value unsignedShortValue], 65535U)); } - err = TestThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_15(); - break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0008 && PCC.S.Afffb")) { - NextTest(); - return; + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_21() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3e: read the RO optional attribute default: CurrentPositionTilt Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionTilt", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTilt", [value unsignedShortValue], InstalledOpenLimitTilt)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTilt", [value unsignedShortValue], InstalledClosedLimitTilt)); } - err = TestThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0009 && PCC.S.Afffb")) { - NextTest(); - return; + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3fReadTheRoOptionalAttributeDefaultNumberOfActuationsLift_22() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3f: read the RO optional attribute default: NumberOfActuationsLift Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("numberOfActuationsLift", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("numberOfActuationsLift", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("numberOfActuationsLift", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3gReadTheRoOptionalAttributeDefaultNumberOfActuationsTilt_23() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3g: read the RO optional attribute default: NumberOfActuationsTilt Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("numberOfActuationsTilt", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("numberOfActuationsTilt", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("numberOfActuationsTilt", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3hReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_24() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3h: read the RO optional attribute default: CurrentPositionLiftPercentage Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); } - err = TestThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_17(); - break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A000a && PCC.S.Afffb")) { - NextTest(); - return; + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3ireadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_25() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3i:read the RO optional attribute default: CurrentPositionTiltPercentage Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); } - err = TestThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_18(); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_WNCV_2_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_WNCV_2_2() + : TestCommandBridge("Test_TC_WNCV_2_2") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_WNCV_2_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; - case 19: + case 1: ChipLogProgress(chipTool, - " ***** Test Step 19 : TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A000b && PCC.S.Afffb")) { + " ***** Test Step 1 : Reads ConfigStatus attribute from DUT, if (WNCV.S.F00(LF) & WNCV.S.F02(PA_LF)) value of bit " + "3 must be 1b else 0b\n"); + if (ShouldSkip("WNCV.S.A0007 && WNCV.S.F00 && WNCV.S.F02")) { NextTest(); return; } - err = TestThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_19(); + err = TestReadsConfigStatusAttributeFromDutIfWncvsf00lfWncvsf02paLfValueOfBit3MustBe1bElse0b_1(); break; - case 20: + case 2: ChipLogProgress(chipTool, - " ***** Test Step 20 : TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A000c && PCC.S.Afffb")) { + " ***** Test Step 2 : Reads ConfigStatus attribute from DUT, if (WNCV.S.F00(LF) & WNCV.S.F02(PA_LF)) value of bit " + "3 must be 1b else 0b\n"); + if (ShouldSkip("WNCV.S.A0007 && !WNCV.S.F00 && !WNCV.S.F02")) { NextTest(); return; } - err = TestThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_20(); + err = TestReadsConfigStatusAttributeFromDutIfWncvsf00lfWncvsf02paLfValueOfBit3MustBe1bElse0b_2(); break; - case 21: + case 3: ChipLogProgress(chipTool, - " ***** Test Step 21 : TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0010 && PCC.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_21(); - break; - case 22: - ChipLogProgress( - chipTool, " ***** Test Step 22 : TH reads optional attribute(Speed) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0014 && PCC.S.Afffb")) { + " ***** Test Step 3 : Reads ConfigStatus attribute from DUT, if (WNCV.S.F01(TL) & WNCV.S.F04(PA_TL)) value of bit " + "4 must be 1b else 0b,\n"); + if (ShouldSkip("WNCV.S.A0007 && WNCV.S.F01 && WNCV.S.F04")) { NextTest(); return; } - err = TestThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_22(); + err = TestReadsConfigStatusAttributeFromDutIfWncvsf01tlWncvsf04paTlValueOfBit4MustBe1bElse0b_3(); break; - case 23: + case 4: ChipLogProgress(chipTool, - " ***** Test Step 23 : TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the " - "DUT\n"); - if (ShouldSkip("PCC.S.A0015 && PCC.S.Afffb")) { + " ***** Test Step 4 : Reads ConfigStatus attribute from DUT, if (WNCV.S.F01(TL) & WNCV.S.F04(PA_TL)) value of bit " + "4 must be 1b else 0b,\n"); + if (ShouldSkip("WNCV.S.A0007 && !WNCV.S.F01 && !WNCV.S.F04")) { NextTest(); return; } - err = TestThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_23(); + err = TestReadsConfigStatusAttributeFromDutIfWncvsf01tlWncvsf04paTlValueOfBit4MustBe1bElse0b_4(); break; - case 24: + case 5: ChipLogProgress( - chipTool, " ***** Test Step 24 : TH reads optional attribute(Power) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0016 && PCC.S.Afffb")) { + chipTool, " ***** Test Step 5 : Reads ConfigStatus attribute from DUT, value of bit 0 must be 1b (operational)\n"); + if (ShouldSkip("WNCV.S.A0007")) { NextTest(); return; } - err = TestThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_24(); + err = TestReadsConfigStatusAttributeFromDutValueOfBit0MustBe1bOperational_5(); break; - case 25: - ChipLogProgress(chipTool, - " ***** Test Step 25 : TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the " - "DUT\n"); - if (ShouldSkip("PCC.S.A0017 && PCC.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_25(); + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 26: - ChipLogProgress(chipTool, - " ***** Test Step 26 : TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0021 && PCC.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_26(); + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : TH reads AttributeList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PCC.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads EventList from DUT\n"); - if (ShouldSkip(" PCC.S.Afffa && !PCC.S.E00 && !PCC.S.E01 && !PCC.S.E02 && !PCC.S.E03 && !PCC.S.E04 && !PCC.S.E05 && " - "!PCC.S.E06 && !PCC.S.E07 && !PCC.S.E08 && !PCC.S.E09 && !PCC.S.E0a && !PCC.S.E0b && !PCC.S.E0c && " - "!PCC.S.E0d && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 ")) { - NextTest(); - return; - } - err = TestThReadsEventListFromDut_28(); + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: - ChipLogProgress( - chipTool, " ***** Test Step 29 : TH reads from the DUT the EventList optional (SupplyVoltageLow)attribute.\n"); - if (ShouldSkip("PCC.S.E00 && PCC.S.Afffa")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheEventListOptionalSupplyVoltageLowattribute_29(); + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 30: - ChipLogProgress( - chipTool, " ***** Test Step 30 : TH reads from the DUT the EventList optional (SupplyVoltageHigh)attribute.\n"); - if (ShouldSkip("PCC.S.E01 && PCC.S.Afffa")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheEventListOptionalSupplyVoltageHighattribute_30(); + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: - ChipLogProgress( - chipTool, " ***** Test Step 31 : TH reads from the DUT the EventList optional (PowerMissingPhase)attribute.\n"); - if (ShouldSkip("PCC.S.E02 && PCC.S.Afffa")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheEventListOptionalPowerMissingPhaseattribute_31(); + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 6; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadsConfigStatusAttributeFromDutIfWncvsf00lfWncvsf02paLfValueOfBit3MustBe1bElse0b_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads ConfigStatus attribute from DUT, if (WNCV.S.F00(LF) & WNCV.S.F02(PA_LF)) value of bit 3 must be 1b else " + @"0b Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsConfigStatusAttributeFromDutIfWncvsf00lfWncvsf02paLfValueOfBit3MustBe1bElse0b_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads ConfigStatus attribute from DUT, if (WNCV.S.F00(LF) & WNCV.S.F02(PA_LF)) value of bit 3 must be 1b else " + @"0b Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsConfigStatusAttributeFromDutIfWncvsf01tlWncvsf04paTlValueOfBit4MustBe1bElse0b_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads ConfigStatus attribute from DUT, if (WNCV.S.F01(TL) & WNCV.S.F04(PA_TL)) value of bit 4 must be 1b else " + @"0b, Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsConfigStatusAttributeFromDutIfWncvsf01tlWncvsf04paTlValueOfBit4MustBe1bElse0b_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads ConfigStatus attribute from DUT, if (WNCV.S.F01(TL) & WNCV.S.F04(PA_TL)) value of bit 4 must be 1b else " + @"0b, Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsConfigStatusAttributeFromDutValueOfBit0MustBe1bOperational_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads ConfigStatus attribute from DUT, value of bit 0 must be 1b (operational) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_WNCV_2_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_WNCV_2_3() + : TestCommandBridge("Test_TC_WNCV_2_3") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_WNCV_2_3() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_3\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; - case 32: - ChipLogProgress( - chipTool, " ***** Test Step 32 : TH reads from the DUT the EventList optional (SystemPressureLow)attribute.\n"); - if (ShouldSkip("PCC.S.E03 && PCC.S.Afffa")) { + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : 1a: TH set the Mode Attribute bit0 of the DUT\n"); + if (ShouldSkip("WNCV.S.M.Reversal && WNCV.S.A0017")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalSystemPressureLowattribute_32(); + err = Test1aThSetTheModeAttributeBit0OfTheDut_1(); break; - case 33: - ChipLogProgress( - chipTool, " ***** Test Step 33 : TH reads from the DUT the EventList optional (SystemPressureHigh)attribute.\n"); - if (ShouldSkip("PCC.S.E04 && PCC.S.Afffa")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: TH reads ConfigStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.M.Reversal && WNCV.S.A0007")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalSystemPressureHighattribute_33(); + err = Test1bThReadsConfigStatusAttributeFromDut_2(); break; - case 34: - ChipLogProgress( - chipTool, " ***** Test Step 34 : TH reads from the DUT the EventList optional (DryRunning)attribute.\n"); - if (ShouldSkip("PCC.S.E05 && PCC.S.Afffa")) { + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : 1c: TH clear the Mode Attribute bit0 of the DUT\n"); + if (ShouldSkip("WNCV.S.M.Reversal && WNCV.S.A0017")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalDryRunningattribute_34(); + err = Test1cThClearTheModeAttributeBit0OfTheDut_3(); break; - case 35: - ChipLogProgress( - chipTool, " ***** Test Step 35 : TH reads from the DUT the EventList optional (MotorTemperatureHigh)attribute.\n"); - if (ShouldSkip("PCC.S.E06 && PCC.S.Afffa")) { + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : 1d: TH reads ConfigStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.M.Reversal && WNCV.S.A0007")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalMotorTemperatureHighattribute_35(); + err = Test1dThReadsConfigStatusAttributeFromDut_4(); break; - case 36: - ChipLogProgress( - chipTool, " ***** Test Step 36 : TH reads from the DUT the EventList optional (PumpMotorFatalFailure)attribute.\n"); - if (ShouldSkip("PCC.S.E07 && PCC.S.Afffa")) { + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : 2a: TH set the Mode Attribute bit1 of the DUT\n"); + if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0017")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalPumpMotorFatalFailureattribute_36(); + err = Test2aThSetTheModeAttributeBit1OfTheDut_5(); break; - case 37: - ChipLogProgress(chipTool, - " ***** Test Step 37 : TH reads from the DUT the EventList optional (ElectronicTemperatureHigh)attribute.\n"); - if (ShouldSkip("PCC.S.E08 && PCC.S.Afffa")) { + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : 2b: TH reads ConfigStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0007")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalElectronicTemperatureHighattribute_37(); + err = Test2bThReadsConfigStatusAttributeFromDut_6(); break; - case 38: + case 7: ChipLogProgress( - chipTool, " ***** Test Step 38 : TH reads from the DUT the EventList optional (PumpBlocked)attribute.\n"); - if (ShouldSkip("PCC.S.E09 && PCC.S.Afffa")) { + chipTool, " ***** Test Step 7 : 2c: If (ConfigStatus bit0 == 0) TH send DownOrClose command to the DUT\n"); + if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalPumpBlockedattribute_38(); + err = Test2cIfConfigStatusBit00ThSendDownOrCloseCommandToTheDut_7(); break; - case 39: - ChipLogProgress( - chipTool, " ***** Test Step 39 : TH reads from the DUT the EventList optional (SensorFailure)attribute.\n"); - if (ShouldSkip("PCC.S.E0a && PCC.S.Afffa")) { + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : 2d: TH clear the Mode Attribute bit1 of the DUT\n"); + if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0017")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalSensorFailureattribute_39(); + err = Test2dThClearTheModeAttributeBit1OfTheDut_8(); break; - case 40: - ChipLogProgress(chipTool, - " ***** Test Step 40 : TH reads from the DUT the EventList optional (ElectronicNonFatalFailure)attribute.\n"); - if (ShouldSkip("PCC.S.E0b && PCC.S.Afffa")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : 2e: TH reads ConfigStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0007")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalElectronicNonFatalFailureattribute_40(); + err = Test2eThReadsConfigStatusAttributeFromDut_9(); break; - case 41: - ChipLogProgress(chipTool, - " ***** Test Step 41 : TH reads from the DUT the EventList optional (ElectronicFatalFailure)attribute.\n"); - if (ShouldSkip("PCC.S.E0c && PCC.S.Afffa")) { + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : 2f: TH reads the Mode Attribute from the DUT\n"); + if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0017")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalElectronicFatalFailureattribute_41(); + err = Test2fThReadsTheModeAttributeFromTheDut_10(); break; - case 42: - ChipLogProgress( - chipTool, " ***** Test Step 42 : TH reads from the DUT the EventList optional (GeneralFault)attribute.\n"); - if (ShouldSkip("PCC.S.E0d && PCC.S.Afffa")) { + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : 2g: TH send DownOrClose command to the DUT\n"); + if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalGeneralFaultattribute_42(); + err = Test2gThSendDownOrCloseCommandToTheDut_11(); break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : TH reads from the DUT the EventList optional (Leakage)attribute.\n"); - if (ShouldSkip("PCC.S.E0e && PCC.S.Afffa")) { + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : 3a: TH set the Mode Attribute bit2 of the DUT\n"); + if (ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.A0017")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalLeakageattribute_43(); + err = Test3aThSetTheModeAttributeBit2OfTheDut_12(); break; - case 44: - ChipLogProgress( - chipTool, " ***** Test Step 44 : TH reads from the DUT the EventList optional (AirDetection)attribute.\n"); - if (ShouldSkip("PCC.S.E0f && PCC.S.Afffa")) { + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : 3b: TH send DownOrClose command to the DUT\n"); + if (ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalAirDetectionattribute_44(); + err = Test3bThSendDownOrCloseCommandToTheDut_13(); break; - case 45: - ChipLogProgress( - chipTool, " ***** Test Step 45 : TH reads from the DUT the EventList optional (TurbineOperation)attribute.\n"); - if (ShouldSkip("PCC.S.E10 && PCC.S.Afffa")) { + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : 3c: TH reads ConfigStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.A0007")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEventListOptionalTurbineOperationattribute_45(); + err = Test3cThReadsConfigStatusAttributeFromDut_14(); break; - case 46: - ChipLogProgress(chipTool, - " ***** Test Step 46 : TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values " - "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2. The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 3. The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " - "the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PCC.S.Afffa")) { + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : 3d: TH clear the Mode Attribute bit2 of the DUT\n"); + if (ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.A0017")) { NextTest(); return; } - err = TestThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_46(); + err = Test3dThClearTheModeAttributeBit2OfTheDut_15(); break; - case 47: - ChipLogProgress(chipTool, - " ***** Test Step 47 : TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PCC.S.Afff9")) { + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : 3e: TH send DownOrClose command to the DUT\n"); + if (ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_47(); + err = Test3eThSendDownOrCloseCommandToTheDut_16(); break; - case 48: - ChipLogProgress(chipTool, - " ***** Test Step 48 : TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PCC.S.Afff8")) { + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : 3f: TH reads ConfigStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.A0007")) { NextTest(); return; } - err = TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_48(); + err = Test3fThReadsConfigStatusAttributeFromDut_17(); break; } @@ -80550,7 +78098,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -80568,7 +78116,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_BUSY)); break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -80582,99 +78130,6 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -80688,7 +78143,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 49; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -80703,233 +78158,211 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() + CHIP_ERROR Test1aThSetTheModeAttributeBit0OfTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id modeArgument; + modeArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeModeWithValue:modeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"1a: TH set the Mode Attribute bit0 of the DUT Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() + CHIP_ERROR Test1bThReadsConfigStatusAttributeFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1b: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 4U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPccsf00prsconstEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR Test1cThClearTheModeAttributeBit0OfTheDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PCC.S.F00(PRSCONST) ensure featuremap has the correct bit set Error: %@", err); + id modeArgument; + modeArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeModeWithValue:modeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"1c: TH clear the Mode Attribute bit0 of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPccsf01prscompEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR Test1dThReadsConfigStatusAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PCC.S.F01(PRSCOMP) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1d: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPccsf02flwEnsureFeaturemapHasTheCorrectBitSet_5() + CHIP_ERROR Test2aThSetTheModeAttributeBit1OfTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PCC.S.F02(FLW) ensure featuremap has the correct bit set Error: %@", err); + id modeArgument; + modeArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster writeAttributeModeWithValue:modeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"2a: TH set the Mode Attribute bit1 of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull configStatusValA; - CHIP_ERROR TestGivenPccsf03spdEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR Test2bThReadsConfigStatusAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PCC.S.F03(SPD) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2b: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); + { + configStatusValA = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPccsf04tempEnsureFeaturemapHasTheCorrectBitSet_7() + CHIP_ERROR Test2cIfConfigStatusBit00ThSendDownOrCloseCommandToTheDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PCC.S.F04(TEMP) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + NSLog(@"2c: If (ConfigStatus bit0 == 0) TH send DownOrClose command to the DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_FAILURE)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPccsf05autoEnsureFeaturemapHasTheCorrectBitSet_8() + CHIP_ERROR Test2dThClearTheModeAttributeBit1OfTheDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PCC.S.F05(AUTO) ensure featuremap has the correct bit set Error: %@", err); + id modeArgument; + modeArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeModeWithValue:modeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"2d: TH clear the Mode Attribute bit1 of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenPccsf06localEnsureFeaturemapHasTheCorrectBitSet_9() + CHIP_ERROR Test2eThReadsConfigStatusAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given PCC.S.F06(LOCAL) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2e: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_10() + CHIP_ERROR Test2fThReadsTheModeAttributeFromTheDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the AttributeList attribute from the DUT Error: %@", err); + [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2f: TH reads the Mode Attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 32UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintMinValue("mode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("mode", [value unsignedCharValue], 127U)); NextTest(); }]; @@ -80937,91 +78370,82 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_11() + CHIP_ERROR Test2gThSendDownOrCloseCommandToTheDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT Error: %@", err); + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + NSLog(@"2g: TH send DownOrClose command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_12() + CHIP_ERROR Test3aThSetTheModeAttributeBit2OfTheDut_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id modeArgument; + modeArgument = [NSNumber numberWithUnsignedChar:4U]; + [cluster writeAttributeModeWithValue:modeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"3a: TH set the Mode Attribute bit2 of the DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_13() + CHIP_ERROR Test3bThSendDownOrCloseCommandToTheDut_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + NSLog(@"3b: TH send DownOrClose command to the DUT Error: %@", err); + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_BUSY)); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull configStatusValB; - CHIP_ERROR TestThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_14() + CHIP_ERROR Test3cThReadsConfigStatusAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT Error: %@", err); + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); + { + configStatusValB = value; + } NextTest(); }]; @@ -81029,252 +78453,660 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_15() + CHIP_ERROR Test3dThClearTheModeAttributeBit2OfTheDut_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id modeArgument; + modeArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeModeWithValue:modeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"3d: TH clear the Mode Attribute bit2 of the DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_16() + CHIP_ERROR Test3eThSendDownOrCloseCommandToTheDut_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT Error: %@", err); + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + NSLog(@"3e: TH send DownOrClose command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_17() + CHIP_ERROR Test3fThReadsConfigStatusAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT Error: %@", err); + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3f: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_18() +class Test_TC_WNCV_2_5 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_WNCV_2_5() + : TestCommandBridge("Test_TC_WNCV_2_5") + , mTestIndex(0) { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + ~Test_TC_WNCV_2_5() {} - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT Error: %@", err); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_5\n"); + } - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_5\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - NextTest(); - }]; + Wait(); - return CHIP_NO_ERROR; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads EndProductType attribute from DUT\n"); + if (ShouldSkip("WNCV.S.A000d")) { + NextTest(); + return; + } + err = TestThReadsEndProductTypeAttributeFromDut_1(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_19() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT Error: %@", err); + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_20() + CHIP_ERROR TestThReadsEndProductTypeAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT Error: %@", err); + [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EndProductType attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); + VerifyOrReturn(CheckConstraintType("endProductType", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("endProductType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("endProductType", [value unsignedCharValue], 23U)); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_21() +class Test_TC_WNCV_3_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_WNCV_3_1() + : TestCommandBridge("Test_TC_WNCV_3_1") + , mTestIndex(0) { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + ~Test_TC_WNCV_3_1() {} - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT Error: %@", err); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_1\n"); + } - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - NextTest(); - }]; + Wait(); - return CHIP_NO_ERROR; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); + err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, + " ***** Test Step 1 : 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction\n"); + if (ShouldSkip("WNCV.S.C01.Rsp")) { + NextTest(); + return; + } + err = Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: TH Waits for 10 seconds movement(s) on the device\n"); + err = Test1bThWaitsFor10SecondsMovementsOnTheDevice_2(); + break; + case 3: + ChipLogProgress( + chipTool, " ***** Test Step 3 : 1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { + NextTest(); + return; + } + err = Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : 1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { + NextTest(); + return; + } + err = Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4(); + break; + case 5: + ChipLogProgress( + chipTool, " ***** Test Step 5 : 1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { + NextTest(); + return; + } + err = Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : 1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { + NextTest(); + return; + } + err = Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Report: 2: Subscribe to DUT reports on OperationalStatus attribute\n"); + err = TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : 2: Subscribe to DUT reports on OperationalStatus attribute\n"); + err = Test2SubscribeToDutReportsOnOperationalStatusAttribute_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : 2a: TH sends UpOrOpen command to DUT\n"); + if (ShouldSkip("WNCV.S.C00.Rsp")) { + NextTest(); + return; + } + err = Test2aThSendsUpOrOpenCommandToDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : 2b: DUT updates its attributes\n"); + err = Test2bDutUpdatesItsAttributes_10(); + break; + case 11: + ChipLogProgress( + chipTool, " ***** Test Step 11 : 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { + NextTest(); + return; + } + err = Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11(); + break; + case 12: + ChipLogProgress( + chipTool, " ***** Test Step 12 : 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { + NextTest(); + return; + } + err = Test2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : 2e: TH leave the device moving for 2 seconds\n"); + err = Test2eThLeaveTheDeviceMovingFor2Seconds_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : 3a: TH reads OperationalStatus attribute's bit 0..1\n"); + if (ShouldSkip("WNCV.S.A000a && PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = Test3aThReadsOperationalStatusAttributesBit01_14(); + break; + case 15: + ChipLogProgress( + chipTool, " ***** Test Step 15 : 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))\n"); + if (ShouldSkip("WNCV.S.A000a && WNCV.S.F00 && PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15(); + break; + case 16: + ChipLogProgress( + chipTool, " ***** Test Step 16 : 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))\n"); + if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F00 && PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16(); + break; + case 17: + ChipLogProgress( + chipTool, " ***** Test Step 17 : 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))\n"); + if (ShouldSkip("WNCV.S.A000a && WNCV.S.F01 && PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17(); + break; + case 18: + ChipLogProgress( + chipTool, " ***** Test Step 18 : 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))\n"); + if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F01 && PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : 3a: TH reads OperationalStatus attribute from DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = Test3aThReadsOperationalStatusAttributeFromDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : 3a2: DUT updates its attributes\n"); + err = Test3a2DutUpdatesItsAttributes_20(); + break; + case 21: + ChipLogProgress( + chipTool, " ***** Test Step 21 : 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { + NextTest(); + return; + } + err = Test3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21(); + break; + case 22: + ChipLogProgress(chipTool, + " ***** Test Step 22 : 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { + NextTest(); + return; + } + err = Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22(); + break; + case 23: + ChipLogProgress( + chipTool, " ***** Test Step 23 : 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { + NextTest(); + return; + } + err = Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23(); + break; + case 24: + ChipLogProgress(chipTool, + " ***** Test Step 24 : 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { + NextTest(); + return; + } + err = Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : 4a: TH sends a StopMotion command to DUT\n"); + if (ShouldSkip("WNCV.S.C02.Rsp")) { + NextTest(); + return; + } + err = Test4aThSendsAStopMotionCommandToDut_25(); + break; + case 26: + ChipLogProgress( + chipTool, " ***** Test Step 26 : 4b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); + err = Test4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26(); + break; + case 27: + ChipLogProgress( + chipTool, " ***** Test Step 27 : 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion\n"); + if (ShouldSkip("WNCV.S.A000a")) { + NextTest(); + return; + } + err = Test4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : 5a: TH waits for x seconds attributes update on the device\n"); + err = Test5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28(); + break; + case 29: + ChipLogProgress( + chipTool, " ***** Test Step 29 : 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { + NextTest(); + return; + } + err = Test5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29(); + break; + case 30: + ChipLogProgress( + chipTool, " ***** Test Step 30 : 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { + NextTest(); + return; + } + err = Test5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_22() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(Speed) attribute in AttributeList from the DUT Error: %@", err); + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 31; - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_23() + CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the DUT Error: %@", err); + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 21UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_24() + CHIP_ERROR Test1bThWaitsFor10SecondsMovementsOnTheDevice_2() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(Power) attribute in AttributeList from the DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 22UL)); + if (value != nil) { - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_25() + CHIP_ERROR Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); + } NextTest(); }]; @@ -81282,151 +79114,159 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_26() + CHIP_ERROR Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 33UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + if (value != nil) { - return CHIP_NO_ERROR; - } + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + } - CHIP_ERROR - TestThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() - { + NextTest(); + }]; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEventListFromDut_28() + CHIP_ERROR Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } + bool testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled = false; + ResponseHandler _Nullable test_Test_TC_WNCV_3_1_OperationalStatus_Reported = nil; - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalSupplyVoltageLowattribute_29() + CHIP_ERROR TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (SupplyVoltageLow)attribute. Error: %@", err); + test_Test_TC_WNCV_3_1_OperationalStatus_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Report: 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 0UL)); - - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); + testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled = true; + }; + NextTest(); return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalSupplyVoltageHighattribute_30() + CHIP_ERROR Test2SubscribeToDutReportsOnOperationalStatusAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (SupplyVoltageHigh)attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); + uint16_t minIntervalArgument = 4U; + uint16_t maxIntervalArgument = 5U; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + params.filterByFabric = true; + params.replaceExistingSubscriptions = true; + [cluster subscribeAttributeOperationalStatusWithParams:params + subscriptionEstablished:^{ + VerifyOrReturn( + testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); + NextTest(); + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (test_Test_TC_WNCV_3_1_OperationalStatus_Reported != nil) { + ResponseHandler callback = test_Test_TC_WNCV_3_1_OperationalStatus_Reported; + test_Test_TC_WNCV_3_1_OperationalStatus_Reported = nil; + callback(value, err); + } + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalPowerMissingPhaseattribute_31() + CHIP_ERROR Test2aThSendsUpOrOpenCommandToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (PowerMissingPhase)attribute. Error: %@", err); + [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { + NSLog(@"2a: TH sends UpOrOpen command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 2UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalSystemPressureLowattribute_32() + CHIP_ERROR Test2bDutUpdatesItsAttributes_10() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (SystemPressureLow)attribute. Error: %@", err); + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 3UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("TargetPositionLiftPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("TargetPositionLiftPercent100ths", actualValue, 0U)); + } NextTest(); }]; @@ -81434,22 +79274,23 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalSystemPressureHighattribute_33() + CHIP_ERROR Test2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (SystemPressureHigh)attribute. Error: %@", err); + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 4UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("TargetPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("TargetPositionTiltPercent100ths", actualValue, 0U)); + } NextTest(); }]; @@ -81457,160 +79298,175 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalDryRunningattribute_34() + CHIP_ERROR Test2eThLeaveTheDeviceMovingFor2Seconds_13() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit01_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (DryRunning)attribute. Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 5UL)); - + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalMotorTemperatureHighattribute_35() + CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (MotorTemperatureHigh)attribute. Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 6UL)); - + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalPumpMotorFatalFailureattribute_36() + CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (PumpMotorFatalFailure)attribute. Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 7UL)); - + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalElectronicTemperatureHighattribute_37() + CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (ElectronicTemperatureHigh)attribute. Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 8UL)); - + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalPumpBlockedattribute_38() + CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (PumpBlocked)attribute. Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 9UL)); - + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalSensorFailureattribute_39() + CHIP_ERROR Test3aThReadsOperationalStatusAttributeFromDut_19() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR Test3a2DutUpdatesItsAttributes_20() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (SensorFailure)attribute. Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 10UL)); + if (value != nil) { - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalElectronicNonFatalFailureattribute_40() + CHIP_ERROR Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (ElectronicNonFatalFailure)attribute. Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 11UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); + } NextTest(); }]; @@ -81618,45 +79474,54 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalElectronicFatalFailureattribute_41() + CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (ElectronicFatalFailure)attribute. Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 12UL)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalGeneralFaultattribute_42() + CHIP_ERROR Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (GeneralFault)attribute. Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 13UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); + } NextTest(); }]; @@ -81664,45 +79529,48 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalLeakageattribute_43() + CHIP_ERROR Test4aThSendsAStopMotionCommandToDut_25() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (Leakage)attribute. Error: %@", err); + [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { + NSLog(@"4a: TH sends a StopMotion command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 14UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalAirDetectionattribute_44() + CHIP_ERROR Test4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (AirDetection)attribute. Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 15UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); + } NextTest(); }]; @@ -81710,22 +79578,34 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEventListOptionalTurbineOperationattribute_45() + CHIP_ERROR Test5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EventList optional (TurbineOperation)attribute. Error: %@", err); + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 16UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "targetPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "targetPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); + } NextTest(); }]; @@ -81733,45 +79613,39 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_46() + CHIP_ERROR Test5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_47() - { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR - TestThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_48() - { + if (value != nil) { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "targetPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "targetPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_PCC_2_1 : public TestCommandBridge { +class Test_TC_WNCV_3_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PCC_2_1() - : TestCommandBridge("Test_TC_PCC_2_1") + Test_TC_WNCV_3_2() + : TestCommandBridge("Test_TC_WNCV_3_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -81781,7 +79655,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PCC_2_1() {} + ~Test_TC_WNCV_3_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -81789,11 +79663,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -81806,192 +79680,235 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); + err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: MaxPressure\n"); - if (ShouldSkip("PCC.S.A0000")) { + ChipLogProgress( + chipTool, " ***** Test Step 1 : 1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction\n"); + if (ShouldSkip("WNCV.S.C00.Rsp")) { NextTest(); return; } - err = TestReadTheMandatoryAttributeMaxPressure_1(); + err = Test1aThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MaxSpeed\n"); - if (ShouldSkip("PCC.S.A0001")) { - NextTest(); - return; - } - err = TestReadTheMandatoryAttributeMaxSpeed_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: TH Waits for 10 seconds movement(s) on the device\n"); + err = Test1bThWaitsFor10SecondsMovementsOnTheDevice_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute: MaxFlow\n"); - if (ShouldSkip("PCC.S.A0002")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : 1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { NextTest(); return; } - err = TestReadTheMandatoryAttributeMaxFlow_3(); + err = Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute: MinConstPressure\n"); - if (ShouldSkip("PCC.S.A0003")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : 1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { NextTest(); return; } - err = TestReadTheOptionalAttributeMinConstPressure_4(); + err = Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute: MaxConstPressure\n"); - if (ShouldSkip("PCC.S.A0004")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : 1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { NextTest(); return; } - err = TestReadTheOptionalAttributeMaxConstPressure_5(); + err = Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute: MinCompPressure\n"); - if (ShouldSkip("PCC.S.A0005")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : 1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { NextTest(); return; } - err = TestReadTheOptionalAttributeMinCompPressure_6(); + err = Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute: MaxCompPressure\n"); - if (ShouldSkip("PCC.S.A0006")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeMaxCompPressure_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Report: 2: Subscribe to DUT reports on OperationalStatus attribute\n"); + err = TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute: MinConstSpeed\n"); - if (ShouldSkip("PCC.S.A0007")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeMinConstSpeed_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : 2: Subscribe to DUT reports on OperationalStatus attribute\n"); + err = Test2SubscribeToDutReportsOnOperationalStatusAttribute_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute: MaxConstSpeed\n"); - if (ShouldSkip("PCC.S.A0008")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : 2a: TH sends DownOrClose command to DUT\n"); + if (ShouldSkip("WNCV.S.C01.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalAttributeMaxConstSpeed_9(); + err = Test2aThSendsDownOrCloseCommandToDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute: MinConstFlow\n"); - if (ShouldSkip("PCC.S.A0009")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeMinConstFlow_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : 2b: DUT updates its attributes\n"); + err = Test2bDutUpdatesItsAttributes_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute: MaxConstFlow\n"); - if (ShouldSkip("PCC.S.A000a")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { NextTest(); return; } - err = TestReadTheOptionalAttributeMaxConstFlow_11(); + err = Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read the optional attribute: MinConstTemp\n"); - if (ShouldSkip("PCC.S.A000b")) { + ChipLogProgress( + chipTool, " ***** Test Step 12 : 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { NextTest(); return; } - err = TestReadTheOptionalAttributeMinConstTemp_12(); + err = Test2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional attribute: MaxConstTemp\n"); - if (ShouldSkip("PCC.S.A000c")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeMaxConstTemp_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : 2e: TH leave the device moving for 2 seconds\n"); + err = Test2eThLeaveTheDeviceMovingFor2Seconds_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the optional attribute: PumpStatus\n"); - if (ShouldSkip("PCC.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : 3a: TH reads OperationalStatus attribute's bit 0..1\n"); + if (ShouldSkip("WNCV.S.A000a && PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestReadTheOptionalAttributePumpStatus_14(); + err = Test3aThReadsOperationalStatusAttributesBit01_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read attribute: EffectiveOperationMode\n"); - if (ShouldSkip("PCC.S.A0011")) { + ChipLogProgress( + chipTool, " ***** Test Step 15 : 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))\n"); + if (ShouldSkip("WNCV.S.A000a && WNCV.S.F00 && PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestReadAttributeEffectiveOperationMode_15(); + err = Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read attribute: EffectiveControlMode\n"); - if (ShouldSkip("PCC.S.A0012")) { + ChipLogProgress( + chipTool, " ***** Test Step 16 : 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))\n"); + if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F00 && PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestReadAttributeEffectiveControlMode_16(); + err = Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read attribute: Capacity\n"); - if (ShouldSkip("PCC.S.A0013")) { + ChipLogProgress( + chipTool, " ***** Test Step 17 : 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))\n"); + if (ShouldSkip("WNCV.S.A000a && WNCV.S.F01 && PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestReadAttributeCapacity_17(); + err = Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read the optional attribute: Speed\n"); - if (ShouldSkip("PCC.S.A0014")) { + ChipLogProgress( + chipTool, " ***** Test Step 18 : 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))\n"); + if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F01 && PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestReadTheOptionalAttributeSpeed_18(); + err = Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read the optional attribute: LifetimeRunningHours\n"); - if (ShouldSkip("PCC.S.A0015")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : 3a: TH reads OperationalStatus attribute from DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheOptionalAttributeLifetimeRunningHours_19(); + err = Test3aThReadsOperationalStatusAttributeFromDut_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Read the optional attribute: Power\n"); - if (ShouldSkip("PCC.S.A0016")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributePower_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : 3a2: DUT updates its attributes\n"); + err = Test3a2DutUpdatesItsAttributes_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read the optional attribute: LifetimeEnergyConsumed\n"); - if (ShouldSkip("PCC.S.A0017")) { + ChipLogProgress( + chipTool, " ***** Test Step 21 : 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { NextTest(); return; } - err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_21(); + err = Test3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Read optional attribute: OperationMode\n"); - if (ShouldSkip("PCC.S.A0020")) { + ChipLogProgress(chipTool, + " ***** Test Step 22 : 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { NextTest(); return; } - err = TestReadOptionalAttributeOperationMode_22(); + err = Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read optional attribute: ControlMode\n"); - if (ShouldSkip("PCC.S.A0021")) { + ChipLogProgress( + chipTool, " ***** Test Step 23 : 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { NextTest(); return; } - err = TestReadOptionalAttributeControlMode_23(); + err = Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23(); + break; + case 24: + ChipLogProgress(chipTool, + " ***** Test Step 24 : 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { + NextTest(); + return; + } + err = Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : 4a: TH sends a StopMotion command to DUT\n"); + if (ShouldSkip("WNCV.S.C02.Rsp")) { + NextTest(); + return; + } + err = Test4aThSendsAStopMotionCommandToDut_25(); + break; + case 26: + ChipLogProgress( + chipTool, " ***** Test Step 26 : 4b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); + err = Test4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26(); + break; + case 27: + ChipLogProgress( + chipTool, " ***** Test Step 27 : 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion\n"); + if (ShouldSkip("WNCV.S.A000a")) { + NextTest(); + return; + } + err = Test4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : 5a: TH waits for x seconds attributes update on the device\n"); + err = Test5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28(); + break; + case 29: + ChipLogProgress( + chipTool, " ***** Test Step 29 : 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { + NextTest(); + return; + } + err = Test5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29(); + break; + case 30: + ChipLogProgress( + chipTool, " ***** Test Step 30 : 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { + NextTest(); + return; + } + err = Test5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30(); break; } @@ -82076,6 +79993,27 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -82089,14 +80027,14 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 24; + const uint16_t mTestCount = 31; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -82104,79 +80042,79 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheMandatoryAttributeMaxPressure_1() + CHIP_ERROR Test1aThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: MaxPressure Error: %@", err); + [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { + NSLog(@"1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxPressure", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("maxPressure", [value shortValue], -32768)); - VerifyOrReturn(CheckConstraintMaxValue("maxPressure", [value shortValue], 32767)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeMaxSpeed_2() + CHIP_ERROR Test1bThWaitsFor10SecondsMovementsOnTheDevice_2() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: MaxSpeed Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxSpeed", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("maxSpeed", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxSpeed", [value unsignedShortValue], 65535U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeMaxFlow_3() + CHIP_ERROR Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: MaxFlow Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxFlow", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("maxFlow", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxFlow", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); } NextTest(); @@ -82185,52 +80123,53 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMinConstPressure_4() + CHIP_ERROR Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: MinConstPressure Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("minConstPressure", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("minConstPressure", [value shortValue], -32768)); - VerifyOrReturn(CheckConstraintMaxValue("minConstPressure", [value shortValue], 32767)); - } + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMaxConstPressure_5() + CHIP_ERROR Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: MaxConstPressure Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxConstPressure", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("maxConstPressure", [value shortValue], -32768)); - VerifyOrReturn(CheckConstraintMaxValue("maxConstPressure", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); } NextTest(); @@ -82238,107 +80177,104 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + bool testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled = false; + ResponseHandler _Nullable test_Test_TC_WNCV_3_2_OperationalStatus_Reported = nil; - CHIP_ERROR TestReadTheOptionalAttributeMinCompPressure_6() + CHIP_ERROR TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: MinCompPressure Error: %@", err); + test_Test_TC_WNCV_3_2_OperationalStatus_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Report: 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minCompPressure", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("minCompPressure", [value shortValue], -32768)); - VerifyOrReturn(CheckConstraintMaxValue("minCompPressure", [value shortValue], 32767)); - } - - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); + testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled = true; + }; + NextTest(); return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMaxCompPressure_7() + CHIP_ERROR Test2SubscribeToDutReportsOnOperationalStatusAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: MaxCompPressure Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxCompPressure", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("maxCompPressure", [value shortValue], -32768)); - VerifyOrReturn(CheckConstraintMaxValue("maxCompPressure", [value shortValue], 32767)); + uint16_t minIntervalArgument = 4U; + uint16_t maxIntervalArgument = 5U; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + params.filterByFabric = true; + params.replaceExistingSubscriptions = true; + [cluster subscribeAttributeOperationalStatusWithParams:params + subscriptionEstablished:^{ + VerifyOrReturn( + testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); + NextTest(); } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (test_Test_TC_WNCV_3_2_OperationalStatus_Reported != nil) { + ResponseHandler callback = test_Test_TC_WNCV_3_2_OperationalStatus_Reported; + test_Test_TC_WNCV_3_2_OperationalStatus_Reported = nil; + callback(value, err); + } + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMinConstSpeed_8() + CHIP_ERROR Test2aThSendsDownOrCloseCommandToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: MinConstSpeed Error: %@", err); + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + NSLog(@"2a: TH sends DownOrClose command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minConstSpeed", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("minConstSpeed", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minConstSpeed", [value unsignedShortValue], 65535U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMaxConstSpeed_9() + CHIP_ERROR Test2bDutUpdatesItsAttributes_10() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: MaxConstSpeed Error: %@", err); + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxConstSpeed", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("maxConstSpeed", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxConstSpeed", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("TargetPositionLiftPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("TargetPositionLiftPercent100ths", actualValue, 10000U)); } NextTest(); @@ -82347,25 +80283,22 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMinConstFlow_10() + CHIP_ERROR Test2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: MinConstFlow Error: %@", err); + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minConstFlow", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("minConstFlow", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minConstFlow", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("TargetPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("TargetPositionTiltPercent100ths", actualValue, 10000U)); } NextTest(); @@ -82374,178 +80307,174 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMaxConstFlow_11() + CHIP_ERROR Test2eThLeaveTheDeviceMovingFor2Seconds_13() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit01_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: MaxConstFlow Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxConstFlow", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("maxConstFlow", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxConstFlow", [value unsignedShortValue], 65535U)); - } - + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMinConstTemp_12() + CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: MinConstTemp Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minConstTemp", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("minConstTemp", [value shortValue], -32768)); - VerifyOrReturn(CheckConstraintMaxValue("minConstTemp", [value shortValue], 32767)); - } - + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMaxConstTemp_13() + CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: MaxConstTemp Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxConstTemp", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", [value shortValue], -32768)); - VerifyOrReturn(CheckConstraintMaxValue("maxConstTemp", [value shortValue], 32767)); - } - + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributePumpStatus_14() + CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: PumpStatus Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("pumpStatus", "bitmap16", "bitmap16")); - VerifyOrReturn(CheckConstraintMinValue("pumpStatus", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("pumpStatus", [value unsignedShortValue], 8U)); - + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeEffectiveOperationMode_15() + CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute: EffectiveOperationMode Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("effectiveOperationMode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("effectiveOperationMode", [value unsignedCharValue], 3U)); - + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeEffectiveControlMode_16() + CHIP_ERROR Test3aThReadsOperationalStatusAttributeFromDut_19() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR Test3a2DutUpdatesItsAttributes_20() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute: EffectiveControlMode Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("effectiveControlMode", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("effectiveControlMode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("effectiveControlMode", [value unsignedCharValue], 7U)); + if (value != nil) { - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCapacity_17() + CHIP_ERROR Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute: Capacity Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("capacity", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("capacity", [value shortValue], -32768)); - VerifyOrReturn(CheckConstraintMaxValue("capacity", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -82554,52 +80483,53 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeSpeed_18() + CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: Speed Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("speed", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("speed", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("speed", [value unsignedShortValue], 65535U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_19() + CHIP_ERROR Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: LifetimeRunningHours Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "int24u", "int24u")); - VerifyOrReturn(CheckConstraintMinValue("lifetimeRunningHours", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("lifetimeRunningHours", [value unsignedIntValue], 16777215UL)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -82608,52 +80538,47 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributePower_20() + CHIP_ERROR Test4aThSendsAStopMotionCommandToDut_25() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: Power Error: %@", err); + [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { + NSLog(@"4a: TH sends a StopMotion command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("power", "int24u", "int24u")); - VerifyOrReturn(CheckConstraintMinValue("power", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("power", [value unsignedIntValue], 16777215UL)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_21() + CHIP_ERROR Test4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: LifetimeEnergyConsumed Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("lifetimeEnergyConsumed", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("lifetimeEnergyConsumed", [value unsignedIntValue], 4294967295UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -82662,23 +80587,34 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOptionalAttributeOperationMode_22() + CHIP_ERROR Test5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional attribute: OperationMode Error: %@", err); + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationMode", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("operationMode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("operationMode", [value unsignedCharValue], 3U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "targetPositionLiftPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "targetPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + } NextTest(); }]; @@ -82686,23 +80622,26 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOptionalAttributeControlMode_23() + CHIP_ERROR Test5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional attribute: ControlMode Error: %@", err); + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("controlMode", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("controlMode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("controlMode", [value unsignedCharValue], 7U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "targetPositionTiltPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "targetPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + } NextTest(); }]; @@ -82711,12 +80650,12 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { } }; -class Test_TC_PCC_2_2 : public TestCommandBridge { +class Test_TC_WNCV_3_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PCC_2_2() - : TestCommandBridge("Test_TC_PCC_2_2") - , mTestIndex(0) + Test_TC_WNCV_3_3() + : TestCommandBridge("Test_TC_WNCV_3_3") + , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82725,7 +80664,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PCC_2_2() {} + ~Test_TC_WNCV_3_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -82733,11 +80672,11 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -82750,73 +80689,126 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); + err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH write 0 (Normal) to the OperationMode attribute to DUT\n"); - if (ShouldSkip("PCC.S.A0020")) { + ChipLogProgress(chipTool, + " ***** Test Step 1 : 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction\n"); + if (ShouldSkip("WNCV.S.C01.Rsp")) { NextTest(); return; } - err = TestThWrite0NormalToTheOperationModeAttributeToDut_1(); + err = Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the EffectiveOperationMode attribute\n"); - if (ShouldSkip("PCC.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: TH Waits for 6-8 seconds movement(s) on the device\n"); + err = Test1bThWaitsFor68SecondsMovementsOnTheDevice_2(); + break; + case 3: + ChipLogProgress( + chipTool, " ***** Test Step 3 : 1c: TH sends UpOrOpen command to preposition the DUT in the opposite direction\n"); + if (ShouldSkip("WNCV.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_2(); + err = Test1cThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_3(); break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH write 1 (Minimum) to the OperationMode attribute to DUT\n"); - if (ShouldSkip("PCC.S.F03 && PCC.S.A0020")) { + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : 1d: TH Waits for 2 seconds movement(s) on the device\n"); + err = Test1dThWaitsFor2SecondsMovementsOnTheDevice_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : 1e: TH reads OperationalStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestThWrite1MinimumToTheOperationModeAttributeToDut_3(); + err = Test1eThReadsOperationalStatusAttributeFromDut_5(); break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the EffectiveOperationMode attribute\n"); - if (ShouldSkip("PCC.S.F03 && PCC.S.A0011")) { + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : 1d: TH Waits for 2 seconds movement(s) on the device\n"); + err = Test1dThWaitsFor2SecondsMovementsOnTheDevice_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Report: 2: Subscribe to DUT reports on OperationalStatus attribute\n"); + err = TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : 2: Subscribe to DUT reports on OperationalStatus attribute\n"); + err = Test2SubscribeToDutReportsOnOperationalStatusAttribute_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : 2a: TH sends a StopMotion command to DUT\n"); + if (ShouldSkip("WNCV.S.C02.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_4(); + err = Test2aThSendsAStopMotionCommandToDut_9(); break; - case 5: + case 10: ChipLogProgress( - chipTool, " ***** Test Step 5 : TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time.\n"); - if (ShouldSkip("PCC.S.F03 && PCC.S.A0020")) { + chipTool, " ***** Test Step 10 : 2b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); + err = Test2bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_10(); + break; + case 11: + ChipLogProgress( + chipTool, " ***** Test Step 11 : 2c: TH reads OperationalStatus attribute from DUT after a StopMotion\n"); + if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestThWrite2MaximumToTheOperationModeAttributeToDutOneAtATime_5(); + err = Test2cThReadsOperationalStatusAttributeFromDutAfterAStopMotion_11(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the EffectiveOperationMode attribute\n"); - if (ShouldSkip("PCC.S.F03 && PCC.S.A0011")) { + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : 2d: TH waits for 100ms - 3s attributes update on the device\n"); + err = Test2dThWaitsFor100ms3sAttributesUpdateOnTheDevice_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : 2e: TH reads OperationalStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_6(); + err = Test2eThReadsOperationalStatusAttributeFromDut_13(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH write 3 (Local) to the OperationMode attribute to DUT\n"); - if (ShouldSkip("PCC.S.F06 && PCC.S.A0020")) { + case 14: + ChipLogProgress( + chipTool, " ***** Test Step 14 : 3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { NextTest(); return; } - err = TestThWrite3LocalToTheOperationModeAttributeToDut_7(); + err = Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_14(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the EffectiveOperationMode attribute\n"); - if (ShouldSkip("PCC.S.F06 && PCC.S.A0011")) { + case 15: + ChipLogProgress(chipTool, + " ***** Test Step 15 : 3b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute 3c: it Must be equal " + "with CurrentPositionLiftPercent100ths from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b && WNCV.S.A000e")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_8(); + err = Test3bIfPaLfThReadsTargetPositionLiftPercent100thsAttribute3cItMustBeEqualWithCurrentPositionLiftPercent100thsFromDut_15(); + break; + case 16: + ChipLogProgress( + chipTool, " ***** Test Step 16 : 4a: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { + NextTest(); + return; + } + err = Test4aIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_16(); + break; + case 17: + ChipLogProgress(chipTool, + " ***** Test Step 17 : 4b: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute 4c: it Must be equal " + "with CurrentPositionTiltPercent100ths from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000c && WNCV.S.A000f && PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = Test4bIfPaTlThReadsTargetPositionTiltPercent100thsAttribute4cItMustBeEqualWithCurrentPositionTiltPercent100thsFromDut_17(); break; } @@ -82856,6 +80848,33 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -82869,14 +80888,14 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -82884,47 +80903,152 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThWrite0NormalToTheOperationModeAttributeToDut_1() + CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOperationModeWithValue:operationModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH write 0 (Normal) to the OperationMode attribute to DUT Error: %@", err); + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_2() + CHIP_ERROR Test1bThWaitsFor68SecondsMovementsOnTheDevice_2() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 6000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test1cThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); + [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { + NSLog(@"1c: TH sends UpOrOpen command to preposition the DUT in the opposite direction Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 0U)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test1dThWaitsFor2SecondsMovementsOnTheDevice_4() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test1eThReadsOperationalStatusAttributeFromDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1e: TH reads OperationalStatus attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintNotValue("operationalStatus", value, 0U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test1dThWaitsFor2SecondsMovementsOnTheDevice_6() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); + } + bool testSendClusterTest_TC_WNCV_3_3_7_WaitForReport_Fulfilled = false; + ResponseHandler _Nullable test_Test_TC_WNCV_3_3_OperationalStatus_Reported = nil; + + CHIP_ERROR TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_WNCV_3_3_OperationalStatus_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Report: 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); + testSendClusterTest_TC_WNCV_3_3_7_WaitForReport_Fulfilled = true; + }; + + NextTest(); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test2SubscribeToDutReportsOnOperationalStatusAttribute_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + uint16_t minIntervalArgument = 4U; + uint16_t maxIntervalArgument = 5U; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + params.filterByFabric = true; + params.replaceExistingSubscriptions = true; + [cluster subscribeAttributeOperationalStatusWithParams:params + subscriptionEstablished:^{ + VerifyOrReturn( + testSendClusterTest_TC_WNCV_3_3_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); + NextTest(); } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (test_Test_TC_WNCV_3_3_OperationalStatus_Reported != nil) { + ResponseHandler callback = test_Test_TC_WNCV_3_3_OperationalStatus_Reported; + test_Test_TC_WNCV_3_3_OperationalStatus_Reported = nil; + callback(value, err); + } + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test2aThSendsAStopMotionCommandToDut_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { + NSLog(@"2a: TH sends a StopMotion command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); NextTest(); }]; @@ -82932,46 +81056,60 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrite1MinimumToTheOperationModeAttributeToDut_3() + CHIP_ERROR Test2bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_10() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test2cThReadsOperationalStatusAttributeFromDutAfterAStopMotion_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeOperationModeWithValue:operationModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH write 1 (Minimum) to the OperationMode attribute to DUT Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2c: TH reads OperationalStatus attribute from DUT after a StopMotion Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_4() + CHIP_ERROR Test2dThWaitsFor100ms3sAttributesUpdateOnTheDevice_12() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test2eThReadsOperationalStatusAttributeFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2e: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 1U)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -82979,49 +81117,61 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nullable attrCurrentPositionLift; - CHIP_ERROR TestThWrite2MaximumToTheOperationModeAttributeToDutOneAtATime_5() + CHIP_ERROR Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster writeAttributeOperationModeWithValue:operationModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time. " - @"Error: %@", - err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + } + { + attrCurrentPositionLift = value; + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_6() + CHIP_ERROR + Test3bIfPaLfThReadsTargetPositionLiftPercent100thsAttribute3cItMustBeEqualWithCurrentPositionLiftPercent100thsFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute 3c: it Must be equal with " + @"CurrentPositionLiftPercent100ths from DUT Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 2U)); + if (attrCurrentPositionLift == nil) { + VerifyOrReturn(CheckValueNull("TargetPositionLiftPercent100ths", actualValue)); + } else { + VerifyOrReturn(CheckValueNonNull("TargetPositionLiftPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("TargetPositionLiftPercent100ths", actualValue, attrCurrentPositionLift)); + } } NextTest(); @@ -83029,47 +81179,61 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nullable attrCurrentPositionTilt; - CHIP_ERROR TestThWrite3LocalToTheOperationModeAttributeToDut_7() + CHIP_ERROR Test4aIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:3U]; - [cluster writeAttributeOperationModeWithValue:operationModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH write 3 (Local) to the OperationMode attribute to DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"4a: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + } + { + attrCurrentPositionTilt = value; + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_8() + CHIP_ERROR + Test4bIfPaTlThReadsTargetPositionTiltPercent100thsAttribute4cItMustBeEqualWithCurrentPositionTiltPercent100thsFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"4b: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute 4c: it Must be equal with " + @"CurrentPositionTiltPercent100ths from DUT Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 3U)); + if (attrCurrentPositionTilt == nil) { + VerifyOrReturn(CheckValueNull("TargetPositionTiltPercent100ths", actualValue)); + } else { + VerifyOrReturn(CheckValueNonNull("TargetPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("TargetPositionTiltPercent100ths", actualValue, attrCurrentPositionTilt)); + } } NextTest(); @@ -83079,21 +81243,23 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { } }; -class Test_TC_PCC_2_3 : public TestCommandBridge { +class Test_TC_WNCV_3_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PCC_2_3() - : TestCommandBridge("Test_TC_PCC_2_3") + Test_TC_WNCV_3_4() + : TestCommandBridge("Test_TC_WNCV_3_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("fastMotionDuration", 0, UINT16_MAX, &mFastMotionDuration); + AddArgument("fullMotionDuration", 0, UINT16_MAX, &mFullMotionDuration); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PCC_2_3() {} + ~Test_TC_WNCV_3_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -83101,11 +81267,11 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -83118,120 +81284,79 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); + err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Write 0 to the OperationMode attribute to DUT\n"); - if (ShouldSkip("PCC.S.A0020")) { + ChipLogProgress(chipTool, + " ***** Test Step 1 : 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction\n"); + if (ShouldSkip("WNCV.S.C01.Rsp")) { NextTest(); return; } - err = TestWrite0ToTheOperationModeAttributeToDut_1(); + err = Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the attribute: EffectiveOperationMode\n"); - if (ShouldSkip("PCC.S.A0011")) { - NextTest(); - return; - } - err = TestReadsTheAttributeEffectiveOperationMode_2(); + ChipLogProgress( + chipTool, " ***** Test Step 2 : 1b: TH Waits for fastMotionDuration seconds movement(s) on the device\n"); + err = Test1bThWaitsForFastMotionDurationSecondsMovementsOnTheDevice_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write 0 to the ControlMode attribute to DUT\n"); - if (ShouldSkip("PCC.S.F03 && PCC.S.A0021")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : 2a: TH sends UpOrOpen command to DUT\n"); + if (ShouldSkip("WNCV.S.C00.Rsp")) { NextTest(); return; } - err = TestWrite0ToTheControlModeAttributeToDut_3(); + err = Test2aThSendsUpOrOpenCommandToDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the attribute: EffectiveControlMode\n"); - if (ShouldSkip("PCC.S.F03 && PCC.S.A0012")) { - NextTest(); - return; - } - err = TestReadsTheAttributeEffectiveControlMode_4(); + ChipLogProgress( + chipTool, " ***** Test Step 4 : 2b: TH Waits for fullMotionDuration seconds movement(s) on the device\n"); + err = Test2bThWaitsForFullMotionDurationSecondsMovementsOnTheDevice_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Write 1 to the ControlMode attribute to DUT\n"); - if (ShouldSkip("PCC.S.F00 && PCC.S.A0021")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : 2c: TH reads OperationalStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestWrite1ToTheControlModeAttributeToDut_5(); + err = Test2cThReadsOperationalStatusAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the attribute: EffectiveControlMode\n"); - if (ShouldSkip("PCC.S.F00 && PCC.S.A0012")) { + ChipLogProgress( + chipTool, " ***** Test Step 6 : 3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { NextTest(); return; } - err = TestReadsTheAttributeEffectiveControlMode_6(); + err = Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Write 2 to the ControlMode attribute to DUT\n"); - if (ShouldSkip("PCC.S.F01 && PCC.S.A0021")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : 3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { NextTest(); return; } - err = TestWrite2ToTheControlModeAttributeToDut_7(); + err = Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the attribute: EffectiveControlMode\n"); - if (ShouldSkip("PCC.S.F01 && PCC.S.A0012")) { + ChipLogProgress( + chipTool, " ***** Test Step 8 : 3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { NextTest(); return; } - err = TestReadsTheAttributeEffectiveControlMode_8(); + err = Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Write 3 to the ControlMode attribute to DUT\n"); - if (ShouldSkip("PCC.S.F02 && PCC.S.A0021")) { - NextTest(); - return; - } - err = TestWrite3ToTheControlModeAttributeToDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the attribute: EffectiveControlMode\n"); - if (ShouldSkip("PCC.S.F02 && PCC.S.A0012")) { - NextTest(); - return; - } - err = TestReadsTheAttributeEffectiveControlMode_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Write 5 to the ControlMode attribute to DUT\n"); - if (ShouldSkip("PCC.S.F04 && PCC.S.A0021")) { - NextTest(); - return; - } - err = TestWrite5ToTheControlModeAttributeToDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the attribute: EffectiveControlMode\n"); - if (ShouldSkip("PCC.S.F04 && PCC.S.A0012")) { - NextTest(); - return; - } - err = TestReadsTheAttributeEffectiveControlMode_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Write 7 to the ControlMode attribute to DUT\n"); - if (ShouldSkip("PCC.S.F05 && PCC.S.A0021")) { - NextTest(); - return; - } - err = TestWrite7ToTheControlModeAttributeToDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the attribute: EffectiveControlMode\n"); - if (ShouldSkip("PCC.S.F05 && PCC.S.A0012")) { + ChipLogProgress(chipTool, + " ***** Test Step 9 : 3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { NextTest(); return; } - err = TestReadsTheAttributeEffectiveControlMode_14(); + err = Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9(); break; } @@ -83274,21 +81399,6 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -83302,14 +81412,16 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 15; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mFastMotionDuration; + chip::Optional mFullMotionDuration; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -83317,142 +81429,73 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestWrite0ToTheOperationModeAttributeToDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOperationModeWithValue:operationModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 0 to the OperationMode attribute to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_2() + CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveOperationMode Error: %@", err); + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 0U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite0ToTheControlModeAttributeToDut_3() + CHIP_ERROR Test1bThWaitsForFastMotionDurationSecondsMovementsOnTheDevice_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id controlModeArgument; - controlModeArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeControlModeWithValue:controlModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 0 to the ControlMode attribute to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_4() + CHIP_ERROR Test2aThSendsUpOrOpenCommandToDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); + [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { + NSLog(@"2a: TH sends UpOrOpen command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 0U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite1ToTheControlModeAttributeToDut_5() + CHIP_ERROR Test2bThWaitsForFullMotionDurationSecondsMovementsOnTheDevice_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id controlModeArgument; - controlModeArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeControlModeWithValue:controlModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 1 to the ControlMode attribute to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_6() + CHIP_ERROR Test2cThReadsOperationalStatusAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2c: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 1U)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -83461,94 +81504,47 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite2ToTheControlModeAttributeToDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id controlModeArgument; - controlModeArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster writeAttributeControlModeWithValue:controlModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 2 to the ControlMode attribute to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_8() + CHIP_ERROR Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWrite3ToTheControlModeAttributeToDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - id controlModeArgument; - controlModeArgument = [NSNumber numberWithUnsignedChar:3U]; - [cluster writeAttributeControlModeWithValue:controlModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 3 to the ControlMode attribute to DUT Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_10() + CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 3U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 0U)); } NextTest(); @@ -83557,94 +81553,47 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite5ToTheControlModeAttributeToDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id controlModeArgument; - controlModeArgument = [NSNumber numberWithUnsignedChar:5U]; - [cluster writeAttributeControlModeWithValue:controlModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 5 to the ControlMode attribute to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_12() + CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 5U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWrite7ToTheControlModeAttributeToDut_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - id controlModeArgument; - controlModeArgument = [NSNumber numberWithUnsignedChar:7U]; - [cluster writeAttributeControlModeWithValue:controlModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 7 to the ControlMode attribute to DUT Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_14() + CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 7U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 0U)); } NextTest(); @@ -83654,21 +81603,23 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { } }; -class Test_TC_PCC_2_4 : public TestCommandBridge { +class Test_TC_WNCV_3_5 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PCC_2_4() - : TestCommandBridge("Test_TC_PCC_2_4") + Test_TC_WNCV_3_5() + : TestCommandBridge("Test_TC_WNCV_3_5") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("fastMotionDuration", 0, UINT16_MAX, &mFastMotionDuration); + AddArgument("fullMotionDuration", 0, UINT16_MAX, &mFullMotionDuration); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PCC_2_4() {} + ~Test_TC_WNCV_3_5() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -83676,11 +81627,11 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_5\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_5\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -83693,104 +81644,79 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); + err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Write 1 to the LifetimeRunningHours attribute to DUT\n"); - if (ShouldSkip("PCC.S.A0015")) { + ChipLogProgress( + chipTool, " ***** Test Step 1 : 1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction\n"); + if (ShouldSkip("WNCV.S.C00.Rsp")) { NextTest(); return; } - err = TestWrite1ToTheLifetimeRunningHoursAttributeToDut_1(); + err = Test1aThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the attribute: LifetimeRunningHours\n"); - if (ShouldSkip("PCC.S.A0015")) { - NextTest(); - return; - } - err = TestReadsTheAttributeLifetimeRunningHours_2(); + ChipLogProgress( + chipTool, " ***** Test Step 2 : 1b: TH Waits for fastMotionDuration seconds movement(s) on the device\n"); + err = Test1bThWaitsForFastMotionDurationSecondsMovementsOnTheDevice_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write 2 to the LifetimeRunningHours attribute to DUT\n"); - if (ShouldSkip("PCC.S.A0015")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : 2a: TH sends DownOrClose command to DUT\n"); + if (ShouldSkip("WNCV.S.C01.Rsp")) { NextTest(); return; } - err = TestWrite2ToTheLifetimeRunningHoursAttributeToDut_3(); + err = Test2aThSendsDownOrCloseCommandToDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the attribute: LifetimeRunningHours\n"); - if (ShouldSkip("PCC.S.A0015")) { - NextTest(); - return; - } - err = TestReadsTheAttributeLifetimeRunningHours_4(); + ChipLogProgress( + chipTool, " ***** Test Step 4 : 2b: TH Waits for fullMotionDuration seconds movement(s) on the device\n"); + err = Test2bThWaitsForFullMotionDurationSecondsMovementsOnTheDevice_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Write 3 to the LifetimeRunningHours attribute to DUT\n"); - if (ShouldSkip("PCC.S.A0015")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : 2c: TH reads OperationalStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestWrite3ToTheLifetimeRunningHoursAttributeToDut_5(); + err = Test2cThReadsOperationalStatusAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the attribute: LifetimeRunningHours\n"); - if (ShouldSkip("PCC.S.A0015")) { + ChipLogProgress( + chipTool, " ***** Test Step 6 : 3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { NextTest(); return; } - err = TestReadsTheAttributeLifetimeRunningHours_6(); + err = Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Write 1 to the LifetimeEnergyConsumed attribute to DUT\n"); - if (ShouldSkip("PCC.S.A0017")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : 3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { NextTest(); return; } - err = TestWrite1ToTheLifetimeEnergyConsumedAttributeToDut_7(); + err = Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the attribute: LifetimeEnergyConsumed\n"); - if (ShouldSkip("PCC.S.A0017")) { + ChipLogProgress( + chipTool, " ***** Test Step 8 : 3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { NextTest(); return; } - err = TestReadsTheAttributeLifetimeEnergyConsumed_8(); + err = Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Write 2 to the LifetimeEnergyConsumed attribute to DUT\n"); - if (ShouldSkip("PCC.S.A0017")) { - NextTest(); - return; - } - err = TestWrite2ToTheLifetimeEnergyConsumedAttributeToDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the attribute: LifetimeEnergyConsumed\n"); - if (ShouldSkip("PCC.S.A0017")) { - NextTest(); - return; - } - err = TestReadsTheAttributeLifetimeEnergyConsumed_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Write 3 to the LifetimeEnergyConsumed attribute to DUT\n"); - if (ShouldSkip("PCC.S.A0017")) { - NextTest(); - return; - } - err = TestWrite3ToTheLifetimeEnergyConsumedAttributeToDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the attribute: LifetimeEnergyConsumed\n"); - if (ShouldSkip("PCC.S.A0017")) { + ChipLogProgress(chipTool, + " ***** Test Step 9 : 3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { NextTest(); return; } - err = TestReadsTheAttributeLifetimeEnergyConsumed_12(); + err = Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9(); break; } @@ -83833,15 +81759,6 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -83855,14 +81772,16 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mFastMotionDuration; + chip::Optional mFullMotionDuration; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -83870,48 +81789,17 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestWrite1ToTheLifetimeRunningHoursAttributeToDut_1() + CHIP_ERROR Test1aThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id lifetimeRunningHoursArgument; - lifetimeRunningHoursArgument = [NSNumber numberWithUnsignedInt:1UL]; - [cluster writeAttributeLifetimeRunningHoursWithValue:lifetimeRunningHoursArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 1 to the LifetimeRunningHours attribute to DUT Error: %@", err); + [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { + NSLog(@"1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheAttributeLifetimeRunningHours_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: LifetimeRunningHours Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); - VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 1UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); NextTest(); }]; @@ -83919,96 +81807,55 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite2ToTheLifetimeRunningHoursAttributeToDut_3() + CHIP_ERROR Test1bThWaitsForFastMotionDurationSecondsMovementsOnTheDevice_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id lifetimeRunningHoursArgument; - lifetimeRunningHoursArgument = [NSNumber numberWithUnsignedInt:2UL]; - [cluster writeAttributeLifetimeRunningHoursWithValue:lifetimeRunningHoursArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 2 to the LifetimeRunningHours attribute to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsTheAttributeLifetimeRunningHours_4() + CHIP_ERROR Test2aThSendsDownOrCloseCommandToDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: LifetimeRunningHours Error: %@", err); + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + NSLog(@"2a: TH sends DownOrClose command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); - VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 2UL)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite3ToTheLifetimeRunningHoursAttributeToDut_5() + CHIP_ERROR Test2bThWaitsForFullMotionDurationSecondsMovementsOnTheDevice_4() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id lifetimeRunningHoursArgument; - lifetimeRunningHoursArgument = [NSNumber numberWithUnsignedInt:3UL]; - [cluster writeAttributeLifetimeRunningHoursWithValue:lifetimeRunningHoursArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 3 to the LifetimeRunningHours attribute to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsTheAttributeLifetimeRunningHours_6() + CHIP_ERROR Test2cThReadsOperationalStatusAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: LifetimeRunningHours Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2c: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); - VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 3UL)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -84017,98 +81864,47 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite1ToTheLifetimeEnergyConsumedAttributeToDut_7() + CHIP_ERROR Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id lifetimeEnergyConsumedArgument; - lifetimeEnergyConsumedArgument = [NSNumber numberWithUnsignedInt:1UL]; [cluster - writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 1 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheAttributeLifetimeEnergyConsumed_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: LifetimeEnergyConsumed Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); - VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 1UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWrite2ToTheLifetimeEnergyConsumedAttributeToDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - id lifetimeEnergyConsumedArgument; - lifetimeEnergyConsumedArgument = [NSNumber numberWithUnsignedInt:2UL]; - [cluster - writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 2 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 10000U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAttributeLifetimeEnergyConsumed_10() + CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: LifetimeEnergyConsumed Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); - VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 2UL)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 100U)); } NextTest(); @@ -84117,48 +81913,47 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite3ToTheLifetimeEnergyConsumedAttributeToDut_11() + CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id lifetimeEnergyConsumedArgument; - lifetimeEnergyConsumedArgument = [NSNumber numberWithUnsignedInt:3UL]; [cluster - writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write 3 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 10000U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAttributeLifetimeEnergyConsumed_12() + CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: LifetimeEnergyConsumed Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); - VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 3UL)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 100U)); } NextTest(); @@ -84168,21 +81963,22 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { } }; -class Test_TC_PSCFG_1_1 : public TestCommandBridge { +class Test_TC_WNCV_4_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PSCFG_1_1() - : TestCommandBridge("Test_TC_PSCFG_1_1") + Test_TC_WNCV_4_1() + : TestCommandBridge("Test_TC_WNCV_4_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("fullMotionDuration", 0, UINT16_MAX, &mFullMotionDuration); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PSCFG_1_1() {} + ~Test_TC_WNCV_4_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -84190,11 +81986,11 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PSCFG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_4_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PSCFG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_4_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -84207,38 +82003,132 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Commission DUT to TH\n"); - err = TestCommissionDutToTh_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); + err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); - err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); + ChipLogProgress(chipTool, + " ***** Test Step 1 : 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction\n"); + if (ShouldSkip("WNCV.S.C01.Rsp")) { + NextTest(); + return; + } + err = Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); - err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: TH waits for x seconds movement(s) on the DUT\n"); + err = Test1bThWaitsForXSecondsMovementsOnTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the AttributeList attribute from the DUT\n"); - err = TestThReadsTheAttributeListAttributeFromTheDut_3(); + ChipLogProgress( + chipTool, " ***** Test Step 3 : 1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { + NextTest(); + return; + } + err = Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the AcceptedCommandList attribute from the DUT\n"); - err = TestThReadsTheAcceptedCommandListAttributeFromTheDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : 2a: TH sends GoToLiftPercentage command with 25 percent to DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.C05.Rsp")) { + NextTest(); + return; + } + err = Test2aThSendsGoToLiftPercentageCommandWith25PercentToDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the GeneratedCommandList attribute from the DUT\n"); - err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : 2b: DUT updates its attributes\n"); + err = Test2bDutUpdatesItsAttributes_5(); break; case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { + NextTest(); + return; + } + err = Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : 3a: TH set a timeout of X minutes for failure\n"); + err = Test3aThSetATimeoutOfXMinutesForFailure_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : 3b: TH reads OperationalStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.A000a")) { + NextTest(); + return; + } + err = Test3bThReadsOperationalStatusAttributeFromDut_8(); + break; + case 9: + ChipLogProgress( + chipTool, " ***** Test Step 9 : 3c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { + NextTest(); + return; + } + err = Test3cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_9(); + break; + case 10: ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " - "contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + " ***** Test Step 10 : 3d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6(); + err = Test3dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : 4a: TH sends GoToLiftPercentage command with 75.20 percent to DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.C05.Rsp")) { + NextTest(); + return; + } + err = Test4aThSendsGoToLiftPercentageCommandWith7520PercentToDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : 4b: DUT updates its attributes\n"); + err = Test4bDutUpdatesItsAttributes_12(); + break; + case 13: + ChipLogProgress( + chipTool, " ***** Test Step 13 : 4c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { + NextTest(); + return; + } + err = Test4cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : 5a: TH waits for x seconds movement(s) on the DUT\n"); + err = Test5aThWaitsForXSecondsMovementsOnTheDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : 5b: TH reads OperationalStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.A000a")) { + NextTest(); + return; + } + err = Test5bThReadsOperationalStatusAttributeFromDut_15(); + break; + case 16: + ChipLogProgress( + chipTool, " ***** Test Step 16 : 5c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { + NextTest(); + return; + } + err = Test5cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_16(); + break; + case 17: + ChipLogProgress(chipTool, + " ***** Test Step 17 : 5d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { + NextTest(); + return; + } + err = Test5dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_17(); break; } @@ -84272,6 +82162,39 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -84285,14 +82208,15 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mFullMotionDuration; chip::Optional mTimeout; - CHIP_ERROR TestCommissionDutToTh_0() + CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -84300,261 +82224,315 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() + CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test1bThWaitsForXSecondsMovementsOnTheDut_2() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + } + VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercent100ths", value, 0U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test2aThSendsGoToLiftPercentageCommandWith25PercentToDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:2500U]; + [cluster goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"2a: TH sends GoToLiftPercentage command with 25 percent to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test2bDutUpdatesItsAttributes_5() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + VerifyOrReturn(CheckValueNonNull("TargetPositionLiftPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("TargetPositionLiftPercent100ths", actualValue, 2500U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() + CHIP_ERROR Test3aThSetATimeoutOfXMinutesForFailure_7() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test3bThReadsOperationalStatusAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_3() + CHIP_ERROR Test3cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the AttributeList attribute from the DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 2500U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheAcceptedCommandListAttributeFromTheDut_4() + CHIP_ERROR Test3dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the AcceptedCommandList attribute from the DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 25U)); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheGeneratedCommandListAttributeFromTheDut_5() + CHIP_ERROR Test4aThSendsGoToLiftPercentageCommandWith7520PercentToDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the GeneratedCommandList attribute from the DUT Error: %@", err); + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:7520U]; + [cluster goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"4a: TH sends GoToLiftPercentage command with 75.20 percent to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test4bDutUpdatesItsAttributes_12() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test4cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"4c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValueNonNull("TargetPositionLiftPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("TargetPositionLiftPercent100ths", actualValue, 7520U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6() + CHIP_ERROR Test5aThWaitsForXSecondsMovementsOnTheDut_14() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; - -class Test_TC_PSCFG_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PSCFG_2_1() - : TestCommandBridge("Test_TC_PSCFG_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs("alpha", value); } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_PSCFG_2_1() {} - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR Test5bThReadsOperationalStatusAttributeFromDut_15() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PSCFG_2_1\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PSCFG_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5b: TH reads OperationalStatus attribute from DUT Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Commission DUT to TH\n"); - err = TestCommissionDutToTh_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the Sources attribute from the DUT\n"); - if (ShouldSkip("PSCFG.S.A0000")) { - NextTest(); - return; + { + id actualValue = value; + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } - err = TestThReadsTheSourcesAttributeFromTheDut_1(); - break; - } - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + NextTest(); + }]; + + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR Test5cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_16() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 7520U)); + } - CHIP_ERROR TestCommissionDutToTh_0() - { + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheSourcesAttributeFromTheDut_1() + CHIP_ERROR Test5dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSourcesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the Sources attribute from the DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("sources", "list", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 75U)); + } + NextTest(); }]; @@ -84562,21 +82540,22 @@ class Test_TC_PSCFG_2_1 : public TestCommandBridge { } }; -class Test_TC_RH_1_1 : public TestCommandBridge { +class Test_TC_WNCV_4_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_RH_1_1() - : TestCommandBridge("Test_TC_RH_1_1") + Test_TC_WNCV_4_2() + : TestCommandBridge("Test_TC_WNCV_4_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("fullMotionDuration", 0, UINT16_MAX, &mFullMotionDuration); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_RH_1_1() {} + ~Test_TC_WNCV_4_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -84584,11 +82563,11 @@ class Test_TC_RH_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_RH_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_4_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RH_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_4_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -84601,46 +82580,132 @@ class Test_TC_RH_1_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); + err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read ClusterRevision attribute from the DUT\n"); - err = TestReadClusterRevisionAttributeFromTheDut_1(); + ChipLogProgress(chipTool, + " ***** Test Step 1 : 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction\n"); + if (ShouldSkip("WNCV.S.C01.Rsp")) { + NextTest(); + return; + } + err = Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read FeatureMap attribute from the DUT\n"); - err = TestReadFeatureMapAttributeFromTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: TH waits for x seconds movement(s) on the DUT\n"); + err = Test1bThWaitsForXSecondsMovementsOnTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress( + chipTool, " ***** Test Step 3 : 1c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { + NextTest(); + return; + } + err = Test1cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(Tolerance) in AttributeList\n"); - if (ShouldSkip("RH.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : 2a: TH sends GoToTiltPercentage command with 30 percent to DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.C08.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalAttributeToleranceInAttributeList_4(); + err = Test2aThSendsGoToTiltPercentageCommandWith30PercentToDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : 2b: DUT updates its attributes\n"); + err = Test2bDutUpdatesItsAttributes_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + ChipLogProgress( + chipTool, " ***** Test Step 6 : 2c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { + NextTest(); + return; + } + err = Test2cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_6(); break; case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : 3a: TH set a timeout of X minutes for failure\n"); + err = Test3aThSetATimeoutOfXMinutesForFailure_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : 3b: TH reads OperationalStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.A000a")) { + NextTest(); + return; + } + err = Test3bThReadsOperationalStatusAttributeFromDut_8(); + break; + case 9: + ChipLogProgress( + chipTool, " ***** Test Step 9 : 3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { + NextTest(); + return; + } + err = Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_9(); + break; + case 10: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " - "contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + " ***** Test Step 10 : 3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); + err = Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : 4a: TH sends GoToTiltPercentage command with 60.05 percent to DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.C08.Rsp")) { + NextTest(); + return; + } + err = Test4aThSendsGoToTiltPercentageCommandWith6005PercentToDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : 4b: DUT updates its attributes\n"); + err = Test4bDutUpdatesItsAttributes_12(); + break; + case 13: + ChipLogProgress( + chipTool, " ***** Test Step 13 : 4c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { + NextTest(); + return; + } + err = Test4cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : 5a: TH waits for x seconds movement(s) on the DUT\n"); + err = Test5aThWaitsForXSecondsMovementsOnTheDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : 5b: TH reads OperationalStatus attribute from DUT\n"); + if (ShouldSkip("WNCV.S.A000a")) { + NextTest(); + return; + } + err = Test5bThReadsOperationalStatusAttributeFromDut_15(); + break; + case 16: + ChipLogProgress( + chipTool, " ***** Test Step 16 : 5c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { + NextTest(); + return; + } + err = Test5cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_16(); + break; + case 17: + ChipLogProgress(chipTool, + " ***** Test Step 17 : 5d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { + NextTest(); + return; + } + err = Test5dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_17(); break; } @@ -84677,6 +82742,36 @@ class Test_TC_RH_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -84690,14 +82785,15 @@ class Test_TC_RH_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mFullMotionDuration; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -84705,105 +82801,101 @@ class Test_TC_RH_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadClusterRevisionAttributeFromTheDut_1() + CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ClusterRevision attribute from the DUT Error: %@", err); + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { + NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() + CHIP_ERROR Test1bThWaitsForXSecondsMovementsOnTheDut_2() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test1cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + if (value != nil) { + } + VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercent100ths", value, 0U)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR Test2aThSendsGoToTiltPercentageCommandWith30PercentToDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:3000U]; + [cluster goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"2a: TH sends GoToTiltPercentage command with 30 percent to DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() + CHIP_ERROR Test2bDutUpdatesItsAttributes_5() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test2cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("TargetPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("TargetPositionTiltPercent100ths", actualValue, 3000U)); + } NextTest(); }]; @@ -84811,75 +82903,225 @@ class Test_TC_RH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR Test3aThSetATimeoutOfXMinutesForFailure_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test3bThReadsOperationalStatusAttributeFromDut_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 3000U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 30U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() + CHIP_ERROR Test4aThSendsGoToTiltPercentageCommandWith6005PercentToDut_11() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:6005U]; + [cluster goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"4a: TH sends GoToTiltPercentage command with 60.05 percent to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test4bDutUpdatesItsAttributes_12() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test4cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"4c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("TargetPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("TargetPositionTiltPercent100ths", actualValue, 6005U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test5aThWaitsForXSecondsMovementsOnTheDut_14() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR Test5bThReadsOperationalStatusAttributeFromDut_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5b: TH reads OperationalStatus attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test5cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 6005U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test5dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 60U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_RH_2_1 : public TestCommandBridge { +class Test_TC_WNCV_4_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_RH_2_1() - : TestCommandBridge("Test_TC_RH_2_1") + Test_TC_WNCV_4_3() + : TestCommandBridge("Test_TC_WNCV_4_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -84889,7 +83131,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_RH_2_1() {} + ~Test_TC_WNCV_4_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -84897,11 +83139,11 @@ class Test_TC_RH_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_RH_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_4_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RH_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_4_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -84914,40 +83156,51 @@ class Test_TC_RH_2_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); + err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the MinMeasuredValue attribute from the DUT\n"); - if (ShouldSkip("RH.S.A0001")) { + ChipLogProgress( + chipTool, " ***** Test Step 1 : 1a: If (PA_LF & LF) TH reads CurrentPositionLiftPercent100ths from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { NextTest(); return; } - err = TestThReadsTheMinMeasuredValueAttributeFromTheDut_1(); + err = Test1aIfPaLfLfThReadsCurrentPositionLiftPercent100thsFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the MaxMeasuredValue attribute from the DUT\n"); - if (ShouldSkip("RH.S.A0002")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : 1b 1c: If (PA_LF & LF) TH reads CurrentPositionLiftPercentage from DUT + assert " + "CurrentPositionLiftPercent100ths/100 equals CurrentPositionLiftPercentage\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008 && WNCV.S.A000e")) { NextTest(); return; } - err = TestThReadsTheMaxMeasuredValueAttributeFromTheDut_2(); + err = Test1b1cIfPaLfLfThReadsCurrentPositionLiftPercentageFromDutAssertCurrentPositionLiftPercent100ths100EqualsCurrentPositionLiftPercentage_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the MeasuredValue attribute from the DUT\n"); - if (ShouldSkip("RH.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : 2b: TH sends GoToLiftPercentage command with BadParam to DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 || WNCV.S.F00 && WNCV.S.C05.Rsp")) { NextTest(); return; } - err = TestThReadsTheMeasuredValueAttributeFromTheDut_3(); + err = Test2bThSendsGoToLiftPercentageCommandWithBadParamToDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the Tolerance attribute from the DUT\n"); - if (ShouldSkip("RH.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : 3a: TH sends GoToLiftPercentage command with 10001 to DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 || WNCV.S.F00 && WNCV.S.C05.Rsp")) { NextTest(); return; } - err = TestThReadsTheToleranceAttributeFromTheDut_4(); + err = Test3aThSendsGoToLiftPercentageCommandWith10001ToDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : 4a: TH sends GoToLiftPercentage command with 0xFFFF to DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 || WNCV.S.F00 && WNCV.S.C05.Rsp")) { + NextTest(); + return; + } + err = Test4aThSendsGoToLiftPercentageCommandWith0xFFFFToDut_5(); break; } @@ -84970,10 +83223,13 @@ class Test_TC_RH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; } @@ -84988,67 +83244,79 @@ class Test_TC_RH_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSNumber * _Nullable attrCurrentPositionLiftPercent100ths; - CHIP_ERROR TestThReadsTheMinMeasuredValueAttributeFromTheDut_1() + CHIP_ERROR Test1aIfPaLfLfThReadsCurrentPositionLiftPercent100thsFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the MinMeasuredValue attribute from the DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1a: If (PA_LF & LF) TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 9999U)); - } + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + } + { + attrCurrentPositionLiftPercent100ths = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheMaxMeasuredValueAttributeFromTheDut_2() + CHIP_ERROR + Test1b1cIfPaLfLfThReadsCurrentPositionLiftPercentageFromDutAssertCurrentPositionLiftPercent100ths100EqualsCurrentPositionLiftPercentage_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the MaxMeasuredValue attribute from the DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1b 1c: If (PA_LF & LF) TH reads CurrentPositionLiftPercentage from DUT + assert " + @"CurrentPositionLiftPercent100ths/100 equals CurrentPositionLiftPercentage Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, + [attrCurrentPositionLiftPercent100ths unsignedShortValue] / 100U)); + } if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 10000U)); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -85057,63 +83325,84 @@ class Test_TC_RH_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheMeasuredValueAttributeFromTheDut_3() + CHIP_ERROR Test2bThSendsGoToLiftPercentageCommandWithBadParamToDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the MeasuredValue attribute from the DUT Error: %@", err); + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:12288U]; + [cluster goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"2b: TH sends GoToLiftPercentage command with BadParam to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; - if (value != nil) { + return CHIP_NO_ERROR; + } - VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 10000U)); - } + CHIP_ERROR Test3aThSendsGoToLiftPercentageCommandWith10001ToDut_4() + { - NextTest(); - }]; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:10001U]; + [cluster goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"3a: TH sends GoToLiftPercentage command with 10001 to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheToleranceAttributeFromTheDut_4() + CHIP_ERROR Test4aThSendsGoToLiftPercentageCommandWith0xFFFFToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the Tolerance attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:65535U]; + [cluster goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"4a: TH sends GoToLiftPercentage command with 0xFFFF to DUT Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_SC_5_1 : public TestCommandBridge { +class Test_TC_WNCV_4_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_SC_5_1() - : TestCommandBridge("Test_TC_SC_5_1") + Test_TC_WNCV_4_4() + : TestCommandBridge("Test_TC_WNCV_4_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -85123,7 +83412,7 @@ class Test_TC_SC_5_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_SC_5_1() {} + ~Test_TC_WNCV_4_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -85131,11 +83420,11 @@ class Test_TC_SC_5_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_5_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_4_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_5_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_4_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -85148,232 +83437,395 @@ class Test_TC_SC_5_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); + err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the commissioner node ID\n"); - err = TestReadTheCommissionerNodeId_1(); + ChipLogProgress( + chipTool, " ***** Test Step 1 : 1a: If (PA_TL & TL) TH reads CurrentPositionTiltPercent100ths from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { + NextTest(); + return; + } + err = Test1aIfPaTlTlThReadsCurrentPositionTiltPercent100thsFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH adds ACL Operate privileges for Group 0x0103\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : 1b 1c: If (PA_LF & LF) TH reads CurrentPositionTiltPercentage from DUT + assert " + "CurrentPositionTiltPercent100ths/100 equals CurrentPositionTiltPercentage\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f && WNCV.S.A0009")) { NextTest(); return; } - err = TestThAddsAclOperatePrivilegesForGroup0x0103_2(); + err = Test1b1cIfPaLfLfThReadsCurrentPositionTiltPercentageFromDutAssertCurrentPositionTiltPercent100ths100EqualsCurrentPositionTiltPercentage_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH adds ACL Operate privileges for Group 0x0103\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : 2b: TH sends GoToTiltPercentage command with BadParam to DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 || WNCV.S.F01 && WNCV.S.C08.Rsp")) { NextTest(); return; } - err = TestThAddsAclOperatePrivilegesForGroup0x0103_3(); + err = Test2bThSendsGoToTiltPercentageCommandWithBadParamToDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends KeySetWrite command with incorrect key\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : 3a: TH sends GoToTiltPercentage command with 10001 to DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 || WNCV.S.F01 && WNCV.S.C08.Rsp")) { NextTest(); return; } - err = TestThSendsKeySetWriteCommandWithIncorrectKey_4(); + err = Test3aThSendsGoToTiltPercentageCommandWith10001ToDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends KeySetWrite command with incorrect key\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsKeySetWriteCommandWithIncorrectKey_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends KeySetWrite command with TH key\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : 4a: TH sends GoToTiltPercentage command with 0xFFFF to DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 || WNCV.S.F01 && WNCV.S.C08.Rsp")) { NextTest(); return; } - err = TestThSendsKeySetWriteCommandWithThKey_6(); + err = Test4aThSendsGoToTiltPercentageCommandWith0xFFFFToDut_5(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends KeySetWrite command with TH key\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsKeySetWriteCommandWithThKey_7(); + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH binds GroupId to GroupKeySet\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThBindsGroupIdToGroupKeySet_8(); + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH binds GroupId to GroupKeySet\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThBindsGroupIdToGroupKeySet_9(); + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends RemoveAllGroups command\n"); - err = TestThSendsRemoveAllGroupsCommand_10(); + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends AddGroup command\n"); - err = TestThSendsAddGroupCommand_11(); + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends ViewGroup command\n"); - if (ShouldSkip("G.S.F00")) { - NextTest(); - return; - } - err = TestThSendsViewGroupCommand_12(); + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends ViewGroup command\n"); - if (ShouldSkip("!(G.S.F00)")) { + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 6; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + NSNumber * _Nullable attrCurrentPositionTiltPercent100ths; + + CHIP_ERROR Test1aIfPaTlTlThReadsCurrentPositionTiltPercent100thsFromDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1a: If (PA_TL & TL) TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + } + { + attrCurrentPositionTiltPercent100ths = value; + } + NextTest(); - return; + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + Test1b1cIfPaLfLfThReadsCurrentPositionTiltPercentageFromDutAssertCurrentPositionTiltPercent100ths100EqualsCurrentPositionTiltPercentage_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1b 1c: If (PA_LF & LF) TH reads CurrentPositionTiltPercentage from DUT + assert " + @"CurrentPositionTiltPercent100ths/100 equals CurrentPositionTiltPercentage Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, + [attrCurrentPositionTiltPercent100ths unsignedShortValue] / 100U)); } - err = TestThSendsViewGroupCommand_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends KeySetRead\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; + if (value != nil) { + + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); } - err = TestThSendsKeySetRead_14(); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test2bThSendsGoToTiltPercentageCommandWithBadParamToDut_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:12288U]; + [cluster goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"2b: TH sends GoToTiltPercentage command with BadParam to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3aThSendsGoToTiltPercentageCommandWith10001ToDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:10001U]; + [cluster goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"3a: TH sends GoToTiltPercentage command with 10001 to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test4aThSendsGoToTiltPercentageCommandWith0xFFFFToDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:65535U]; + [cluster goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"4a: TH sends GoToTiltPercentage command with 0xFFFF to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_WNCV_4_5 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_WNCV_4_5() + : TestCommandBridge("Test_TC_WNCV_4_5") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_WNCV_4_5() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_4_5\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_4_5\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : 0a: Wait for the commissioned device to be retrieved\n"); + err = Test0aWaitForTheCommissionedDeviceToBeRetrieved_0(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends KeySetRead\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsKeySetRead_15(); + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : 0b: TH sends UpOrOpen command to preposition the DUT\n"); + err = Test0bThSendsUpOrOpenCommandToPrepositionTheDut_1(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { + case 2: + ChipLogProgress( + chipTool, " ***** Test Step 2 : 1a: If (PA_LF & LF) TH sends GoToLiftPercentage command with 90%% to DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.C05.Rsp")) { NextTest(); return; } - err = TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_16(); + err = Test1aIfPaLfLfThSendsGoToLiftPercentageCommandWith90ToDut_2(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_17(); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : 1b: TH Waits for 100ms-1s\n"); + err = Test1bThWaitsFor100ms1s_3(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads GroupTable attribute\n"); - if (ShouldSkip("G.S.F00 && PICS_SDK_CI_ONLY")) { + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : 1c: TH sends StopMotion command to DUT\n"); + if (ShouldSkip("WNCV.S.C02.Rsp")) { NextTest(); return; } - err = TestThReadsGroupTableAttribute_18(); + err = Test1cThSendsStopMotionCommandToDut_4(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads GroupTable attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && G.S.F00")) { - NextTest(); - return; - } - err = TestThReadsGroupTableAttribute_19(); + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : 1d: TH Waits for 100ms-1s\n"); + err = Test1dThWaitsFor100ms1s_5(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads GroupTable attribute\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY && !G.S.F00")) { + case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : 2a: If (PA_TL & TL) TH sends GoToTiltPercentage command with 90%% to DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.C08.Rsp")) { NextTest(); return; } - err = TestThReadsGroupTableAttribute_20(); + err = Test2aIfPaTlTlThSendsGoToTiltPercentageCommandWith90ToDut_6(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads GroupTable attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && !G.S.F00")) { - NextTest(); - return; - } - err = TestThReadsGroupTableAttribute_21(); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : 2b: TH Waits for 100ms-1s\n"); + err = Test2bThWaitsFor100ms1s_7(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH removes the GroupKeySet\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : 2c: TH sends StopMotion command to DUT\n"); + if (ShouldSkip("WNCV.S.C02.Rsp")) { NextTest(); return; } - err = TestThRemovesTheGroupKeySet_22(); + err = Test2cThSendsStopMotionCommandToDut_8(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH removes the GroupKeySet\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThRemovesTheGroupKeySet_23(); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : 2d: TH Waits for 100ms-1s\n"); + err = Test2dThWaitsFor100ms1s_9(); break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH verifies the corresponding GroupKeyMap entry has been removed\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : 3a: TH reads CurrentPositionLiftPercent100ths from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { NextTest(); return; } - err = TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_24(); + err = Test3aThReadsCurrentPositionLiftPercent100thsFromDut_10(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH verifies the corresponding GroupKeyMap entry has been removed\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : 3b: TH reads CurrentPositionTiltPercent100ths from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { NextTest(); return; } - err = TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH cleans up groups using RemoveAllGroups command\n"); - err = TestThCleansUpGroupsUsingRemoveAllGroupsCommand_26(); + err = Test3bThReadsCurrentPositionTiltPercent100thsFromDut_11(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TH verifies the group has been removed in the GroupTable\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : 3c: reboot/restart the DUT\n"); if (ShouldSkip("PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_27(); + err = Test3cRebootRestartTheDut_12(); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH verifies the group has been removed in the GroupTable\n"); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Reboot target device(DUT)\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_28(); + err = TestRebootTargetDeviceDUT_13(); break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH removes ACL Operate privileges for Group 0x0103\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : 3d: Wait for the commissioned device to be retrieved\n"); + err = Test3dWaitForTheCommissionedDeviceToBeRetrieved_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : 3e: TH reads CurrentPositionLiftPercent100ths from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { NextTest(); return; } - err = TestThRemovesAclOperatePrivilegesForGroup0x0103_29(); + err = Test3eThReadsCurrentPositionLiftPercent100thsFromDut_15(); break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH removes ACL Operate privileges for Group 0x0103\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : 3f: TH reads CurrentPositionTiltPercent100ths from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { NextTest(); return; } - err = TestThRemovesAclOperatePrivilegesForGroup0x0103_30(); + err = Test3fThReadsCurrentPositionTiltPercent100thsFromDut_16(); break; } @@ -85437,48 +83889,6 @@ class Test_TC_SC_5_1 : public TestCommandBridge { case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -85492,240 +83902,134 @@ class Test_TC_SC_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 31; + const uint16_t mTestCount = 17; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR Test0aWaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nonnull commissionerNodeId; - CHIP_ERROR TestReadTheCommissionerNodeId_1() + CHIP_ERROR Test0bThSendsUpOrOpenCommandToPrepositionTheDut_1() { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId("alpha", value, ^(const chip::GetCommissionerNodeIdResponse & values) { - { - commissionerNodeId = [[NSNumber alloc] initWithUnsignedLongLong:values.nodeId]; - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { + NSLog(@"0b: TH sends UpOrOpen command to preposition the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + NextTest(); - }); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThAddsAclOperatePrivilegesForGroup0x0103_2() + CHIP_ERROR Test1aIfPaLfLfThSendsGoToLiftPercentageCommandWith90ToDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [commissionerNodeId copy]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:259ULL]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - aclArgument = temp_0; - } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH adds ACL Operate privileges for Group 0x0103 Error: %@", err); + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:9000U]; + [cluster + goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"1a: If (PA_LF & LF) TH sends GoToLiftPercentage command with 90%% to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThAddsAclOperatePrivilegesForGroup0x0103_3() + CHIP_ERROR Test1bThWaitsFor100ms1s_3() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThSendsKeySetWriteCommandWithIncorrectKey_4() + CHIP_ERROR Test1cThSendsStopMotionCommandToDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:111ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:222ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:333ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends KeySetWrite command with incorrect key Error: %@", err); + [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { + NSLog(@"1c: TH sends StopMotion command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsKeySetWriteCommandWithIncorrectKey_5() + CHIP_ERROR Test1dThWaitsFor100ms1s_5() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThSendsKeySetWriteCommandWithThKey_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2220000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2220001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2220002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends KeySetWrite command with TH key Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsKeySetWriteCommandWithThKey_7() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThBindsGroupIdToGroupKeySet_8() + CHIP_ERROR Test2aIfPaTlTlThSendsGoToTiltPercentageCommandWith90ToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id groupKeyMapArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:259U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - groupKeyMapArgument = temp_0; - } - [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH binds GroupId to GroupKeySet Error: %@", err); + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:9000U]; + [cluster + goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"2a: If (PA_TL & TL) TH sends GoToTiltPercentage command with 90%% to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThBindsGroupIdToGroupKeySet_9() + CHIP_ERROR Test2bThWaitsFor100ms1s_7() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThSendsRemoveAllGroupsCommand_10() + CHIP_ERROR Test2cThSendsStopMotionCommandToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends RemoveAllGroups command Error: %@", err); + [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { + NSLog(@"2c: TH sends StopMotion command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85735,491 +84039,353 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAddGroupCommand_11() + CHIP_ERROR Test2dThWaitsFor100ms1s_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:259U]; - params.groupName = @"Test Group"; - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends AddGroup command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs("alpha", value); } + NSNumber * _Nullable attrCurrentPositionLiftPercent100ths; - CHIP_ERROR TestThSendsViewGroupCommand_12() + CHIP_ERROR Test3aThReadsCurrentPositionLiftPercent100thsFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:259U]; - [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends ViewGroup command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"Test Group")); - } + if (value != nil) { + } + VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercent100ths", value, 0U)); + { + attrCurrentPositionLiftPercent100ths = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable attrCurrentPositionTiltPercent100ths; - CHIP_ERROR TestThSendsViewGroupCommand_13() + CHIP_ERROR Test3bThReadsCurrentPositionTiltPercent100thsFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:259U]; - [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends ViewGroup command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"")); - } + if (value != nil) { + } + VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercent100ths", value, 0U)); + { + attrCurrentPositionTiltPercent100ths = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsKeySetRead_14() + CHIP_ERROR Test3cRebootRestartTheDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - [cluster - keySetReadWithParams:params - completion:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends KeySetRead Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.groupKeySet; - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); - VerifyOrReturn(CheckValueNull( - "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); - VerifyOrReturn(CheckValue("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2220000ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); - VerifyOrReturn(CheckValue("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2220001ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); - VerifyOrReturn(CheckValue("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2220002ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); } - CHIP_ERROR TestThSendsKeySetRead_15() + CHIP_ERROR TestRebootTargetDeviceDUT_13() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.message + = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, - 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_17() + CHIP_ERROR Test3dWaitForTheCommissionedDeviceToBeRetrieved_14() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsGroupTableAttribute_18() + CHIP_ERROR Test3eThReadsCurrentPositionLiftPercent100thsFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GroupTable attribute Error: %@", err); + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3e: TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Test Group")); - } + { + id actualValue = value; + if (attrCurrentPositionLiftPercent100ths == nil) { + VerifyOrReturn(CheckValueNull("CurrentPositionLiftPercent100ths", actualValue)); + } else { + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); + VerifyOrReturn( + CheckValue("CurrentPositionLiftPercent100ths", actualValue, attrCurrentPositionLiftPercent100ths)); + } + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsGroupTableAttribute_19() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsGroupTableAttribute_20() + CHIP_ERROR Test3fThReadsCurrentPositionTiltPercent100thsFromDut_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GroupTable attribute Error: %@", err); + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3f: TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, @"")); - } + { + id actualValue = value; + if (attrCurrentPositionTiltPercent100ths == nil) { + VerifyOrReturn(CheckValueNull("CurrentPositionTiltPercent100ths", actualValue)); + } else { + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); + VerifyOrReturn( + CheckValue("CurrentPositionTiltPercent100ths", actualValue, attrCurrentPositionTiltPercent100ths)); + } + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestThReadsGroupTableAttribute_21() +class TV_TargetNavigatorCluster : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TV_TargetNavigatorCluster() + : TestCommandBridge("TV_TargetNavigatorCluster") + , mTestIndex(0) { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestThRemovesTheGroupKeySet_22() + ~TV_TargetNavigatorCluster() {} + + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TV_TargetNavigatorCluster\n"); + } - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH removes the GroupKeySet Error: %@", err); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TV_TargetNavigatorCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + Wait(); - NextTest(); - }]; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Target Navigator list\n"); + err = TestReadAttributeTargetNavigatorList_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute current navigator target\n"); + err = TestReadAttributeCurrentNavigatorTarget_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Navigate Target Request Command\n"); + err = TestNavigateTargetRequestCommand_3(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestThRemovesTheGroupKeySet_23() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_24() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH verifies the corresponding GroupKeyMap entry has been removed Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(0))); - } - - NextTest(); - }]; +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 4; - return CHIP_NO_ERROR; - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - CHIP_ERROR TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_25() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThCleansUpGroupsUsingRemoveAllGroupsCommand_26() + CHIP_ERROR TestReadAttributeTargetNavigatorList_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH cleans up groups using RemoveAllGroups command Error: %@", err); + [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute Target Navigator list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("TargetList", [actualValue count], static_cast(2))); + VerifyOrReturn( + CheckValue("Identifier", ((MTRTargetNavigatorClusterTargetInfoStruct *) actualValue[0]).identifier, 1U)); + VerifyOrReturn(CheckValueAsString( + "Name", ((MTRTargetNavigatorClusterTargetInfoStruct *) actualValue[0]).name, @"exampleName")); + VerifyOrReturn( + CheckValue("Identifier", ((MTRTargetNavigatorClusterTargetInfoStruct *) actualValue[1]).identifier, 2U)); + VerifyOrReturn(CheckValueAsString( + "Name", ((MTRTargetNavigatorClusterTargetInfoStruct *) actualValue[1]).name, @"exampleName")); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_27() + CHIP_ERROR TestReadAttributeCurrentNavigatorTarget_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH verifies the group has been removed in the GroupTable Error: %@", err); + [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute current navigator target Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(0))); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentTarget", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_28() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThRemovesAclOperatePrivilegesForGroup0x0103_29() + CHIP_ERROR TestNavigateTargetRequestCommand_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [commissionerNodeId copy]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - aclArgument = temp_0; - } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH removes ACL Operate privileges for Group 0x0103 Error: %@", err); + __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; + params.target = [NSNumber numberWithUnsignedChar:1U]; + params.data = @"1"; + [cluster navigateTargetWithParams:params + completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Navigate Target Request Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - return CHIP_NO_ERROR; - } + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); + } - CHIP_ERROR TestThRemovesAclOperatePrivilegesForGroup0x0103_30() - { + NextTest(); + }]; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + return CHIP_NO_ERROR; } }; -class Test_TC_SWTCH_1_1 : public TestCommandBridge { +class TV_AudioOutputCluster : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_SWTCH_1_1() - : TestCommandBridge("Test_TC_SWTCH_1_1") + TV_AudioOutputCluster() + : TestCommandBridge("TV_AudioOutputCluster") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -86229,7 +84395,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_SWTCH_1_1() {} + ~TV_AudioOutputCluster() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -86237,11 +84403,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWTCH_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: TV_AudioOutputCluster\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWTCH_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: TV_AudioOutputCluster\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -86258,145 +84424,24 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Audio Output list\n"); + err = TestReadAttributeAudioOutputList_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Read FeatureMap attribute and Check values of flags in this FeatureMap\n"); - if (ShouldSkip("!SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestReadFeatureMapAttributeAndCheckValuesOfFlagsInThisFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute current audio output\n"); + err = TestReadAttributeCurrentAudioOutput_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given SWTCH.S.F00(LS) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("SWTCH.S.F00")) { - NextTest(); - return; - } - err = TestGivenSwtchsf00lsEnsureFeaturemapHasTheCorrectBitSet_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Select Output Command\n"); + err = TestSelectOutputCommand_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given SWTCH.S.F01(MS) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("SWTCH.S.F01")) { - NextTest(); - return; - } - err = TestGivenSwtchsf01msEnsureFeaturemapHasTheCorrectBitSet_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Rename Output Command\n"); + err = TestRenameOutputCommand_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Given SWTCH.S.F02(MSR) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("SWTCH.S.F02")) { - NextTest(); - return; - } - err = TestGivenSwtchsf02msrEnsureFeaturemapHasTheCorrectBitSet_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given SWTCH.S.F03(MSL) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("SWTCH.S.F03")) { - NextTest(); - return; - } - err = TestGivenSwtchsf03mslEnsureFeaturemapHasTheCorrectBitSet_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Given SWTCH.S.F04(MSM) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestGivenSwtchsf04msmEnsureFeaturemapHasTheCorrectBitSet_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("!SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: EventList \n"); - if (ShouldSkip(" !SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 ")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeEventList_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read EventList if SWTCH.S.F00(LS)\n"); - if (ShouldSkip("SWTCH.S.F00")) { - NextTest(); - return; - } - err = TestReadEventListIfSwtchsf00ls_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read EventList if SWTCH.S.F01(MS) & !SWTCH.S.F02(MSR)\n"); - if (ShouldSkip("SWTCH.S.F01 && !SWTCH.S.F02")) { - NextTest(); - return; - } - err = TestReadEventListIfSwtchsf01msswtchsf02msr_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & " - "!SWTCH.S.F04(MSM)\n"); - if (ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestReadEventListIfSwtchsf01msSwtchsf02msrswtchsf03mslswtchsf04msm_13(); - break; - case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & " - "!SWTCH.S.F04(MSM)\n"); - if (ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && !SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestReadEventListIfSwtchsf01msSwtchsf02msrSwtchsf03mslswtchsf04msm_14(); - break; - case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) " - "\n"); - if (ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestReadEventListIfSwtchsf01msSwtchsf02msrswtchsf03mslSwtchsf04msm_15(); - break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) " - "\n"); - if (ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestReadEventListIfSwtchsf01msSwtchsf02msrSwtchsf03mslSwtchsf04msm_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_18(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute Audio Output list\n"); + err = TestReadAttributeAudioOutputList_5(); break; } @@ -86427,45 +84472,6 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -86479,7 +84485,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -86494,236 +84500,308 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestReadAttributeAudioOutputList_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute Audio Output list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + VerifyOrReturn(CheckValue("OutputList", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("Index", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[0]).index, 1U)); + VerifyOrReturn(CheckValue("OutputType", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[0]).outputType, 0U)); + VerifyOrReturn( + CheckValueAsString("Name", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[0]).name, @"HDMI")); + VerifyOrReturn(CheckValue("Index", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[1]).index, 2U)); + VerifyOrReturn(CheckValue("OutputType", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[1]).outputType, 0U)); + VerifyOrReturn( + CheckValueAsString("Name", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[1]).name, @"HDMI")); + VerifyOrReturn(CheckValue("Index", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[2]).index, 3U)); + VerifyOrReturn(CheckValue("OutputType", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[2]).outputType, 0U)); + VerifyOrReturn( + CheckValueAsString("Name", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[2]).name, @"HDMI")); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeAndCheckValuesOfFlagsInThisFeatureMap_2() + CHIP_ERROR TestReadAttributeCurrentAudioOutput_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read FeatureMap attribute and Check values of flags in this FeatureMap Error: %@", err); + [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute current audio output Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValue("CurrentOutput", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenSwtchsf00lsEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestSelectOutputCommand_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given SWTCH.S.F00(LS) ensure featuremap has the correct bit set Error: %@", err); + __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + [cluster selectOutputWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Select Output Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenSwtchsf01msEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestRenameOutputCommand_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given SWTCH.S.F01(MS) ensure featuremap has the correct bit set Error: %@", err); + __auto_type * params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + params.name = @"HDMI Test"; + [cluster renameOutputWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Rename Output Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenSwtchsf02msrEnsureFeaturemapHasTheCorrectBitSet_5() + CHIP_ERROR TestReadAttributeAudioOutputList_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given SWTCH.S.F02(MSR) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute Audio Output list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenSwtchsf03mslEnsureFeaturemapHasTheCorrectBitSet_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given SWTCH.S.F03(MSL) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OutputList", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("Index", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[0]).index, 1U)); + VerifyOrReturn(CheckValue("OutputType", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[0]).outputType, 0U)); + VerifyOrReturn( + CheckValueAsString("Name", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[0]).name, @"HDMI Test")); + VerifyOrReturn(CheckValue("Index", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[1]).index, 2U)); + VerifyOrReturn(CheckValue("OutputType", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[1]).outputType, 0U)); + VerifyOrReturn( + CheckValueAsString("Name", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[1]).name, @"HDMI")); + VerifyOrReturn(CheckValue("Index", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[2]).index, 3U)); + VerifyOrReturn(CheckValue("OutputType", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[2]).outputType, 0U)); + VerifyOrReturn( + CheckValueAsString("Name", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[2]).name, @"HDMI")); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestGivenSwtchsf04msmEnsureFeaturemapHasTheCorrectBitSet_7() +class TV_ApplicationLauncherCluster : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TV_ApplicationLauncherCluster() + : TestCommandBridge("TV_ApplicationLauncherCluster") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given SWTCH.S.F04(MSM) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + ~TV_ApplicationLauncherCluster() {} - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - NextTest(); - }]; + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TV_ApplicationLauncherCluster\n"); + } - return CHIP_NO_ERROR; - } + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TV_ApplicationLauncherCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_9() - { + Wait(); - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Application Launcher list\n"); + err = TestReadAttributeApplicationLauncherList_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute application launcher app\n"); + err = TestReadAttributeApplicationLauncherApp_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Launch App Command\n"); + err = TestLaunchAppCommand_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Stop App Command\n"); + err = TestStopAppCommand_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Hide App Command\n"); + err = TestHideAppCommand_5(); + break; + } - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - NextTest(); - }]; + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - return CHIP_NO_ERROR; +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 6; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeEventList_10() + CHIP_ERROR TestReadAttributeApplicationLauncherList_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); + [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute Application Launcher list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("CatalogList", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValue("", actualValue[0], 123U)); + VerifyOrReturn(CheckValue("", actualValue[1], 456U)); } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListIfSwtchsf00ls_11() + CHIP_ERROR TestReadAttributeApplicationLauncherApp_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EventList if SWTCH.S.F00(LS) Error: %@", err); + [cluster readAttributeCurrentAppWithCompletion:^( + MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute application launcher app Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 0UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNull("CurrentApp", actualValue)); + } NextTest(); }]; @@ -86731,172 +84809,246 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListIfSwtchsf01msswtchsf02msr_12() + CHIP_ERROR TestLaunchAppCommand_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EventList if SWTCH.S.F01(MS) & !SWTCH.S.F02(MSR) Error: %@", err); + __auto_type * params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; + params.application = [[MTRApplicationLauncherClusterApplicationStruct alloc] init]; + ((MTRApplicationLauncherClusterApplicationStruct *) params.application).catalogVendorID = + [NSNumber numberWithUnsignedShort:123U]; + ((MTRApplicationLauncherClusterApplicationStruct *) params.application).applicationID = @"applicationId"; + + params.data = [[NSData alloc] initWithBytes:"data" length:4]; + [cluster + launchAppWithParams:params + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Launch App Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + { + id actualValue = values.data; + VerifyOrReturn( + CheckValueAsString("Data", actualValue, [[NSData alloc] initWithBytes:"data" length:4])); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListIfSwtchsf01msSwtchsf02msrswtchsf03mslswtchsf04msm_13() + CHIP_ERROR TestStopAppCommand_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM) Error: %@", err); + __auto_type * params = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; + params.application = [[MTRApplicationLauncherClusterApplicationStruct alloc] init]; + ((MTRApplicationLauncherClusterApplicationStruct *) params.application).catalogVendorID = + [NSNumber numberWithUnsignedShort:123U]; + ((MTRApplicationLauncherClusterApplicationStruct *) params.application).applicationID = @"applicationId"; + + [cluster + stopAppWithParams:params + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Stop App Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 3UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, [[NSData alloc] initWithBytes:"data" length:4])); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListIfSwtchsf01msSwtchsf02msrSwtchsf03mslswtchsf04msm_14() + CHIP_ERROR TestHideAppCommand_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM) Error: %@", err); + __auto_type * params = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; + params.application = [[MTRApplicationLauncherClusterApplicationStruct alloc] init]; + ((MTRApplicationLauncherClusterApplicationStruct *) params.application).catalogVendorID = + [NSNumber numberWithUnsignedShort:123U]; + ((MTRApplicationLauncherClusterApplicationStruct *) params.application).applicationID = @"applicationId"; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster + hideAppWithParams:params + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Hide App Command Error: %@", err); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 4UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, [[NSData alloc] initWithBytes:"data" length:4])); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadEventListIfSwtchsf01msSwtchsf02msrswtchsf03mslSwtchsf04msm_15() +class TV_KeypadInputCluster : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TV_KeypadInputCluster() + : TestCommandBridge("TV_KeypadInputCluster") + , mTestIndex(0) { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + ~TV_KeypadInputCluster() {} - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) Error: %@", err); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TV_KeypadInputCluster\n"); + } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 6UL)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TV_KeypadInputCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - NextTest(); - }]; + Wait(); - return CHIP_NO_ERROR; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Send Key Command\n"); + err = TestSendKeyCommand_1(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestReadEventListIfSwtchsf01msSwtchsf02msrSwtchsf03mslSwtchsf04msm_16() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 6UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_17() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_18() + CHIP_ERROR TestSendKeyCommand_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:3U]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Key Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_TMP_1_1 : public TestCommandBridge { +class TV_AccountLoginCluster : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TMP_1_1() - : TestCommandBridge("Test_TC_TMP_1_1") + TV_AccountLoginCluster() + : TestCommandBridge("TV_AccountLoginCluster") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -86906,7 +85058,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_TMP_1_1() {} + ~TV_AccountLoginCluster() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -86914,11 +85066,11 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TMP_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: TV_AccountLoginCluster\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TMP_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: TV_AccountLoginCluster\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -86935,42 +85087,16 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read ClusterRevision attribute from the DUT\n"); - err = TestReadClusterRevisionAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Get Setup PIN Command\n"); + err = TestGetSetupPinCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read FeatureMap attribute from the DUT\n"); - err = TestReadFeatureMapAttributeFromTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Login Command\n"); + err = TestLoginCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(Tolerance) in AttributeList\n"); - if (ShouldSkip("TMP.S.A0003")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeToleranceInAttributeList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read AcceptedCommandList attribute from the DUT\n"); - err = TestReadAcceptedCommandListAttributeFromTheDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read GeneratedCommandList attribute from the DUT\n"); - err = TestReadGeneratedCommandListAttributeFromTheDut_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " - "contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Logout Command\n"); + err = TestLogoutCommand_3(); break; } @@ -86995,18 +85121,6 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -87020,7 +85134,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -87035,181 +85149,190 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadClusterRevisionAttributeFromTheDut_1() + CHIP_ERROR TestGetSetupPinCommand_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ClusterRevision attribute from the DUT Error: %@", err); + __auto_type * params = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; + params.tempAccountIdentifier = @"asdf"; + [cluster + getSetupPINWithParams:params + completion:^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Get Setup PIN Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); - } + { + id actualValue = values.setupPIN; + VerifyOrReturn(CheckValueAsString("SetupPIN", actualValue, @"tempPin123")); + } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() + CHIP_ERROR TestLoginCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRAccountLoginClusterLoginParams alloc] init]; + params.tempAccountIdentifier = @"asdf"; + params.setupPIN = @"tempPin123"; + [cluster loginWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Login Command Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestLogoutCommand_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster logoutWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Logout Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() +class TV_WakeOnLanCluster : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TV_WakeOnLanCluster() + : TestCommandBridge("TV_WakeOnLanCluster") + , mTestIndex(0) { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + ~TV_WakeOnLanCluster() {} - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TV_WakeOnLanCluster\n"); + } - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TV_WakeOnLanCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - NextTest(); - }]; + Wait(); - return CHIP_NO_ERROR; + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read mac address\n"); + err = TestReadMacAddress_1(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestReadAcceptedCommandListAttributeFromTheDut_5() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read AcceptedCommandList attribute from the DUT Error: %@", err); + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadGeneratedCommandListAttributeFromTheDut_6() + CHIP_ERROR TestReadMacAddress_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GeneratedCommandList attribute from the DUT Error: %@", err); + [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read mac address Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintMinLength("MACAddress", value, 3)); NextTest(); }]; return CHIP_NO_ERROR; } - - CHIP_ERROR - TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; -class Test_TC_TMP_2_1 : public TestCommandBridge { +class TV_ApplicationBasicCluster : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TMP_2_1() - : TestCommandBridge("Test_TC_TMP_2_1") + TV_ApplicationBasicCluster() + : TestCommandBridge("TV_ApplicationBasicCluster") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -87219,7 +85342,7 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_TMP_2_1() {} + ~TV_ApplicationBasicCluster() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -87227,11 +85350,11 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TMP_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: TV_ApplicationBasicCluster\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TMP_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: TV_ApplicationBasicCluster\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -87248,36 +85371,36 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: MinMeasuredValue\n"); - if (ShouldSkip("TMP.S.A0001")) { - NextTest(); - return; - } - err = TestReadTheMandatoryAttributeMinMeasuredValue_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute vendor name\n"); + err = TestReadAttributeVendorName_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MaxMeasuredValue\n"); - if (ShouldSkip("TMP.S.A0002")) { - NextTest(); - return; - } - err = TestReadTheMandatoryAttributeMaxMeasuredValue_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute vendor id\n"); + err = TestReadAttributeVendorId_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute: MeasuredValue\n"); - if (ShouldSkip("TMP.S.A0000")) { - NextTest(); - return; - } - err = TestReadTheMandatoryAttributeMeasuredValue_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute application name\n"); + err = TestReadAttributeApplicationName_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute: Tolerance\n"); - if (ShouldSkip("TMP.S.A0003")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeTolerance_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute product id\n"); + err = TestReadAttributeProductId_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute application status\n"); + err = TestReadAttributeApplicationStatus_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute application status\n"); + err = TestReadAttributeApplicationStatus_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read attribute application version\n"); + err = TestReadAttributeApplicationVersion_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute application allowed vendor list\n"); + err = TestReadAttributeApplicationAllowedVendorList_8(); break; } @@ -87305,6 +85428,18 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -87318,7 +85453,7 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -87332,30 +85467,45 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nullable MinMeasuredValue; - CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_1() + CHIP_ERROR TestReadAttributeVendorName_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: MinMeasuredValue Error: %@", err); + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute vendor name Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value shortValue], 32767)); + { + id actualValue = value; + VerifyOrReturn(CheckValueAsString("VendorName", actualValue, @"exampleVendorName1")); } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeVendorId_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute vendor id Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { - MinMeasuredValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("VendorID", actualValue, 1U)); } NextTest(); @@ -87363,30 +85513,68 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nullable MaxMeasuredValue; - CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_2() + CHIP_ERROR TestReadAttributeApplicationName_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: MaxMeasuredValue Error: %@", err); + [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute application name Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + { + id actualValue = value; + VerifyOrReturn(CheckValueAsString("ApplicationName", actualValue, @"exampleName1")); + } - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value shortValue], -27314)); - VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value shortValue], 32767)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeProductId_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute product id Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ProductID", actualValue, 1U)); } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeApplicationStatus_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute application status Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { - MaxMeasuredValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -87395,25 +85583,48 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_3() + CHIP_ERROR TestReadAttributeApplicationStatus_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: MeasuredValue Error: %@", err); + [cluster readAttributeApplicationWithCompletion:^( + MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute application status Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + { + id actualValue = value; + VerifyOrReturn(CheckValue( + "CatalogVendorID", ((MTRApplicationBasicClusterApplicationStruct *) actualValue).catalogVendorID, 123U)); + VerifyOrReturn(CheckValueAsString("ApplicationID", + ((MTRApplicationBasicClusterApplicationStruct *) actualValue).applicationID, @"applicationId")); + } - VerifyOrReturn(CheckConstraintType("measuredValue", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value shortValue], MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value shortValue], MaxMeasuredValue)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeApplicationVersion_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute application version Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueAsString("ApplicationVersion", actualValue, @"exampleVersion")); } NextTest(); @@ -87422,23 +85633,24 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeTolerance_4() + CHIP_ERROR TestReadAttributeApplicationAllowedVendorList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: Tolerance Error: %@", err); + [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute application allowed vendor list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AllowedVendorList", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValue("", actualValue[0], 1U)); + VerifyOrReturn(CheckValue("", actualValue[1], 456U)); + } NextTest(); }]; @@ -87447,11 +85659,11 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { } }; -class Test_TC_TSTAT_1_1 : public TestCommandBridge { +class TV_MediaPlaybackCluster : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TSTAT_1_1() - : TestCommandBridge("Test_TC_TSTAT_1_1") + TV_MediaPlaybackCluster() + : TestCommandBridge("TV_MediaPlaybackCluster") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -87461,7 +85673,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_TSTAT_1_1() {} + ~TV_MediaPlaybackCluster() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -87469,11 +85681,11 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: TV_MediaPlaybackCluster\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: TV_MediaPlaybackCluster\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -87490,201 +85702,88 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute playback state\n"); + err = TestReadAttributePlaybackState_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("!TSTAT.S.F00 && !TSTAT.S.F01 && !TSTAT.S.F02 && !TSTAT.S.F03 && !TSTAT.S.F04 && !TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute start time\n"); + err = TestReadAttributeStartTime_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given TSTAT.S.F00(HEAT ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestGivenTstatsf00heatEnsureFeaturemapHasTheCorrectBitSet_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute duration\n"); + err = TestReadAttributeDuration_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given TSTAT.S.F01(COOL) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestGivenTstatsf01coolEnsureFeaturemapHasTheCorrectBitSet_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute position\n"); + err = TestReadAttributePosition_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Given TSTAT.S.F02(OCC) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestGivenTstatsf02occEnsureFeaturemapHasTheCorrectBitSet_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute playback speed\n"); + err = TestReadAttributePlaybackSpeed_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given TSTAT.S.F03(SCH) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TSTAT.S.F03")) { - NextTest(); - return; - } - err = TestGivenTstatsf03schEnsureFeaturemapHasTheCorrectBitSet_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute seek range end\n"); + err = TestReadAttributeSeekRangeEnd_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Given TSTAT.S.F04(SB) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TSTAT.S.F04")) { - NextTest(); - return; - } - err = TestGivenTstatsf04sbEnsureFeaturemapHasTheCorrectBitSet_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read attribute seek range start\n"); + err = TestReadAttributeSeekRangeStart_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Given TSTAT.S.F05(AUTO) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestGivenTstatsf05autoEnsureFeaturemapHasTheCorrectBitSet_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Media Playback Play Command\n"); + err = TestMediaPlaybackPlayCommand_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Media Playback Pause Command\n"); + err = TestMediaPlaybackPauseCommand_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Media Playback Stop Command\n"); + err = TestMediaPlaybackStopCommand_10(); break; case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Media Playback Start Over Command\n"); + err = TestMediaPlaybackStartOverCommand_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Media Playback Previous Command\n"); + err = TestMediaPlaybackPreviousCommand_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " - "AttributeList\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Media Playback Next Command\n"); + err = TestMediaPlaybackNextCommand_13(); break; case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " - "AttributeList\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Media Playback Rewind Command\n"); + err = TestMediaPlaybackRewindCommand_14(); break; case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Media Playback Fast Forward Command\n"); + err = TestMediaPlaybackFastForwardCommand_15(); break; case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F03")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Media Playback Skip Forward Command\n"); + err = TestMediaPlaybackSkipForwardCommand_16(); break; case 17: - ChipLogProgress( - chipTool, " ***** Test Step 17 : Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F04")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Read attribute position after skip forward\n"); + err = TestReadAttributePositionAfterSkipForward_17(); break; case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in " - "AttributeList\n"); - if (ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Media Playback Skip Backward Command\n"); + err = TestMediaPlaybackSkipBackwardCommand_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Read attribute position after skip backward\n"); + err = TestReadAttributePositionAfterSkipBackward_19(); break; case 20: - ChipLogProgress( - chipTool, " ***** Test Step 20 : Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList\n"); - if (ShouldSkip("TSTAT.S.F03")) { - NextTest(); - return; - } - err = TestReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip(" !TSTAT.S.C04.Rsp && !TSTAT.S.C02.Rsp ")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeGeneratedCommandList_21(); - break; - case 22: - ChipLogProgress( - chipTool, " ***** Test Step 22 : Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList\n"); - if (ShouldSkip("TSTAT.S.F03")) { - NextTest(); - return; - } - err = TestReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList\n"); - if (ShouldSkip("TSTAT.S.C04.Rsp")) { - NextTest(); - return; - } - err = TestReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_23(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Media Playback Seek Command\n"); + err = TestMediaPlaybackSeekCommand_20(); break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " - "contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_24(); + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Read attribute position after seek\n"); + err = TestReadAttributePositionAfterSeek_21(); break; } @@ -87763,15 +85862,6 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -87785,7 +85875,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 25; + const uint16_t mTestCount = 22; chip::Optional mNodeId; chip::Optional mCluster; @@ -87800,190 +85890,171 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestReadAttributePlaybackState_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute playback state Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); + VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestReadAttributeStartTime_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute start time Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValueNonNull("StartTime", actualValue)); + VerifyOrReturn(CheckValue("StartTime", actualValue, 0ULL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenTstatsf00heatEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestReadAttributeDuration_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TSTAT.S.F00(HEAT ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute duration Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenTstatsf01coolEnsureFeaturemapHasTheCorrectBitSet_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TSTAT.S.F01(COOL) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("Duration", actualValue)); + VerifyOrReturn(CheckValue("Duration", actualValue, 80000ULL)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenTstatsf02occEnsureFeaturemapHasTheCorrectBitSet_5() + CHIP_ERROR TestReadAttributePosition_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TSTAT.S.F02(OCC) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeSampledPositionWithCompletion:^( + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute position Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenTstatsf03schEnsureFeaturemapHasTheCorrectBitSet_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TSTAT.S.F03(SCH) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); + VerifyOrReturn( + CheckValue("UpdatedAt", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).updatedAt, 0ULL)); + VerifyOrReturn( + CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); + VerifyOrReturn( + CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 0ULL)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenTstatsf04sbEnsureFeaturemapHasTheCorrectBitSet_7() + CHIP_ERROR TestReadAttributePlaybackSpeed_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TSTAT.S.F04(SB) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute playback speed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 0.0f)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenTstatsf05autoEnsureFeaturemapHasTheCorrectBitSet_8() + CHIP_ERROR TestReadAttributeSeekRangeEnd_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given TSTAT.S.F05(AUTO) ensure featuremap has the correct bit set Error: %@", err); + [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute seek range end Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("SeekRangeEnd", actualValue)); + VerifyOrReturn(CheckValue("SeekRangeEnd", actualValue, 80000ULL)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_9() + CHIP_ERROR TestReadAttributeSeekRangeStart_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute seek range start Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 27UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 28UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("SeekRangeStart", actualValue)); + VerifyOrReturn(CheckValue("SeekRangeStart", actualValue, 0ULL)); + } NextTest(); }]; @@ -87991,20 +86062,27 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_10() + CHIP_ERROR TestMediaPlaybackPlayCommand_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList Error: %@", err); + [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Play Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); + } NextTest(); }]; @@ -88012,20 +86090,27 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_11() + CHIP_ERROR TestMediaPlaybackPauseCommand_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList Error: %@", err); + [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Pause Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); + } NextTest(); }]; @@ -88033,20 +86118,27 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_12() + CHIP_ERROR TestMediaPlaybackStopCommand_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); + [cluster stopWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Stop Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); + } NextTest(); }]; @@ -88054,64 +86146,85 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_13() + CHIP_ERROR TestMediaPlaybackStartOverCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); + [cluster + startOverWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Start Over Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_14() + CHIP_ERROR TestMediaPlaybackPreviousCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); + [cluster + previousWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Previous Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_15() + CHIP_ERROR TestMediaPlaybackNextCommand_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList Error: %@", err); + [cluster nextWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Next Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 25UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); + } NextTest(); }]; @@ -88119,22 +86232,27 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_16() + CHIP_ERROR TestMediaPlaybackRewindCommand_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList Error: %@", err); + [cluster rewindWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Rewind Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 32UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 33UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 34UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); + } NextTest(); }]; @@ -88142,66 +86260,90 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_17() + CHIP_ERROR TestMediaPlaybackFastForwardCommand_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList Error: %@", err); + [cluster + fastForwardWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Fast Forward Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 52UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 53UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 54UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_18() + CHIP_ERROR TestMediaPlaybackSkipForwardCommand_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); + __auto_type * params = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; + params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:500ULL]; + [cluster + skipForwardWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Skip Forward Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 55UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 56UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 57UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_19() + CHIP_ERROR TestReadAttributePositionAfterSkipForward_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeSampledPositionWithCompletion:^( + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute position after skip forward Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); + VerifyOrReturn( + CheckValue("UpdatedAt", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).updatedAt, 0ULL)); + VerifyOrReturn( + CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); + VerifyOrReturn( + CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 500ULL)); + } NextTest(); }]; @@ -88209,113 +86351,135 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_20() + CHIP_ERROR TestMediaPlaybackSkipBackwardCommand_18() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList Error: %@", err); + __auto_type * params = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; + params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:100ULL]; + [cluster + skipBackwardWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Skip Backward Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_21() + CHIP_ERROR TestReadAttributePositionAfterSkipBackward_19() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeSampledPositionWithCompletion:^( + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute position after skip backward Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); + VerifyOrReturn( + CheckValue("UpdatedAt", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).updatedAt, 0ULL)); + VerifyOrReturn( + CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); + VerifyOrReturn( + CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 400ULL)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_22() + CHIP_ERROR TestMediaPlaybackSeekCommand_20() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList Error: %@", err); + __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; + params.position = [NSNumber numberWithUnsignedLongLong:1000ULL]; + [cluster seekWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Seek Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 0UL)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_23() + CHIP_ERROR TestReadAttributePositionAfterSeek_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList Error: %@", err); + [cluster readAttributeSampledPositionWithCompletion:^( + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute position after seek Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); + VerifyOrReturn( + CheckValue("UpdatedAt", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).updatedAt, 0ULL)); + VerifyOrReturn( + CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); + VerifyOrReturn( + CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 1000ULL)); + } NextTest(); }]; return CHIP_NO_ERROR; } - - CHIP_ERROR - TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_24() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; -class Test_TC_TSUIC_1_1 : public TestCommandBridge { +class TV_ChannelCluster : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TSUIC_1_1() - : TestCommandBridge("Test_TC_TSUIC_1_1") + TV_ChannelCluster() + : TestCommandBridge("TV_ChannelCluster") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -88325,7 +86489,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_TSUIC_1_1() {} + ~TV_ChannelCluster() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -88333,11 +86497,11 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: TV_ChannelCluster\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: TV_ChannelCluster\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -88354,34 +86518,258 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH read ClusterRevision attribute from the DUT\n"); - err = TestThReadClusterRevisionAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Channel list\n"); + err = TestReadAttributeChannelList_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read FeatureMap attribute from the DUT\n"); - err = TestReadFeatureMapAttributeFromTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute channel lineup\n"); + err = TestReadAttributeChannelLineup_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute current channel\n"); + err = TestReadAttributeCurrentChannel_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Change Channel Command\n"); + err = TestChangeChannelCommand_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Change Channel By Number Command\n"); + err = TestChangeChannelByNumberCommand_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT.For this cluster the list is usually empty but it can " - "contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Skip Channel Command\n"); + err = TestSkipChannelCommand_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Verify that Skip Channel Command set correct current channel\n"); + err = TestVerifyThatSkipChannelCommandSetCorrectCurrentChannel_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Skip Channel Command\n"); + err = TestSkipChannelCommand_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Verify that Skip Channel Command set correct current channel\n"); + err = TestVerifyThatSkipChannelCommandSetCorrectCurrentChannel_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Test 1.1 - Start from Channel 3\n"); + err = TestTest11StartFromChannel3_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Test 1.2 - Skip Up By 1\n"); + err = TestTest12SkipUpBy1_11(); + break; + case 12: + ChipLogProgress( + chipTool, " ***** Test Step 12 : Test 1.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest13VerifyThatSkipChannelCommandSetCorrectCurrentChannel_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Test 2.1 - Start from Channel 3\n"); + err = TestTest21StartFromChannel3_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Test 2.2 - Skip Up By 2\n"); + err = TestTest22SkipUpBy2_14(); + break; + case 15: + ChipLogProgress( + chipTool, " ***** Test Step 15 : Test 2.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest23VerifyThatSkipChannelCommandSetCorrectCurrentChannel_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Test 3.1 - Start from Channel 3\n"); + err = TestTest31StartFromChannel3_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Test 3.2 - Skip Up By 3\n"); + err = TestTest32SkipUpBy3_17(); + break; + case 18: + ChipLogProgress( + chipTool, " ***** Test Step 18 : Test 3.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest33VerifyThatSkipChannelCommandSetCorrectCurrentChannel_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Test 4.1 - Start from Channel 3\n"); + err = TestTest41StartFromChannel3_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Test 4.2 - Skip Up By 4\n"); + err = TestTest42SkipUpBy4_20(); + break; + case 21: + ChipLogProgress( + chipTool, " ***** Test Step 21 : Test 4.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest43VerifyThatSkipChannelCommandSetCorrectCurrentChannel_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Test 5.2 - Skip Up By 5\n"); + err = TestTest52SkipUpBy5_22(); + break; + case 23: + ChipLogProgress( + chipTool, " ***** Test Step 23 : Test 5.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest53VerifyThatSkipChannelCommandSetCorrectCurrentChannel_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Test 6.1 - Start from Channel 3\n"); + err = TestTest61StartFromChannel3_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Test 6.2 - Skip Up By 6\n"); + err = TestTest62SkipUpBy6_25(); + break; + case 26: + ChipLogProgress( + chipTool, " ***** Test Step 26 : Test 6.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest63VerifyThatSkipChannelCommandSetCorrectCurrentChannel_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Test 7.1 - Start from Channel 3\n"); + err = TestTest71StartFromChannel3_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Test 7.2 - Skip Up By 7\n"); + err = TestTest72SkipUpBy7_28(); + break; + case 29: + ChipLogProgress( + chipTool, " ***** Test Step 29 : Test 7.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest73VerifyThatSkipChannelCommandSetCorrectCurrentChannel_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Test 8.1 - Start from Channel 3\n"); + err = TestTest81StartFromChannel3_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Test 8.2 - Skip Up By 8\n"); + err = TestTest82SkipUpBy8_31(); + break; + case 32: + ChipLogProgress( + chipTool, " ***** Test Step 32 : Test 8.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest83VerifyThatSkipChannelCommandSetCorrectCurrentChannel_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Test 1.2 - Skip Down By 1\n"); + err = TestTest12SkipDownBy1_33(); + break; + case 34: + ChipLogProgress( + chipTool, " ***** Test Step 34 : Test 1.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest13VerifyThatSkipChannelCommandSetCorrectCurrentChannel_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Test 2.1 - Start from Channel 3\n"); + err = TestTest21StartFromChannel3_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : Test 2.2 - Skip Down By 2\n"); + err = TestTest22SkipDownBy2_36(); + break; + case 37: + ChipLogProgress( + chipTool, " ***** Test Step 37 : Test 2.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest23VerifyThatSkipChannelCommandSetCorrectCurrentChannel_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Test 3.1 - Start from Channel 3\n"); + err = TestTest31StartFromChannel3_38(); + break; + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : Test 3.2 - Skip Down By 3\n"); + err = TestTest32SkipDownBy3_39(); + break; + case 40: + ChipLogProgress( + chipTool, " ***** Test Step 40 : Test 3.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest33VerifyThatSkipChannelCommandSetCorrectCurrentChannel_40(); + break; + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : Test 4.1 - Start from Channel 3\n"); + err = TestTest41StartFromChannel3_41(); + break; + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : Test 4.2 - Skip Down By 4\n"); + err = TestTest42SkipDownBy4_42(); + break; + case 43: + ChipLogProgress( + chipTool, " ***** Test Step 43 : Test 4.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest43VerifyThatSkipChannelCommandSetCorrectCurrentChannel_43(); + break; + case 44: + ChipLogProgress(chipTool, " ***** Test Step 44 : Test 5.2 - Skip Down By 5\n"); + err = TestTest52SkipDownBy5_44(); + break; + case 45: + ChipLogProgress( + chipTool, " ***** Test Step 45 : Test 5.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest53VerifyThatSkipChannelCommandSetCorrectCurrentChannel_45(); + break; + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : Test 6.1 - Start from Channel 3\n"); + err = TestTest61StartFromChannel3_46(); + break; + case 47: + ChipLogProgress(chipTool, " ***** Test Step 47 : Test 6.2 - Skip Down By 6\n"); + err = TestTest62SkipDownBy6_47(); + break; + case 48: + ChipLogProgress( + chipTool, " ***** Test Step 48 : Test 6.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest63VerifyThatSkipChannelCommandSetCorrectCurrentChannel_48(); + break; + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : Test 7.1 - Start from Channel 3\n"); + err = TestTest71StartFromChannel3_49(); + break; + case 50: + ChipLogProgress(chipTool, " ***** Test Step 50 : Test 7.2 - Skip Down By 7\n"); + err = TestTest72SkipDownBy7_50(); + break; + case 51: + ChipLogProgress( + chipTool, " ***** Test Step 51 : Test 7.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest73VerifyThatSkipChannelCommandSetCorrectCurrentChannel_51(); + break; + case 52: + ChipLogProgress(chipTool, " ***** Test Step 52 : Test 8.1 - Start from Channel 3\n"); + err = TestTest81StartFromChannel3_52(); + break; + case 53: + ChipLogProgress(chipTool, " ***** Test Step 53 : Test 8.2 - Skip Down By 8\n"); + err = TestTest82SkipDownBy8_53(); + break; + case 54: + ChipLogProgress( + chipTool, " ***** Test Step 54 : Test 8.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest83VerifyThatSkipChannelCommandSetCorrectCurrentChannel_54(); + break; + case 55: + ChipLogProgress(chipTool, " ***** Test Step 55 : Test 1.2 - Skip Up By 32,767\n"); + err = TestTest12SkipUpBy32767_55(); + break; + case 56: + ChipLogProgress( + chipTool, " ***** Test Step 56 : Test 1.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest13VerifyThatSkipChannelCommandSetCorrectCurrentChannel_56(); + break; + case 57: + ChipLogProgress(chipTool, " ***** Test Step 57 : Test 1.1 - Start from Channel 3\n"); + err = TestTest11StartFromChannel3_57(); + break; + case 58: + ChipLogProgress(chipTool, " ***** Test Step 58 : Test 1.2 - Skip Down By 32,768\n"); + err = TestTest12SkipDownBy32768_58(); + break; + case 59: + ChipLogProgress( + chipTool, " ***** Test Step 59 : Test 1.3 - Verify that Skip Channel Command set correct current channel\n"); + err = TestTest13VerifyThatSkipChannelCommandSetCorrectCurrentChannel_59(); break; } @@ -88415,6 +86803,165 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 50: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 51: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 52: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 53: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 54: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 55: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 56: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 57: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 58: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 59: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -88428,7 +86975,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 60; chip::Optional mNodeId; chip::Optional mCluster; @@ -88443,16042 +86990,68 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadClusterRevisionAttributeFromTheDut_1() + CHIP_ERROR TestReadAttributeChannelList_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH read ClusterRevision attribute from the DUT Error: %@", err); + [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute Channel list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); + VerifyOrReturn(CheckValue("ChannelList", [actualValue count], static_cast(4))); + VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[0]).majorNumber, 6U)); + VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[0]).minorNumber, 0U)); + VerifyOrReturn(CheckValueAsString("Name", ((MTRChannelClusterChannelInfoStruct *) actualValue[0]).name, @"ABC")); + VerifyOrReturn( + CheckValueAsString("CallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[0]).callSign, @"KAAL-TV")); + VerifyOrReturn(CheckValueAsString( + "AffiliateCallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[0]).affiliateCallSign, @"KAAL")); + VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[1]).majorNumber, 9U)); + VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[1]).minorNumber, 1U)); + VerifyOrReturn(CheckValueAsString("Name", ((MTRChannelClusterChannelInfoStruct *) actualValue[1]).name, @"PBS")); + VerifyOrReturn( + CheckValueAsString("CallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[1]).callSign, @"KCTS-TV")); + VerifyOrReturn(CheckValueAsString( + "AffiliateCallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[1]).affiliateCallSign, @"KCTS")); + VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[2]).majorNumber, 9U)); + VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[2]).minorNumber, 2U)); + VerifyOrReturn( + CheckValueAsString("Name", ((MTRChannelClusterChannelInfoStruct *) actualValue[2]).name, @"PBS Kids")); + VerifyOrReturn( + CheckValueAsString("CallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[2]).callSign, @"KCTS-TV")); + VerifyOrReturn(CheckValueAsString( + "AffiliateCallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[2]).affiliateCallSign, @"KCTS")); + VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[3]).majorNumber, 9U)); + VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[3]).minorNumber, 3U)); + VerifyOrReturn( + CheckValueAsString("Name", ((MTRChannelClusterChannelInfoStruct *) actualValue[3]).name, @"World Channel")); + VerifyOrReturn( + CheckValueAsString("CallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[3]).callSign, @"KCTS-TV")); + VerifyOrReturn(CheckValueAsString( + "AffiliateCallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[3]).affiliateCallSign, @"KCTS")); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() + CHIP_ERROR TestReadAttributeChannelLineup_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - TestReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; - -class Test_TC_TSUIC_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TSUIC_2_1() - : TestCommandBridge("Test_TC_TSUIC_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_TSUIC_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: TemperatureDisplayMode\n"); - if (ShouldSkip("TSUIC.S.A0000")) { - NextTest(); - return; - } - err = TestReadTheMandatoryAttributeTemperatureDisplayMode_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: KeypadLockout\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestReadTheMandatoryAttributeKeypadLockout_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the optional attribute: ScheduleProgrammingVisibility\n"); - if (ShouldSkip("TSUIC.S.A0002")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_3(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: TemperatureDisplayMode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("temperatureDisplayMode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("temperatureDisplayMode", [value unsignedCharValue], 1U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: KeypadLockout Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("keypadLockout", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("keypadLockout", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("keypadLockout", [value unsignedCharValue], 5U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("scheduleProgrammingVisibility", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("scheduleProgrammingVisibility", [value unsignedCharValue], 1U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TSUIC_2_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TSUIC_2_2() - : TestCommandBridge("Test_TC_TSUIC_2_2") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_TSUIC_2_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_2_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Writes a value of 0 to TemperatureDisplayMode attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0000")) { - NextTest(); - return; - } - err = TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Verify device temperature displayed in °C\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0000")) { - NextTest(); - return; - } - err = TestVerifyDeviceTemperatureDisplayedInc_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the TemperatureDisplayMode attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheTemperatureDisplayModeAttributeOfDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Writes a value of 1 to TemperatureDisplayMode attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0000")) { - NextTest(); - return; - } - err = TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Verify device temperature displayed in °F\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0000")) { - NextTest(); - return; - } - err = TestVerifyDeviceTemperatureDisplayedInf_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the TemperatureDisplayMode attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheTemperatureDisplayModeAttributeOfDut_6(); - break; - case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Writes a value of greater than 1 to TemperatureDisplayMode attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0000")) { - NextTest(); - return; - } - err = TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads the TemperatureDisplayMode attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheTemperatureDisplayModeAttributeOfDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Writes a value of 0 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Verify all device functionality available to the user\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestVerifyAllDeviceFunctionalityAvailableToTheUser_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads the KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsTheKeypadLockoutAttributeOfDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Writes a value of 1 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Verify device operates at Level 1 reduced functionality\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestVerifyDeviceOperatesAtLevel1ReducedFunctionality_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads the KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsTheKeypadLockoutAttributeOfDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Writes a value of 2 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Verify device operates at Level 2 reduced functionality\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestVerifyDeviceOperatesAtLevel2ReducedFunctionality_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads the KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsTheKeypadLockoutAttributeOfDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Writes a value of 3 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Verify device operates at Level 3 reduced functionality\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestVerifyDeviceOperatesAtLevel3ReducedFunctionality_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads the KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsTheKeypadLockoutAttributeOfDut_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Writes a value of 4 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Verify device operates at Level 4 reduced functionality\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestVerifyDeviceOperatesAtLevel4ReducedFunctionality_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads the KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsTheKeypadLockoutAttributeOfDut_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Writes a value of 5 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Verify device operates at least functionality level\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestVerifyDeviceOperatesAtLeastFunctionalityLevel_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads the KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsTheKeypadLockoutAttributeOfDut_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Writes a value of greater than 5 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads the KeypadLockout attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsTheKeypadLockoutAttributeOfDut_28(); - break; - case 29: - ChipLogProgress( - chipTool, " ***** Test Step 29 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0002")) { - NextTest(); - return; - } - err = TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_29(); - break; - case 30: - ChipLogProgress( - chipTool, " ***** Test Step 30 : Verify local schedule programming functionality is enabled at the thermostat\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0002")) { - NextTest(); - return; - } - err = TestVerifyLocalScheduleProgrammingFunctionalityIsEnabledAtTheThermostat_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads the ScheduleProgrammingVisibility attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0002")) { - NextTest(); - return; - } - err = TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_31(); - break; - case 32: - ChipLogProgress( - chipTool, " ***** Test Step 32 : Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0002")) { - NextTest(); - return; - } - err = TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_32(); - break; - case 33: - ChipLogProgress( - chipTool, " ***** Test Step 33 : Verify local schedule programming functionality is disabled at the thermostat\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0002")) { - NextTest(); - return; - } - err = TestVerifyLocalScheduleProgrammingFunctionalityIsDisabledAtTheThermostat_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads the ScheduleProgrammingVisibility attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0002")) { - NextTest(); - return; - } - err = TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_34(); - break; - case 35: - ChipLogProgress(chipTool, - " ***** Test Step 35 : Writes a value of greater than 1 to ScheduleProgrammingVisibility attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0002")) { - NextTest(); - return; - } - err = TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads the ScheduleProgrammingVisibility attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0002")) { - NextTest(); - return; - } - err = TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_36(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 37; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id temperatureDisplayModeArgument; - temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster - writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Writes a value of 0 to TemperatureDisplayMode attribute of DUT Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyDeviceTemperatureDisplayedInc_2() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsTheTemperatureDisplayModeAttributeOfDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("TemperatureDisplayMode", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id temperatureDisplayModeArgument; - temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster - writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Writes a value of 1 to TemperatureDisplayMode attribute of DUT Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyDeviceTemperatureDisplayedInf_5() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsTheTemperatureDisplayModeAttributeOfDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("TemperatureDisplayMode", actualValue, 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id temperatureDisplayModeArgument; - temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of greater than 1 to TemperatureDisplayMode " - @"attribute of DUT Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsTheTemperatureDisplayModeAttributeOfDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("TemperatureDisplayMode", actualValue, 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 0 to KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyAllDeviceFunctionalityAvailableToTheUser_10() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 1 to KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyDeviceOperatesAtLevel1ReducedFunctionality_13() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 2 to KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyDeviceOperatesAtLevel2ReducedFunctionality_16() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:3U]; - [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 3 to KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyDeviceOperatesAtLevel3ReducedFunctionality_19() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 3U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_21() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:4U]; - [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 4 to KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyDeviceOperatesAtLevel4ReducedFunctionality_22() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_23() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 4U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_24() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:5U]; - [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 5 to KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyDeviceOperatesAtLeastFunctionalityLevel_25() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_26() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 5U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_27() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:6U]; - [cluster - writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Writes a value of greater than 5 to KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_28() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("KeypadLockout", actualValue, 5U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_29() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id scheduleProgrammingVisibilityArgument; - scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 0 to ScheduleProgrammingVisibility " - @"attribute of DUT Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyLocalScheduleProgrammingFunctionalityIsEnabledAtTheThermostat_30() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_31() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ScheduleProgrammingVisibility", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_32() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id scheduleProgrammingVisibilityArgument; - scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 1 to ScheduleProgrammingVisibility " - @"attribute of DUT Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyLocalScheduleProgrammingFunctionalityIsDisabledAtTheThermostat_33() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_34() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ScheduleProgrammingVisibility", actualValue, 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_35() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id scheduleProgrammingVisibilityArgument; - scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value of greater than 1 to " - @"ScheduleProgrammingVisibility attribute of DUT Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_36() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ScheduleProgrammingVisibility", actualValue, 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGTHREAD_1_1() - : TestCommandBridge("Test_TC_DGTHREAD_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DGTHREAD_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGTHREAD_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGTHREAD_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); - err = TestThReadsTheClusterRevisionFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - if (ShouldSkip(" !DGTHREAD.S.F00 && !DGTHREAD.S.F01 && !DGTHREAD.S.F02 && !DGTHREAD.S.F03 ")) { - NextTest(); - return; - } - err = TestThReadsTheFeatureMapFromDut_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Given DGTHREAD.S.F00(PKTCNT) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("DGTHREAD.S.F00")) { - NextTest(); - return; - } - err = TestGivenDgthreadsf00pktcntEnsureFeaturemapHasTheCorrectBitSet_3(); - break; - case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Given DGTHREAD.S.F01(ERRCNT) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("DGTHREAD.S.F01")) { - NextTest(); - return; - } - err = TestGivenDgthreadsf01errcntEnsureFeaturemapHasTheCorrectBitSet_4(); - break; - case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : Given DGTHREAD.S.F02(MLECNT) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("DGTHREAD.S.F02")) { - NextTest(); - return; - } - err = TestGivenDgthreadsf02mlecntEnsureFeaturemapHasTheCorrectBitSet_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Given DGTHREAD.S.F03(MACCNT) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("DGTHREAD.S.F03")) { - NextTest(); - return; - } - err = TestGivenDgthreadsf03maccntEnsureFeaturemapHasTheCorrectBitSet_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads mandatory attributes in AttributeList from DUT\n"); - err = TestThReadsMandatoryAttributesInAttributeListFromDut_7(); - break; - case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList\n"); - if (ShouldSkip("DGTHREAD.S.A0006 && DGTHREAD.S.F01")) { - NextTest(); - return; - } - err = TestThReadsFeatureDependentAttributeDGTHREADSF01ERRCNTInAttributeList_8(); - break; - case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : TH reads Feature dependent attribute (DGTHREAD.S.F02(MLECNT)) in attributeList\n"); - if (ShouldSkip("DGTHREAD.S.F02")) { - NextTest(); - return; - } - err = TestThReadsFeatureDependentAttributeDgthreadsf02mlecntInAttributeList_9(); - break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : TH reads Feature dependent attribute (DGTHREAD.S.F03(MACCNT)) in attributeList\n"); - if (ShouldSkip("DGTHREAD.S.F03")) { - NextTest(); - return; - } - err = TestThReadsFeatureDependentAttributeDgthreadsf03maccntInAttributeList_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute (ActiveTimestamp) in AttributeList\n"); - if (ShouldSkip("DGTHREAD.S.A0038")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeActiveTimestampInAttributeList_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read the optional attribute (PendingTimestamp) in AttributeList\n"); - if (ShouldSkip("DGTHREAD.S.A0039")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributePendingTimestampInAttributeList_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional attribute (Delay) in AttributeList\n"); - if (ShouldSkip("DGTHREAD.S.A003a")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeDelayInAttributeList_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads EventList from DUT\n"); - if (ShouldSkip(" !DGTHREAD.S.E00 && !DGTHREAD.S.E01 ")) { - NextTest(); - return; - } - err = TestThReadsEventListFromDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads DGTHREAD.S.E00(ConnectionStatus) event in EventList\n"); - if (ShouldSkip("DGTHREAD.S.E00")) { - NextTest(); - return; - } - err = TestThReadsDGTHREADSE00ConnectionStatusEventInEventList_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads DGTHREAD.S.E01(NetworkFaultChange) event in EventList\n"); - if (ShouldSkip("DGTHREAD.S.E01")) { - NextTest(); - return; - } - err = TestThReadsDGTHREADSE01NetworkFaultChangeEventInEventList_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip(" !DGTHREAD.S.F01 ")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListFromDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("DGTHREAD.S.F01")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListFromDut_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads GeneratedCommandList from DUT\n"); - err = TestThReadsGeneratedCommandListFromDut_19(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenDgthreadsf00pktcntEnsureFeaturemapHasTheCorrectBitSet_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given DGTHREAD.S.F00(PKTCNT) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenDgthreadsf01errcntEnsureFeaturemapHasTheCorrectBitSet_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given DGTHREAD.S.F01(ERRCNT) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenDgthreadsf02mlecntEnsureFeaturemapHasTheCorrectBitSet_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given DGTHREAD.S.F02(MLECNT) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenDgthreadsf03maccntEnsureFeaturemapHasTheCorrectBitSet_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given DGTHREAD.S.F03(MACCNT) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsMandatoryAttributesInAttributeListFromDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads mandatory attributes in AttributeList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 13UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 59UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 60UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 61UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 62UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFeatureDependentAttributeDGTHREADSF01ERRCNTInAttributeList_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFeatureDependentAttributeDgthreadsf02mlecntInAttributeList_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Feature dependent attribute (DGTHREAD.S.F02(MLECNT)) in attributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 21UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFeatureDependentAttributeDgthreadsf03maccntInAttributeList_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Feature dependent attribute (DGTHREAD.S.F03(MACCNT)) in attributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 22UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 24UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 25UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 26UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 27UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 28UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 29UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 30UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 31UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 32UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 33UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 34UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 35UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 36UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 37UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 38UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 39UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 40UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 41UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 42UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 43UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 44UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 45UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 46UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 47UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 48UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 49UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 50UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 51UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 52UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 53UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 54UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 55UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeActiveTimestampInAttributeList_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute (ActiveTimestamp) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 56UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributePendingTimestampInAttributeList_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute (PendingTimestamp) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 57UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeDelayInAttributeList_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute (Delay) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 58UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsEventListFromDut_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsDGTHREADSE00ConnectionStatusEventInEventList_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads DGTHREAD.S.E00(ConnectionStatus) event in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 0UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsDGTHREADSE01NetworkFaultChangeEventInEventList_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads DGTHREAD.S.E01(NetworkFaultChange) event in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsGeneratedCommandListFromDut_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ULABEL_1_1() - : TestCommandBridge("Test_TC_ULABEL_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_ULABEL_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("ULABEL.S.Afffd")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("ULABEL.S.Afffc")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("ULABEL.S.Afffb")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read the global attribute: AttributeList. 1.The list SHALL NOT contain any additional values " - "in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY " - "contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is " - "the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and " - "(0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afffb")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); - break; - case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Read the global attribute: EventList. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is " - "the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afffa")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeEventList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read the global attribute: AcceptedCommandList. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afff9")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read the global attribute: GeneratedCommandList. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afff8")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeGeneratedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - TestReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestReadTheGlobalAttributeEventList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestReadTheGlobalAttributeAcceptedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestReadTheGlobalAttributeGeneratedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; - -class Test_TC_ULABEL_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ULABEL_2_1() - : TestCommandBridge("Test_TC_ULABEL_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_ULABEL_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads LabelList attribute of the DUT\n"); - if (ShouldSkip("ULABEL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsLabelListAttributeOfTheDut_1(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("labelList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_2_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ULABEL_2_2() - : TestCommandBridge("Test_TC_ULABEL_2_2") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_ULABEL_2_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute from the DUT\n"); - if (ShouldSkip("ULABEL.S.A0000")) { - NextTest(); - return; - } - err = TestThWritesLabelListAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads LabelList attribute from the DUT\n"); - if (ShouldSkip("ULABEL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsLabelListAttributeFromTheDut_2(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThWritesLabelListAttributeFromTheDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id labelListArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"roomName"; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"master bedroom 1"; - - temp_0[1] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[1]).label = @"Orientation"; - ((MTRUserLabelClusterLabelStruct *) temp_0[1]).value = @"east"; - - temp_0[2] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[2]).label = @"floor"; - ((MTRUserLabelClusterLabelStruct *) temp_0[2]).value = @"2"; - - temp_0[3] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[3]).label = @"roomType"; - ((MTRUserLabelClusterLabelStruct *) temp_0[3]).value = @"bedroom"; - - labelListArgument = temp_0; - } - [cluster writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsLabelListAttributeFromTheDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads LabelList attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("LabelList", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"roomName")); - VerifyOrReturn( - CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"master bedroom 1")); - VerifyOrReturn( - CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).label, @"Orientation")); - VerifyOrReturn(CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).value, @"east")); - VerifyOrReturn(CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).label, @"floor")); - VerifyOrReturn(CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).value, @"2")); - VerifyOrReturn(CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).label, @"roomType")); - VerifyOrReturn(CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).value, @"bedroom")); - } - - VerifyOrReturn(CheckConstraintType("labelList", "list", "list")); - VerifyOrReturn(CheckConstraintMinLength("labelList", value, 4)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_2_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ULABEL_2_3() - : TestCommandBridge("Test_TC_ULABEL_2_3") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_ULABEL_2_3() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_3\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute of the DUT\n"); - if (ShouldSkip("ULABEL.S.A0000")) { - NextTest(); - return; - } - err = TestThWritesLabelListAttributeOfTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes LabelList attribute of the DUT\n"); - if (ShouldSkip("ULABEL.S.A0000")) { - NextTest(); - return; - } - err = TestThWritesLabelListAttributeOfTheDut_2(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id labelListArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"room"; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"17_bytesIsTooLongforuserlabelnotexpected"; - - labelListArgument = temp_0; - } - [cluster - writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id labelListArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"17_bytesIsTooLongforuserlabelnotexpected"; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"foobar"; - - labelListArgument = temp_0; - } - [cluster - writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_2_4 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ULABEL_2_4() - : TestCommandBridge("Test_TC_ULABEL_2_4") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_ULABEL_2_4() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_4\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_4\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute of the DUT\n"); - if (ShouldSkip("ULABEL.S.A0000")) { - NextTest(); - return; - } - err = TestThWritesLabelListAttributeOfTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads LabelList attribute of the DUT\n"); - if (ShouldSkip("ULABEL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsLabelListAttributeOfTheDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes LabelList attribute of the DUT\n"); - if (ShouldSkip("ULABEL.S.A0000")) { - NextTest(); - return; - } - err = TestThWritesLabelListAttributeOfTheDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads LabelList attribute of the DUT\n"); - if (ShouldSkip("ULABEL.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsLabelListAttributeOfTheDut_4(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id labelListArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"room"; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"bedroom 1"; - - temp_0[1] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[1]).label = @"Orientation"; - ((MTRUserLabelClusterLabelStruct *) temp_0[1]).value = @"east"; - - labelListArgument = temp_0; - } - [cluster writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("LabelList", [actualValue count], static_cast(2))); - VerifyOrReturn(CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"room")); - VerifyOrReturn( - CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"bedroom 1")); - VerifyOrReturn( - CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).label, @"Orientation")); - VerifyOrReturn(CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).value, @"east")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id labelListArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @""; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @""; - - labelListArgument = temp_0; - } - [cluster writeAttributeLabelListWithValue:labelListArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("LabelList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValueAsString("Label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"")); - VerifyOrReturn(CheckValueAsString("Value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGWIFI_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGWIFI_1_1() - : TestCommandBridge("Test_TC_DGWIFI_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DGWIFI_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGWIFI_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGWIFI_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); - err = TestThReadsTheClusterRevisionFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("( !DGWIFI.S.F00 && !DGWIFI.S.F01 )")) { - NextTest(); - return; - } - err = TestThReadsTheFeatureMapFromDut_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Given DGWIFI.S.F00(PacketCounts) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("DGWIFI.S.F00")) { - NextTest(); - return; - } - err = TestGivenDGWIFISF00PacketCountsEnsureFeaturemapHasTheCorrectBitSet_3(); - break; - case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Given DGWIFI.S.F01(ErrorCounts) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("DGWIFI.S.F01")) { - NextTest(); - return; - } - err = TestGivenDGWIFISF01ErrorCountsEnsureFeaturemapHasTheCorrectBitSet_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads AttributeList from DUT\n"); - err = TestThReadsAttributeListFromDut_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT\n"); - if (ShouldSkip("DGWIFI.S.F00")) { - NextTest(); - return; - } - err = TestThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_6(); - break; - case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT\n"); - if (ShouldSkip("DGWIFI.S.F01")) { - NextTest(); - return; - } - err = TestThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_7(); - break; - case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT\n"); - if (ShouldSkip("DGWIFI.S.A000b")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip(" !DGWIFI.S.F01 ")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT\n"); - if (ShouldSkip("DGWIFI.S.F01")) { - NextTest(); - return; - } - err = TestThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads GeneratedCommandList from DUT\n"); - err = TestThReadsGeneratedCommandListFromDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads EventList from DUT\n"); - if (ShouldSkip(" !DGWIFI.S.E00 && !DGWIFI.S.E01 && !DGWIFI.S.E02 ")) { - NextTest(); - return; - } - err = TestThReadsEventListFromDut_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads optional attribute (Disconnection) in EventList from DUT\n"); - if (ShouldSkip("DGWIFI.S.E00")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeDisconnectionInEventListFromDut_13(); - break; - case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : TH reads optional attribute (AssociationFailure) in EventList from DUT\n"); - if (ShouldSkip("DGWIFI.S.E01")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeAssociationFailureInEventListFromDut_14(); - break; - case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : TH reads optional attribute (ConnectionStatus) in EventList from DUT\n"); - if (ShouldSkip("DGWIFI.S.E02")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeConnectionStatusInEventListFromDut_15(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenDGWIFISF00PacketCountsEnsureFeaturemapHasTheCorrectBitSet_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given DGWIFI.S.F00(PacketCounts) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenDGWIFISF01ErrorCountsEnsureFeaturemapHasTheCorrectBitSet_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given DGWIFI.S.F01(ErrorCounts) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsAttributeListFromDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AttributeList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsGeneratedCommandListFromDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsEventListFromDut_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeDisconnectionInEventListFromDut_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute (Disconnection) in EventList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 0UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeAssociationFailureInEventListFromDut_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute (AssociationFailure) in EventList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeConnectionStatusInEventListFromDut_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute (ConnectionStatus) in EventList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 2UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGWIFI_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGWIFI_2_1() - : TestCommandBridge("Test_TC_DGWIFI_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DGWIFI_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGWIFI_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGWIFI_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads BSSID attribute from DUT\n"); - if (ShouldSkip("DGWIFI.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsBssidAttributeFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads SecurityType attribute constraints\n"); - if (ShouldSkip("DGWIFI.S.A0001")) { - NextTest(); - return; - } - err = TestReadsSecurityTypeAttributeConstraints_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads WiFiVersion attribute constraints\n"); - if (ShouldSkip("DGWIFI.S.A0002")) { - NextTest(); - return; - } - err = TestReadsWiFiVersionAttributeConstraints_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads ChannelNumber attribute constraints\n"); - if (ShouldSkip("DGWIFI.S.A0003")) { - NextTest(); - return; - } - err = TestReadsChannelNumberAttributeConstraints_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads RSSI attribute constraints\n"); - if (ShouldSkip("DGWIFI.S.A0004")) { - NextTest(); - return; - } - err = TestReadsRssiAttributeConstraints_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads BeaconLostCount attribute constraints\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A0005")) { - NextTest(); - return; - } - err = TestReadsBeaconLostCountAttributeConstraints_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads BeaconRxCount attribute constraints\n"); - if (ShouldSkip("DGWIFI.S.A0006")) { - NextTest(); - return; - } - err = TestReadsBeaconRxCountAttributeConstraints_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads PacketMulticastRxCount attribute constraints\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A0007")) { - NextTest(); - return; - } - err = TestReadsPacketMulticastRxCountAttributeConstraints_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads PacketMulticastTxCount attribute constraints\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A0008")) { - NextTest(); - return; - } - err = TestReadsPacketMulticastTxCountAttributeConstraints_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads PacketUnicastRxCount attribute constraints\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A0009")) { - NextTest(); - return; - } - err = TestReadsPacketUnicastRxCountAttributeConstraints_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads PacketUnicastTxCount attribute constraints\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A000a")) { - NextTest(); - return; - } - err = TestReadsPacketUnicastTxCountAttributeConstraints_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads CurrentMaxRate attribute constraints\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A000b")) { - NextTest(); - return; - } - err = TestReadsCurrentMaxRateAttributeConstraints_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads OverrunCount attribute constraints\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A000c")) { - NextTest(); - return; - } - err = TestReadsOverrunCountAttributeConstraints_13(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsBssidAttributeFromDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBSSIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads BSSID attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("bssid", "octet_string", "octet_string")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsSecurityTypeAttributeConstraints_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSecurityTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads SecurityType attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("securityType", "enum8", "enum8")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsWiFiVersionAttributeConstraints_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeWiFiVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads WiFiVersion attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("wiFiVersion", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("wiFiVersion", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("wiFiVersion", [value unsignedCharValue], 5U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsChannelNumberAttributeConstraints_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeChannelNumberWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads ChannelNumber attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("channelNumber", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("channelNumber", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("channelNumber", [value unsignedShortValue], 65535U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsRssiAttributeConstraints_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeRSSIWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads RSSI attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("rssi", "int8s", "int8s")); - VerifyOrReturn(CheckConstraintMinValue("rssi", [value charValue], -120)); - VerifyOrReturn(CheckConstraintMaxValue("rssi", [value charValue], 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBeaconLostCountAttributeConstraints_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads BeaconLostCount attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("beaconLostCount", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("beaconLostCount", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("beaconLostCount", [value unsignedIntValue], 4294967295UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBeaconRxCountAttributeConstraints_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads BeaconRxCount attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("beaconRxCount", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("beaconRxCount", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("beaconRxCount", [value unsignedIntValue], 4294967295UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsPacketMulticastRxCountAttributeConstraints_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads PacketMulticastRxCount attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("packetMulticastRxCount", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("packetMulticastRxCount", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("packetMulticastRxCount", [value unsignedIntValue], 4294967295UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsPacketMulticastTxCountAttributeConstraints_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads PacketMulticastTxCount attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("packetMulticastTxCount", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("packetMulticastTxCount", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("packetMulticastTxCount", [value unsignedIntValue], 4294967295UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsPacketUnicastRxCountAttributeConstraints_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads PacketUnicastRxCount attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("packetUnicastRxCount", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("packetUnicastRxCount", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("packetUnicastRxCount", [value unsignedIntValue], 4294967295UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsPacketUnicastTxCountAttributeConstraints_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads PacketUnicastTxCount attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("packetUnicastTxCount", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("packetUnicastTxCount", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("packetUnicastTxCount", [value unsignedIntValue], 4294967295UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsCurrentMaxRateAttributeConstraints_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentMaxRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentMaxRate attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentMaxRate", "int64u", "int64u")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOverrunCountAttributeConstraints_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OverrunCount attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("overrunCount", "int64u", "int64u")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGWIFI_2_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGWIFI_2_3() - : TestCommandBridge("Test_TC_DGWIFI_2_3") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DGWIFI_2_3() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGWIFI_2_3\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGWIFI_2_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends ResetCounts command to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsResetCountsCommandToDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads BeaconLostCount attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0005")) { - NextTest(); - return; - } - err = TestReadsBeaconLostCountAttributeFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads BeaconRxCount attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0006")) { - NextTest(); - return; - } - err = TestReadsBeaconRxCountAttributeFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads PacketMulticastRxCount attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0007")) { - NextTest(); - return; - } - err = TestReadsPacketMulticastRxCountAttributeFromDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads PacketMulticastTxCount attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0008")) { - NextTest(); - return; - } - err = TestReadsPacketMulticastTxCountAttributeFromDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads PacketUnicastRxCount attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0009")) { - NextTest(); - return; - } - err = TestReadsPacketUnicastRxCountAttributeFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads PacketUnicastTxCount attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A000a")) { - NextTest(); - return; - } - err = TestReadsPacketUnicastTxCountAttributeFromDut_7(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThSendsResetCountsCommandToDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster resetCountsWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends ResetCounts command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBeaconLostCountAttributeFromDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads BeaconLostCount attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("beaconLostCount", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("beaconLostCount", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("beaconLostCount", [value unsignedIntValue], 4294967295UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBeaconRxCountAttributeFromDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads BeaconRxCount attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("beaconRxCount", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("beaconRxCount", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("beaconRxCount", [value unsignedIntValue], 4294967295UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsPacketMulticastRxCountAttributeFromDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads PacketMulticastRxCount attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("packetMulticastRxCount", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("packetMulticastRxCount", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("packetMulticastRxCount", [value unsignedIntValue], 4294967295UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsPacketMulticastTxCountAttributeFromDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads PacketMulticastTxCount attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("packetMulticastTxCount", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("packetMulticastTxCount", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("packetMulticastTxCount", [value unsignedIntValue], 4294967295UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsPacketUnicastRxCountAttributeFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads PacketUnicastRxCount attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("packetUnicastRxCount", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("packetUnicastRxCount", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("packetUnicastRxCount", [value unsignedIntValue], 4294967295UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsPacketUnicastTxCountAttributeFromDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads PacketUnicastTxCount attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("packetUnicastTxCount", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("packetUnicastTxCount", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("packetUnicastTxCount", [value unsignedIntValue], 4294967295UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_1_1() - : TestCommandBridge("Test_TC_WNCV_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the (0xFFFD) ClusterRevision attribute\n"); - if (ShouldSkip("WNCV.S.Afffd")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutThe0xFFFDClusterRevisionAttribute_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the (0xFFFC) FeatureMap attribute\n"); - if (ShouldSkip(" WNCV.S.Afffc && !WNCV.S.F00 && !WNCV.S.F01 && !WNCV.S.F02 && !WNCV.S.F03 && !WNCV.S.F04 ")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutThe0xFFFCFeatureMapAttribute_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given WNCV.S.F00(LF) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("WNCV.S.F00")) { - NextTest(); - return; - } - err = TestGivenWncvsf00lfEnsureFeaturemapHasTheCorrectBitSet_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Given WNCV.S.F01(TL) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("WNCV.S.F01")) { - NextTest(); - return; - } - err = TestGivenWncvsf01tlEnsureFeaturemapHasTheCorrectBitSet_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Given WNCV.S.F02(PA_LF) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("WNCV.S.F02")) { - NextTest(); - return; - } - err = TestGivenWncvsf02paLfEnsureFeaturemapHasTheCorrectBitSet_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Given WNCV.S.F03(ABS) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("WNCV.S.F03")) { - NextTest(); - return; - } - err = TestGivenWncvsf03absEnsureFeaturemapHasTheCorrectBitSet_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Given WNCV.S.F04(PA_TL) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("WNCV.S.F04")) { - NextTest(); - return; - } - err = TestGivenWncvsf04paTlEnsureFeaturemapHasTheCorrectBitSet_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the (0xFFFB) AttributeList attribute\n"); - if (ShouldSkip("WNCV.S.Afffb")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutThe0xFFFBAttributeListAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads optional attribute(SafetyStatus) in AttributeList\n"); - if (ShouldSkip("WNCV.S.Afffb && WNCV.S.A001a")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeSafetyStatusInAttributeList_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 & WNCV.S.F03) attribute in " - "AttributeList\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.F03 && WNCV.S.Afffb")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentWNCVSF00Wncvsf02Wncvsf03AttributeInAttributeList_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.Afffb")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentWNCVSF00Wncvsf02AttributeInAttributeList_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in " - "AttributeList\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 && WNCV.S.Afffb")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentWNCVSF01Wncvsf04Wncvsf03AttributeInAttributeList_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.Afffb")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentWNCVSF01Wncvsf04AttributeInAttributeList_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: EventList\n"); - err = TestReadTheGlobalAttributeEventList_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute\n"); - if (ShouldSkip("WNCV.S.Afff9")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_15(); - break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in AcceptedCommandList\n"); - if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F00 && WNCV.S.F02")) { - NextTest(); - return; - } - err = TestThReadsFeatureDependentWNCVSF00Wncvsf02CommandInAcceptedCommandList_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in AcceptedCommandList\n"); - if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F03")) { - NextTest(); - return; - } - err = TestThReadsFeatureDependentWNCVSF01Wncvsf03CommandInAcceptedCommandList_17(); - break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in AcceptedCommandList\n"); - if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F04")) { - NextTest(); - return; - } - err = TestThReadsFeatureDependentWNCVSF01Wncvsf04CommandInAcceptedCommandList_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute\n"); - if (ShouldSkip("WNCV.S.Afff8")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutThe0xFFF8GeneratedCommandListAttribute_19(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsFromTheDutThe0xFFFDClusterRevisionAttribute_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the (0xFFFD) ClusterRevision attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("clusterRevision", [value unsignedShortValue], 5U)); - VerifyOrReturn(CheckConstraintMaxValue("clusterRevision", [value unsignedShortValue], 200U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutThe0xFFFCFeatureMapAttribute_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the (0xFFFC) FeatureMap attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenWncvsf00lfEnsureFeaturemapHasTheCorrectBitSet_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given WNCV.S.F00(LF) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenWncvsf01tlEnsureFeaturemapHasTheCorrectBitSet_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given WNCV.S.F01(TL) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenWncvsf02paLfEnsureFeaturemapHasTheCorrectBitSet_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given WNCV.S.F02(PA_LF) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenWncvsf03absEnsureFeaturemapHasTheCorrectBitSet_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given WNCV.S.F03(ABS) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenWncvsf04paTlEnsureFeaturemapHasTheCorrectBitSet_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given WNCV.S.F04(PA_TL) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutThe0xFFFBAttributeListAttribute_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the (0xFFFB) AttributeList attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 13UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeSafetyStatusInAttributeList_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(SafetyStatus) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 26UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentWNCVSF00Wncvsf02Wncvsf03AttributeInAttributeList_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 & WNCV.S.F03) attribute in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentWNCVSF00Wncvsf02AttributeInAttributeList_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentWNCVSF01Wncvsf04Wncvsf03AttributeInAttributeList_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheFeatureDependentWNCVSF01Wncvsf04AttributeInAttributeList_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFeatureDependentWNCVSF00Wncvsf02CommandInAcceptedCommandList_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFeatureDependentWNCVSF01Wncvsf03CommandInAcceptedCommandList_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFeatureDependentWNCVSF01Wncvsf04CommandInAcceptedCommandList_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutThe0xFFF8GeneratedCommandListAttribute_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_2_1() - : TestCommandBridge("Test_TC_WNCV_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : 1a: read the RO mandatory attribute default: Type\n"); - if (ShouldSkip("WNCV.S.A0000")) { - NextTest(); - return; - } - err = Test1aReadTheRoMandatoryAttributeDefaultType_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: read the RO mandatory attribute default: ConfigStatus\n"); - if (ShouldSkip("WNCV.S.A0007")) { - NextTest(); - return; - } - err = Test1bReadTheRoMandatoryAttributeDefaultConfigStatus_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : 1c: read the RO mandatory attribute default: OperationalStatus\n"); - if (ShouldSkip("WNCV.S.A000a")) { - NextTest(); - return; - } - err = Test1cReadTheRoMandatoryAttributeDefaultOperationalStatus_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : 1d: read the RO mandatory attribute default: EndProductType\n"); - if (ShouldSkip("WNCV.S.A000d")) { - NextTest(); - return; - } - err = Test1dReadTheRoMandatoryAttributeDefaultEndProductType_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : 1e: read the RW mandatory attribute default: Mode\n"); - if (ShouldSkip("WNCV.S.A0017")) { - NextTest(); - return; - } - err = Test1eReadTheRwMandatoryAttributeDefaultMode_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : 1f: write a value into the RW mandatory attribute:: Mode\n"); - if (ShouldSkip("WNCV.S.A0017")) { - NextTest(); - return; - } - err = Test1fWriteAValueIntoTheRwMandatoryAttributeMode_6(); - break; - case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : 2a: read the RO optional attribute default: TargetPositionLiftPercent100ths\n"); - if (ShouldSkip("WNCV.S.A000b")) { - NextTest(); - return; - } - err = Test2aReadTheRoOptionalAttributeDefaultTargetPositionLiftPercent100ths_7(); - break; - case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : 2b: read the RO optional attribute default: TargetPositionTiltPercent100ths\n"); - if (ShouldSkip("WNCV.S.A000c")) { - NextTest(); - return; - } - err = Test2bReadTheRoOptionalAttributeDefaultTargetPositionTiltPercent100ths_8(); - break; - case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : 2c: read the RO optional attribute default: CurrentPositionLiftPercent100ths\n"); - if (ShouldSkip("WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test2cReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercent100ths_9(); - break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : 2d: read the RO optional attribute default: CurrentPositionTiltPercent100ths\n"); - if (ShouldSkip("WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test2dReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercent100ths_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : 2e: read the RO optional attribute default: InstalledOpenLimitLift\n"); - if (ShouldSkip("WNCV.S.A0010")) { - NextTest(); - return; - } - err = Test2eReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_11(); - break; - case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : 2f: read the RO optional attribute default: InstalledClosedLimitLift\n"); - if (ShouldSkip("WNCV.S.A0011")) { - NextTest(); - return; - } - err = Test2fReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : 2g: read the RO optional attribute default: InstalledOpenLimitTilt\n"); - if (ShouldSkip("WNCV.S.A0012")) { - NextTest(); - return; - } - err = Test2gReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_13(); - break; - case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : 2h: read the RO optional attribute default: InstalledClosedLimitTilt\n"); - if (ShouldSkip("WNCV.S.A0013")) { - NextTest(); - return; - } - err = Test2hReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : 3a: read the RO mandatory attribute default: SafetyStatus\n"); - if (ShouldSkip("WNCV.S.A001a")) { - NextTest(); - return; - } - err = Test3aReadTheRoMandatoryAttributeDefaultSafetyStatus_15(); - break; - case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : 3b: read the RO optional attribute default: PhysicalClosedLimitLift\n"); - if (ShouldSkip("WNCV.S.A0001")) { - NextTest(); - return; - } - err = Test3bReadTheRoOptionalAttributeDefaultPhysicalClosedLimitLift_16(); - break; - case 17: - ChipLogProgress( - chipTool, " ***** Test Step 17 : 3c: read the RO optional attribute default: PhysicalClosedLimitTilt\n"); - if (ShouldSkip("WNCV.S.A0002")) { - NextTest(); - return; - } - err = Test3cReadTheRoOptionalAttributeDefaultPhysicalClosedLimitTilt_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : 3d: read the RO optional attribute default: CurrentPositionLift\n"); - if (ShouldSkip("WNCV.S.A0003 && !WNCV.S.A0010 && !WNCV.S.A0011")) { - NextTest(); - return; - } - err = Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : 3d: read the RO optional attribute default: CurrentPositionLift\n"); - if (ShouldSkip("WNCV.S.A0003 && WNCV.S.A0010 && WNCV.S.A0011")) { - NextTest(); - return; - } - err = Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : 3e: read the RO optional attribute default: CurrentPositionTilt\n"); - if (ShouldSkip("WNCV.S.A0004 && !WNCV.S.A0012 && !WNCV.S.A0013")) { - NextTest(); - return; - } - err = Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : 3e: read the RO optional attribute default: CurrentPositionTilt\n"); - if (ShouldSkip("WNCV.S.A0004 && WNCV.S.A0012 && WNCV.S.A0013")) { - NextTest(); - return; - } - err = Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : 3f: read the RO optional attribute default: NumberOfActuationsLift\n"); - if (ShouldSkip("WNCV.S.A0005")) { - NextTest(); - return; - } - err = Test3fReadTheRoOptionalAttributeDefaultNumberOfActuationsLift_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : 3g: read the RO optional attribute default: NumberOfActuationsTilt\n"); - if (ShouldSkip("WNCV.S.A0006")) { - NextTest(); - return; - } - err = Test3gReadTheRoOptionalAttributeDefaultNumberOfActuationsTilt_23(); - break; - case 24: - ChipLogProgress( - chipTool, " ***** Test Step 24 : 3h: read the RO optional attribute default: CurrentPositionLiftPercentage\n"); - if (ShouldSkip("WNCV.S.A0008")) { - NextTest(); - return; - } - err = Test3hReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_24(); - break; - case 25: - ChipLogProgress( - chipTool, " ***** Test Step 25 : 3i:read the RO optional attribute default: CurrentPositionTiltPercentage\n"); - if (ShouldSkip("WNCV.S.A0009")) { - NextTest(); - return; - } - err = Test3ireadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_25(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 26; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR Test1aReadTheRoMandatoryAttributeDefaultType_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1a: read the RO mandatory attribute default: Type Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("type", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("type", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("type", [value unsignedCharValue], 9U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1bReadTheRoMandatoryAttributeDefaultConfigStatus_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1b: read the RO mandatory attribute default: ConfigStatus Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1cReadTheRoMandatoryAttributeDefaultOperationalStatus_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1c: read the RO mandatory attribute default: OperationalStatus Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 127U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1dReadTheRoMandatoryAttributeDefaultEndProductType_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1d: read the RO mandatory attribute default: EndProductType Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("endProductType", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("endProductType", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("endProductType", [value unsignedCharValue], 23U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1eReadTheRwMandatoryAttributeDefaultMode_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1e: read the RW mandatory attribute default: Mode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("mode", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("mode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("mode", [value unsignedCharValue], 15U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1fWriteAValueIntoTheRwMandatoryAttributeMode_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"1f: write a value into the RW mandatory attribute:: Mode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2aReadTheRoOptionalAttributeDefaultTargetPositionLiftPercent100ths_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2a: read the RO optional attribute default: TargetPositionLiftPercent100ths Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "targetPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "targetPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2bReadTheRoOptionalAttributeDefaultTargetPositionTiltPercent100ths_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2b: read the RO optional attribute default: TargetPositionTiltPercent100ths Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "targetPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "targetPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2cReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercent100ths_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2c: read the RO optional attribute default: CurrentPositionLiftPercent100ths Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2dReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercent100ths_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2d: read the RO optional attribute default: CurrentPositionTiltPercent100ths Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull InstalledOpenLimitLift; - - CHIP_ERROR Test2eReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2e: read the RO optional attribute default: InstalledOpenLimitLift Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitLift", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", [value unsignedShortValue], 65535U)); - { - InstalledOpenLimitLift = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull InstalledClosedLimitLift; - - CHIP_ERROR Test2fReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2f: read the RO optional attribute default: InstalledClosedLimitLift Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitLift", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", [value unsignedShortValue], 65535U)); - { - InstalledClosedLimitLift = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull InstalledOpenLimitTilt; - - CHIP_ERROR Test2gReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2g: read the RO optional attribute default: InstalledOpenLimitTilt Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitTilt", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", [value unsignedShortValue], 65535U)); - { - InstalledOpenLimitTilt = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull InstalledClosedLimitTilt; - - CHIP_ERROR Test2hReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2h: read the RO optional attribute default: InstalledClosedLimitTilt Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitTilt", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", [value unsignedShortValue], 65535U)); - { - InstalledClosedLimitTilt = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aReadTheRoMandatoryAttributeDefaultSafetyStatus_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: read the RO mandatory attribute default: SafetyStatus Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("safetyStatus", "bitmap16", "bitmap16")); - VerifyOrReturn(CheckConstraintMinValue("safetyStatus", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("safetyStatus", [value unsignedShortValue], 2047U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3bReadTheRoOptionalAttributeDefaultPhysicalClosedLimitLift_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: read the RO optional attribute default: PhysicalClosedLimitLift Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("physicalClosedLimitLift", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("physicalClosedLimitLift", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("physicalClosedLimitLift", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3cReadTheRoOptionalAttributeDefaultPhysicalClosedLimitTilt_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: read the RO optional attribute default: PhysicalClosedLimitTilt Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("physicalClosedLimitTilt", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("physicalClosedLimitTilt", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("physicalClosedLimitTilt", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: read the RO optional attribute default: CurrentPositionLift Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionLift", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentPositionLift", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", [value unsignedShortValue], 65535U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: read the RO optional attribute default: CurrentPositionLift Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionLift", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLift", [value unsignedShortValue], InstalledOpenLimitLift)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLift", [value unsignedShortValue], InstalledClosedLimitLift)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3e: read the RO optional attribute default: CurrentPositionTilt Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTilt", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentPositionTilt", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", [value unsignedShortValue], 65535U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_21() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3e: read the RO optional attribute default: CurrentPositionTilt Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTilt", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTilt", [value unsignedShortValue], InstalledOpenLimitTilt)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTilt", [value unsignedShortValue], InstalledClosedLimitTilt)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3fReadTheRoOptionalAttributeDefaultNumberOfActuationsLift_22() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3f: read the RO optional attribute default: NumberOfActuationsLift Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("numberOfActuationsLift", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("numberOfActuationsLift", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("numberOfActuationsLift", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3gReadTheRoOptionalAttributeDefaultNumberOfActuationsTilt_23() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3g: read the RO optional attribute default: NumberOfActuationsTilt Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("numberOfActuationsTilt", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("numberOfActuationsTilt", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("numberOfActuationsTilt", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3hReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_24() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3h: read the RO optional attribute default: CurrentPositionLiftPercentage Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3ireadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_25() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3i:read the RO optional attribute default: CurrentPositionTiltPercentage Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_2_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_2_2() - : TestCommandBridge("Test_TC_WNCV_2_2") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_2_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : Reads ConfigStatus attribute from DUT, if (WNCV.S.F00(LF) & WNCV.S.F02(PA_LF)) value of bit " - "3 must be 1b else 0b\n"); - if (ShouldSkip("WNCV.S.A0007 && WNCV.S.F00 && WNCV.S.F02")) { - NextTest(); - return; - } - err = TestReadsConfigStatusAttributeFromDutIfWncvsf00lfWncvsf02paLfValueOfBit3MustBe1bElse0b_1(); - break; - case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : Reads ConfigStatus attribute from DUT, if (WNCV.S.F00(LF) & WNCV.S.F02(PA_LF)) value of bit " - "3 must be 1b else 0b\n"); - if (ShouldSkip("WNCV.S.A0007 && !WNCV.S.F00 && !WNCV.S.F02")) { - NextTest(); - return; - } - err = TestReadsConfigStatusAttributeFromDutIfWncvsf00lfWncvsf02paLfValueOfBit3MustBe1bElse0b_2(); - break; - case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Reads ConfigStatus attribute from DUT, if (WNCV.S.F01(TL) & WNCV.S.F04(PA_TL)) value of bit " - "4 must be 1b else 0b,\n"); - if (ShouldSkip("WNCV.S.A0007 && WNCV.S.F01 && WNCV.S.F04")) { - NextTest(); - return; - } - err = TestReadsConfigStatusAttributeFromDutIfWncvsf01tlWncvsf04paTlValueOfBit4MustBe1bElse0b_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Reads ConfigStatus attribute from DUT, if (WNCV.S.F01(TL) & WNCV.S.F04(PA_TL)) value of bit " - "4 must be 1b else 0b,\n"); - if (ShouldSkip("WNCV.S.A0007 && !WNCV.S.F01 && !WNCV.S.F04")) { - NextTest(); - return; - } - err = TestReadsConfigStatusAttributeFromDutIfWncvsf01tlWncvsf04paTlValueOfBit4MustBe1bElse0b_4(); - break; - case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : Reads ConfigStatus attribute from DUT, value of bit 0 must be 1b (operational)\n"); - if (ShouldSkip("WNCV.S.A0007")) { - NextTest(); - return; - } - err = TestReadsConfigStatusAttributeFromDutValueOfBit0MustBe1bOperational_5(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadsConfigStatusAttributeFromDutIfWncvsf00lfWncvsf02paLfValueOfBit3MustBe1bElse0b_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads ConfigStatus attribute from DUT, if (WNCV.S.F00(LF) & WNCV.S.F02(PA_LF)) value of bit 3 must be 1b else " - @"0b Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConfigStatusAttributeFromDutIfWncvsf00lfWncvsf02paLfValueOfBit3MustBe1bElse0b_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads ConfigStatus attribute from DUT, if (WNCV.S.F00(LF) & WNCV.S.F02(PA_LF)) value of bit 3 must be 1b else " - @"0b Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConfigStatusAttributeFromDutIfWncvsf01tlWncvsf04paTlValueOfBit4MustBe1bElse0b_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads ConfigStatus attribute from DUT, if (WNCV.S.F01(TL) & WNCV.S.F04(PA_TL)) value of bit 4 must be 1b else " - @"0b, Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConfigStatusAttributeFromDutIfWncvsf01tlWncvsf04paTlValueOfBit4MustBe1bElse0b_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads ConfigStatus attribute from DUT, if (WNCV.S.F01(TL) & WNCV.S.F04(PA_TL)) value of bit 4 must be 1b else " - @"0b, Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConfigStatusAttributeFromDutValueOfBit0MustBe1bOperational_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads ConfigStatus attribute from DUT, value of bit 0 must be 1b (operational) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_2_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_2_3() - : TestCommandBridge("Test_TC_WNCV_2_3") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_2_3() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_3\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : 1a: TH set the Mode Attribute bit0 of the DUT\n"); - if (ShouldSkip("WNCV.S.M.Reversal && WNCV.S.A0017")) { - NextTest(); - return; - } - err = Test1aThSetTheModeAttributeBit0OfTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: TH reads ConfigStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.M.Reversal && WNCV.S.A0007")) { - NextTest(); - return; - } - err = Test1bThReadsConfigStatusAttributeFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : 1c: TH clear the Mode Attribute bit0 of the DUT\n"); - if (ShouldSkip("WNCV.S.M.Reversal && WNCV.S.A0017")) { - NextTest(); - return; - } - err = Test1cThClearTheModeAttributeBit0OfTheDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : 1d: TH reads ConfigStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.M.Reversal && WNCV.S.A0007")) { - NextTest(); - return; - } - err = Test1dThReadsConfigStatusAttributeFromDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : 2a: TH set the Mode Attribute bit1 of the DUT\n"); - if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0017")) { - NextTest(); - return; - } - err = Test2aThSetTheModeAttributeBit1OfTheDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : 2b: TH reads ConfigStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0007")) { - NextTest(); - return; - } - err = Test2bThReadsConfigStatusAttributeFromDut_6(); - break; - case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : 2c: If (ConfigStatus bit0 == 0) TH send DownOrClose command to the DUT\n"); - if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.C01.Rsp")) { - NextTest(); - return; - } - err = Test2cIfConfigStatusBit00ThSendDownOrCloseCommandToTheDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : 2d: TH clear the Mode Attribute bit1 of the DUT\n"); - if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0017")) { - NextTest(); - return; - } - err = Test2dThClearTheModeAttributeBit1OfTheDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : 2e: TH reads ConfigStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0007")) { - NextTest(); - return; - } - err = Test2eThReadsConfigStatusAttributeFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : 2f: TH reads the Mode Attribute from the DUT\n"); - if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0017")) { - NextTest(); - return; - } - err = Test2fThReadsTheModeAttributeFromTheDut_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : 2g: TH send DownOrClose command to the DUT\n"); - if (ShouldSkip("WNCV.S.M.Calibration && WNCV.S.C01.Rsp")) { - NextTest(); - return; - } - err = Test2gThSendDownOrCloseCommandToTheDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : 3a: TH set the Mode Attribute bit2 of the DUT\n"); - if (ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.A0017")) { - NextTest(); - return; - } - err = Test3aThSetTheModeAttributeBit2OfTheDut_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : 3b: TH send DownOrClose command to the DUT\n"); - if (ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.C01.Rsp")) { - NextTest(); - return; - } - err = Test3bThSendDownOrCloseCommandToTheDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : 3c: TH reads ConfigStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.A0007")) { - NextTest(); - return; - } - err = Test3cThReadsConfigStatusAttributeFromDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : 3d: TH clear the Mode Attribute bit2 of the DUT\n"); - if (ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.A0017")) { - NextTest(); - return; - } - err = Test3dThClearTheModeAttributeBit2OfTheDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : 3e: TH send DownOrClose command to the DUT\n"); - if (ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.C01.Rsp")) { - NextTest(); - return; - } - err = Test3eThSendDownOrCloseCommandToTheDut_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : 3f: TH reads ConfigStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.A0007")) { - NextTest(); - return; - } - err = Test3fThReadsConfigStatusAttributeFromDut_17(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_BUSY)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR Test1aThSetTheModeAttributeBit0OfTheDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"1a: TH set the Mode Attribute bit0 of the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1bThReadsConfigStatusAttributeFromDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1b: TH reads ConfigStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 4U)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1cThClearTheModeAttributeBit0OfTheDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"1c: TH clear the Mode Attribute bit0 of the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1dThReadsConfigStatusAttributeFromDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1d: TH reads ConfigStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2aThSetTheModeAttributeBit1OfTheDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"2a: TH set the Mode Attribute bit1 of the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull configStatusValA; - - CHIP_ERROR Test2bThReadsConfigStatusAttributeFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2b: TH reads ConfigStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); - { - configStatusValA = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2cIfConfigStatusBit00ThSendDownOrCloseCommandToTheDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { - NSLog(@"2c: If (ConfigStatus bit0 == 0) TH send DownOrClose command to the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2dThClearTheModeAttributeBit1OfTheDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"2d: TH clear the Mode Attribute bit1 of the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2eThReadsConfigStatusAttributeFromDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2e: TH reads ConfigStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2fThReadsTheModeAttributeFromTheDut_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2f: TH reads the Mode Attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("mode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("mode", [value unsignedCharValue], 127U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2gThSendDownOrCloseCommandToTheDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { - NSLog(@"2g: TH send DownOrClose command to the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThSetTheModeAttributeBit2OfTheDut_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:4U]; - [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"3a: TH set the Mode Attribute bit2 of the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3bThSendDownOrCloseCommandToTheDut_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { - NSLog(@"3b: TH send DownOrClose command to the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_BUSY)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull configStatusValB; - - CHIP_ERROR Test3cThReadsConfigStatusAttributeFromDut_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: TH reads ConfigStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); - { - configStatusValB = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3dThClearTheModeAttributeBit2OfTheDut_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeModeWithValue:modeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"3d: TH clear the Mode Attribute bit2 of the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3eThSendDownOrCloseCommandToTheDut_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { - NSLog(@"3e: TH send DownOrClose command to the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3fThReadsConfigStatusAttributeFromDut_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3f: TH reads ConfigStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_2_5 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_2_5() - : TestCommandBridge("Test_TC_WNCV_2_5") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_2_5() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_5\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_5\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads EndProductType attribute from DUT\n"); - if (ShouldSkip("WNCV.S.A000d")) { - NextTest(); - return; - } - err = TestThReadsEndProductTypeAttributeFromDut_1(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsEndProductTypeAttributeFromDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EndProductType attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("endProductType", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("endProductType", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("endProductType", [value unsignedCharValue], 23U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_3_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_3_1() - : TestCommandBridge("Test_TC_WNCV_3_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_3_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); - err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction\n"); - if (ShouldSkip("WNCV.S.C01.Rsp")) { - NextTest(); - return; - } - err = Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: TH Waits for 10 seconds movement(s) on the device\n"); - err = Test1bThWaitsFor10SecondsMovementsOnTheDevice_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : 1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : 1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { - NextTest(); - return; - } - err = Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4(); - break; - case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : 1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : 1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { - NextTest(); - return; - } - err = Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Report: 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = Test2SubscribeToDutReportsOnOperationalStatusAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : 2a: TH sends UpOrOpen command to DUT\n"); - if (ShouldSkip("WNCV.S.C00.Rsp")) { - NextTest(); - return; - } - err = Test2aThSendsUpOrOpenCommandToDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : 2b: DUT updates its attributes\n"); - err = Test2bDutUpdatesItsAttributes_10(); - break; - case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { - NextTest(); - return; - } - err = Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11(); - break; - case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { - NextTest(); - return; - } - err = Test2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : 2e: TH leave the device moving for 2 seconds\n"); - err = Test2eThLeaveTheDeviceMovingFor2Seconds_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : 3a: TH reads OperationalStatus attribute's bit 0..1\n"); - if (ShouldSkip("WNCV.S.A000a && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = Test3aThReadsOperationalStatusAttributesBit01_14(); - break; - case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))\n"); - if (ShouldSkip("WNCV.S.A000a && WNCV.S.F00 && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15(); - break; - case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))\n"); - if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F00 && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16(); - break; - case 17: - ChipLogProgress( - chipTool, " ***** Test Step 17 : 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))\n"); - if (ShouldSkip("WNCV.S.A000a && WNCV.S.F01 && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17(); - break; - case 18: - ChipLogProgress( - chipTool, " ***** Test Step 18 : 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))\n"); - if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F01 && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : 3a: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = Test3aThReadsOperationalStatusAttributeFromDut_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : 3a2: DUT updates its attributes\n"); - err = Test3a2DutUpdatesItsAttributes_20(); - break; - case 21: - ChipLogProgress( - chipTool, " ***** Test Step 21 : 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21(); - break; - case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { - NextTest(); - return; - } - err = Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23(); - break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { - NextTest(); - return; - } - err = Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : 4a: TH sends a StopMotion command to DUT\n"); - if (ShouldSkip("WNCV.S.C02.Rsp")) { - NextTest(); - return; - } - err = Test4aThSendsAStopMotionCommandToDut_25(); - break; - case 26: - ChipLogProgress( - chipTool, " ***** Test Step 26 : 4b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); - err = Test4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26(); - break; - case 27: - ChipLogProgress( - chipTool, " ***** Test Step 27 : 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion\n"); - if (ShouldSkip("WNCV.S.A000a")) { - NextTest(); - return; - } - err = Test4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : 5a: TH waits for x seconds attributes update on the device\n"); - err = Test5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28(); - break; - case 29: - ChipLogProgress( - chipTool, " ***** Test Step 29 : 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { - NextTest(); - return; - } - err = Test5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29(); - break; - case 30: - ChipLogProgress( - chipTool, " ***** Test Step 30 : 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { - NextTest(); - return; - } - err = Test5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 31; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { - NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1bThWaitsFor10SecondsMovementsOnTheDevice_2() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - bool testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_Test_TC_WNCV_3_1_OperationalStatus_Reported = nil; - - CHIP_ERROR TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - test_Test_TC_WNCV_3_1_OperationalStatus_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Report: 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled = true; - }; - - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2SubscribeToDutReportsOnOperationalStatusAttribute_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - uint16_t minIntervalArgument = 4U; - uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - params.filterByFabric = true; - params.replaceExistingSubscriptions = true; - [cluster subscribeAttributeOperationalStatusWithParams:params - subscriptionEstablished:^{ - VerifyOrReturn( - testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_Test_TC_WNCV_3_1_OperationalStatus_Reported != nil) { - ResponseHandler callback = test_Test_TC_WNCV_3_1_OperationalStatus_Reported; - test_Test_TC_WNCV_3_1_OperationalStatus_Reported = nil; - callback(value, err); - } - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2aThSendsUpOrOpenCommandToDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { - NSLog(@"2a: TH sends UpOrOpen command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2bDutUpdatesItsAttributes_10() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("TargetPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("TargetPositionLiftPercent100ths", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("TargetPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("TargetPositionTiltPercent100ths", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2eThLeaveTheDeviceMovingFor2Seconds_13() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit01_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThReadsOperationalStatusAttributeFromDut_19() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR Test3a2DutUpdatesItsAttributes_20() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test4aThSendsAStopMotionCommandToDut_25() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends a StopMotion command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "targetPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "targetPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "targetPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "targetPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_3_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_3_2() - : TestCommandBridge("Test_TC_WNCV_3_2") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_3_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); - err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : 1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction\n"); - if (ShouldSkip("WNCV.S.C00.Rsp")) { - NextTest(); - return; - } - err = Test1aThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: TH Waits for 10 seconds movement(s) on the device\n"); - err = Test1bThWaitsFor10SecondsMovementsOnTheDevice_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : 1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : 1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { - NextTest(); - return; - } - err = Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4(); - break; - case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : 1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : 1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { - NextTest(); - return; - } - err = Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Report: 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = Test2SubscribeToDutReportsOnOperationalStatusAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : 2a: TH sends DownOrClose command to DUT\n"); - if (ShouldSkip("WNCV.S.C01.Rsp")) { - NextTest(); - return; - } - err = Test2aThSendsDownOrCloseCommandToDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : 2b: DUT updates its attributes\n"); - err = Test2bDutUpdatesItsAttributes_10(); - break; - case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { - NextTest(); - return; - } - err = Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11(); - break; - case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { - NextTest(); - return; - } - err = Test2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : 2e: TH leave the device moving for 2 seconds\n"); - err = Test2eThLeaveTheDeviceMovingFor2Seconds_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : 3a: TH reads OperationalStatus attribute's bit 0..1\n"); - if (ShouldSkip("WNCV.S.A000a && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = Test3aThReadsOperationalStatusAttributesBit01_14(); - break; - case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))\n"); - if (ShouldSkip("WNCV.S.A000a && WNCV.S.F00 && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15(); - break; - case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))\n"); - if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F00 && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16(); - break; - case 17: - ChipLogProgress( - chipTool, " ***** Test Step 17 : 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))\n"); - if (ShouldSkip("WNCV.S.A000a && WNCV.S.F01 && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17(); - break; - case 18: - ChipLogProgress( - chipTool, " ***** Test Step 18 : 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))\n"); - if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F01 && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : 3a: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = Test3aThReadsOperationalStatusAttributeFromDut_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : 3a2: DUT updates its attributes\n"); - err = Test3a2DutUpdatesItsAttributes_20(); - break; - case 21: - ChipLogProgress( - chipTool, " ***** Test Step 21 : 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21(); - break; - case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { - NextTest(); - return; - } - err = Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23(); - break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { - NextTest(); - return; - } - err = Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : 4a: TH sends a StopMotion command to DUT\n"); - if (ShouldSkip("WNCV.S.C02.Rsp")) { - NextTest(); - return; - } - err = Test4aThSendsAStopMotionCommandToDut_25(); - break; - case 26: - ChipLogProgress( - chipTool, " ***** Test Step 26 : 4b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); - err = Test4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26(); - break; - case 27: - ChipLogProgress( - chipTool, " ***** Test Step 27 : 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion\n"); - if (ShouldSkip("WNCV.S.A000a")) { - NextTest(); - return; - } - err = Test4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : 5a: TH waits for x seconds attributes update on the device\n"); - err = Test5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28(); - break; - case 29: - ChipLogProgress( - chipTool, " ***** Test Step 29 : 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { - NextTest(); - return; - } - err = Test5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29(); - break; - case 30: - ChipLogProgress( - chipTool, " ***** Test Step 30 : 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { - NextTest(); - return; - } - err = Test5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 31; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR Test1aThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { - NSLog(@"1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1bThWaitsFor10SecondsMovementsOnTheDevice_2() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - bool testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_Test_TC_WNCV_3_2_OperationalStatus_Reported = nil; - - CHIP_ERROR TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - test_Test_TC_WNCV_3_2_OperationalStatus_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Report: 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled = true; - }; - - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2SubscribeToDutReportsOnOperationalStatusAttribute_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - uint16_t minIntervalArgument = 4U; - uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - params.filterByFabric = true; - params.replaceExistingSubscriptions = true; - [cluster subscribeAttributeOperationalStatusWithParams:params - subscriptionEstablished:^{ - VerifyOrReturn( - testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_Test_TC_WNCV_3_2_OperationalStatus_Reported != nil) { - ResponseHandler callback = test_Test_TC_WNCV_3_2_OperationalStatus_Reported; - test_Test_TC_WNCV_3_2_OperationalStatus_Reported = nil; - callback(value, err); - } - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2aThSendsDownOrCloseCommandToDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { - NSLog(@"2a: TH sends DownOrClose command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2bDutUpdatesItsAttributes_10() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("TargetPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("TargetPositionLiftPercent100ths", actualValue, 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("TargetPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("TargetPositionTiltPercent100ths", actualValue, 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2eThLeaveTheDeviceMovingFor2Seconds_13() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit01_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThReadsOperationalStatusAttributeFromDut_19() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR Test3a2DutUpdatesItsAttributes_20() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test4aThSendsAStopMotionCommandToDut_25() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends a StopMotion command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "targetPositionLiftPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "targetPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "targetPositionTiltPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "targetPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_3_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_3_3() - : TestCommandBridge("Test_TC_WNCV_3_3") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_3_3() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_3\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); - err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction\n"); - if (ShouldSkip("WNCV.S.C01.Rsp")) { - NextTest(); - return; - } - err = Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: TH Waits for 6-8 seconds movement(s) on the device\n"); - err = Test1bThWaitsFor68SecondsMovementsOnTheDevice_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : 1c: TH sends UpOrOpen command to preposition the DUT in the opposite direction\n"); - if (ShouldSkip("WNCV.S.C00.Rsp")) { - NextTest(); - return; - } - err = Test1cThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : 1d: TH Waits for 2 seconds movement(s) on the device\n"); - err = Test1dThWaitsFor2SecondsMovementsOnTheDevice_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : 1e: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.A000a")) { - NextTest(); - return; - } - err = Test1eThReadsOperationalStatusAttributeFromDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : 1d: TH Waits for 2 seconds movement(s) on the device\n"); - err = Test1dThWaitsFor2SecondsMovementsOnTheDevice_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Report: 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = Test2SubscribeToDutReportsOnOperationalStatusAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : 2a: TH sends a StopMotion command to DUT\n"); - if (ShouldSkip("WNCV.S.C02.Rsp")) { - NextTest(); - return; - } - err = Test2aThSendsAStopMotionCommandToDut_9(); - break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : 2b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); - err = Test2bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_10(); - break; - case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : 2c: TH reads OperationalStatus attribute from DUT after a StopMotion\n"); - if (ShouldSkip("WNCV.S.A000a")) { - NextTest(); - return; - } - err = Test2cThReadsOperationalStatusAttributeFromDutAfterAStopMotion_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : 2d: TH waits for 100ms - 3s attributes update on the device\n"); - err = Test2dThWaitsFor100ms3sAttributesUpdateOnTheDevice_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : 2e: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.A000a")) { - NextTest(); - return; - } - err = Test2eThReadsOperationalStatusAttributeFromDut_13(); - break; - case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : 3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_14(); - break; - case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : 3b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute 3c: it Must be equal " - "with CurrentPositionLiftPercent100ths from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test3bIfPaLfThReadsTargetPositionLiftPercent100thsAttribute3cItMustBeEqualWithCurrentPositionLiftPercent100thsFromDut_15(); - break; - case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : 4a: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test4aIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : 4b: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute 4c: it Must be equal " - "with CurrentPositionTiltPercent100ths from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000c && WNCV.S.A000f && PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = Test4bIfPaTlThReadsTargetPositionTiltPercent100thsAttribute4cItMustBeEqualWithCurrentPositionTiltPercent100thsFromDut_17(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { - NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1bThWaitsFor68SecondsMovementsOnTheDevice_2() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 6000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test1cThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { - NSLog(@"1c: TH sends UpOrOpen command to preposition the DUT in the opposite direction Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1dThWaitsFor2SecondsMovementsOnTheDevice_4() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test1eThReadsOperationalStatusAttributeFromDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1e: TH reads OperationalStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintNotValue("operationalStatus", value, 0U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1dThWaitsFor2SecondsMovementsOnTheDevice_6() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs("alpha", value); - } - bool testSendClusterTest_TC_WNCV_3_3_7_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_Test_TC_WNCV_3_3_OperationalStatus_Reported = nil; - - CHIP_ERROR TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - test_Test_TC_WNCV_3_3_OperationalStatus_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Report: 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - testSendClusterTest_TC_WNCV_3_3_7_WaitForReport_Fulfilled = true; - }; - - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2SubscribeToDutReportsOnOperationalStatusAttribute_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - uint16_t minIntervalArgument = 4U; - uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - params.filterByFabric = true; - params.replaceExistingSubscriptions = true; - [cluster subscribeAttributeOperationalStatusWithParams:params - subscriptionEstablished:^{ - VerifyOrReturn( - testSendClusterTest_TC_WNCV_3_3_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_Test_TC_WNCV_3_3_OperationalStatus_Reported != nil) { - ResponseHandler callback = test_Test_TC_WNCV_3_3_OperationalStatus_Reported; - test_Test_TC_WNCV_3_3_OperationalStatus_Reported = nil; - callback(value, err); - } - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2aThSendsAStopMotionCommandToDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { - NSLog(@"2a: TH sends a StopMotion command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_10() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test2cThReadsOperationalStatusAttributeFromDutAfterAStopMotion_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2c: TH reads OperationalStatus attribute from DUT after a StopMotion Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2dThWaitsFor100ms3sAttributesUpdateOnTheDevice_12() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test2eThReadsOperationalStatusAttributeFromDut_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2e: TH reads OperationalStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nullable attrCurrentPositionLift; - - CHIP_ERROR Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); - } - { - attrCurrentPositionLift = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - Test3bIfPaLfThReadsTargetPositionLiftPercent100thsAttribute3cItMustBeEqualWithCurrentPositionLiftPercent100thsFromDut_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute 3c: it Must be equal with " - @"CurrentPositionLiftPercent100ths from DUT Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - if (attrCurrentPositionLift == nil) { - VerifyOrReturn(CheckValueNull("TargetPositionLiftPercent100ths", actualValue)); - } else { - VerifyOrReturn(CheckValueNonNull("TargetPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("TargetPositionLiftPercent100ths", actualValue, attrCurrentPositionLift)); - } - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nullable attrCurrentPositionTilt; - - CHIP_ERROR Test4aIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"4a: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); - } - { - attrCurrentPositionTilt = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - Test4bIfPaTlThReadsTargetPositionTiltPercent100thsAttribute4cItMustBeEqualWithCurrentPositionTiltPercent100thsFromDut_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"4b: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute 4c: it Must be equal with " - @"CurrentPositionTiltPercent100ths from DUT Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - if (attrCurrentPositionTilt == nil) { - VerifyOrReturn(CheckValueNull("TargetPositionTiltPercent100ths", actualValue)); - } else { - VerifyOrReturn(CheckValueNonNull("TargetPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("TargetPositionTiltPercent100ths", actualValue, attrCurrentPositionTilt)); - } - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_3_4 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_3_4() - : TestCommandBridge("Test_TC_WNCV_3_4") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("fastMotionDuration", 0, UINT16_MAX, &mFastMotionDuration); - AddArgument("fullMotionDuration", 0, UINT16_MAX, &mFullMotionDuration); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_3_4() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_4\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_4\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); - err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction\n"); - if (ShouldSkip("WNCV.S.C01.Rsp")) { - NextTest(); - return; - } - err = Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1(); - break; - case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : 1b: TH Waits for fastMotionDuration seconds movement(s) on the device\n"); - err = Test1bThWaitsForFastMotionDurationSecondsMovementsOnTheDevice_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : 2a: TH sends UpOrOpen command to DUT\n"); - if (ShouldSkip("WNCV.S.C00.Rsp")) { - NextTest(); - return; - } - err = Test2aThSendsUpOrOpenCommandToDut_3(); - break; - case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : 2b: TH Waits for fullMotionDuration seconds movement(s) on the device\n"); - err = Test2bThWaitsForFullMotionDurationSecondsMovementsOnTheDevice_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : 2c: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.A000a")) { - NextTest(); - return; - } - err = Test2cThReadsOperationalStatusAttributeFromDut_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : 3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : 3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { - NextTest(); - return; - } - err = Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7(); - break; - case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : 3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : 3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { - NextTest(); - return; - } - err = Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mFastMotionDuration; - chip::Optional mFullMotionDuration; - chip::Optional mTimeout; - - CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { - NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1bThWaitsForFastMotionDurationSecondsMovementsOnTheDevice_2() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test2aThSendsUpOrOpenCommandToDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { - NSLog(@"2a: TH sends UpOrOpen command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2bThWaitsForFullMotionDurationSecondsMovementsOnTheDevice_4() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test2cThReadsOperationalStatusAttributeFromDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2c: TH reads OperationalStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_3_5 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_3_5() - : TestCommandBridge("Test_TC_WNCV_3_5") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("fastMotionDuration", 0, UINT16_MAX, &mFastMotionDuration); - AddArgument("fullMotionDuration", 0, UINT16_MAX, &mFullMotionDuration); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_3_5() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_5\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_5\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); - err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : 1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction\n"); - if (ShouldSkip("WNCV.S.C00.Rsp")) { - NextTest(); - return; - } - err = Test1aThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_1(); - break; - case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : 1b: TH Waits for fastMotionDuration seconds movement(s) on the device\n"); - err = Test1bThWaitsForFastMotionDurationSecondsMovementsOnTheDevice_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : 2a: TH sends DownOrClose command to DUT\n"); - if (ShouldSkip("WNCV.S.C01.Rsp")) { - NextTest(); - return; - } - err = Test2aThSendsDownOrCloseCommandToDut_3(); - break; - case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : 2b: TH Waits for fullMotionDuration seconds movement(s) on the device\n"); - err = Test2bThWaitsForFullMotionDurationSecondsMovementsOnTheDevice_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : 2c: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.A000a")) { - NextTest(); - return; - } - err = Test2cThReadsOperationalStatusAttributeFromDut_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : 3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : 3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { - NextTest(); - return; - } - err = Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7(); - break; - case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : 3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : 3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { - NextTest(); - return; - } - err = Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mFastMotionDuration; - chip::Optional mFullMotionDuration; - chip::Optional mTimeout; - - CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR Test1aThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { - NSLog(@"1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1bThWaitsForFastMotionDurationSecondsMovementsOnTheDevice_2() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test2aThSendsDownOrCloseCommandToDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { - NSLog(@"2a: TH sends DownOrClose command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2bThWaitsForFullMotionDurationSecondsMovementsOnTheDevice_4() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test2cThReadsOperationalStatusAttributeFromDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2c: TH reads OperationalStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 100U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 100U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_4_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_4_1() - : TestCommandBridge("Test_TC_WNCV_4_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("fullMotionDuration", 0, UINT16_MAX, &mFullMotionDuration); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_4_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_4_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_4_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); - err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction\n"); - if (ShouldSkip("WNCV.S.C01.Rsp")) { - NextTest(); - return; - } - err = Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: TH waits for x seconds movement(s) on the DUT\n"); - err = Test1bThWaitsForXSecondsMovementsOnTheDut_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : 1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : 2a: TH sends GoToLiftPercentage command with 25 percent to DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.C05.Rsp")) { - NextTest(); - return; - } - err = Test2aThSendsGoToLiftPercentageCommandWith25PercentToDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : 2b: DUT updates its attributes\n"); - err = Test2bDutUpdatesItsAttributes_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { - NextTest(); - return; - } - err = Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : 3a: TH set a timeout of X minutes for failure\n"); - err = Test3aThSetATimeoutOfXMinutesForFailure_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : 3b: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.A000a")) { - NextTest(); - return; - } - err = Test3bThReadsOperationalStatusAttributeFromDut_8(); - break; - case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : 3c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test3cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : 3d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { - NextTest(); - return; - } - err = Test3dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : 4a: TH sends GoToLiftPercentage command with 75.20 percent to DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.C05.Rsp")) { - NextTest(); - return; - } - err = Test4aThSendsGoToLiftPercentageCommandWith7520PercentToDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : 4b: DUT updates its attributes\n"); - err = Test4bDutUpdatesItsAttributes_12(); - break; - case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : 4c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { - NextTest(); - return; - } - err = Test4cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : 5a: TH waits for x seconds movement(s) on the DUT\n"); - err = Test5aThWaitsForXSecondsMovementsOnTheDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : 5b: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.A000a")) { - NextTest(); - return; - } - err = Test5bThReadsOperationalStatusAttributeFromDut_15(); - break; - case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : 5c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test5cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : 5d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { - NextTest(); - return; - } - err = Test5dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_17(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mFullMotionDuration; - chip::Optional mTimeout; - - CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { - NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1bThWaitsForXSecondsMovementsOnTheDut_2() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - } - VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercent100ths", value, 0U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2aThSendsGoToLiftPercentageCommandWith25PercentToDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; - params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:2500U]; - [cluster goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"2a: TH sends GoToLiftPercentage command with 25 percent to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2bDutUpdatesItsAttributes_5() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("TargetPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("TargetPositionLiftPercent100ths", actualValue, 2500U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThSetATimeoutOfXMinutesForFailure_7() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test3bThReadsOperationalStatusAttributeFromDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: TH reads OperationalStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 2500U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 25U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test4aThSendsGoToLiftPercentageCommandWith7520PercentToDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; - params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:7520U]; - [cluster goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends GoToLiftPercentage command with 75.20 percent to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test4bDutUpdatesItsAttributes_12() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test4cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"4c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("TargetPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("TargetPositionLiftPercent100ths", actualValue, 7520U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test5aThWaitsForXSecondsMovementsOnTheDut_14() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test5bThReadsOperationalStatusAttributeFromDut_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5b: TH reads OperationalStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test5cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 7520U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test5dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 75U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_4_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_4_2() - : TestCommandBridge("Test_TC_WNCV_4_2") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("fullMotionDuration", 0, UINT16_MAX, &mFullMotionDuration); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_4_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_4_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_4_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); - err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction\n"); - if (ShouldSkip("WNCV.S.C01.Rsp")) { - NextTest(); - return; - } - err = Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : 1b: TH waits for x seconds movement(s) on the DUT\n"); - err = Test1bThWaitsForXSecondsMovementsOnTheDut_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : 1c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test1cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : 2a: TH sends GoToTiltPercentage command with 30 percent to DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.C08.Rsp")) { - NextTest(); - return; - } - err = Test2aThSendsGoToTiltPercentageCommandWith30PercentToDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : 2b: DUT updates its attributes\n"); - err = Test2bDutUpdatesItsAttributes_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : 2c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { - NextTest(); - return; - } - err = Test2cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : 3a: TH set a timeout of X minutes for failure\n"); - err = Test3aThSetATimeoutOfXMinutesForFailure_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : 3b: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.A000a")) { - NextTest(); - return; - } - err = Test3bThReadsOperationalStatusAttributeFromDut_8(); - break; - case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : 3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : 3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { - NextTest(); - return; - } - err = Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : 4a: TH sends GoToTiltPercentage command with 60.05 percent to DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.C08.Rsp")) { - NextTest(); - return; - } - err = Test4aThSendsGoToTiltPercentageCommandWith6005PercentToDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : 4b: DUT updates its attributes\n"); - err = Test4bDutUpdatesItsAttributes_12(); - break; - case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : 4c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { - NextTest(); - return; - } - err = Test4cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : 5a: TH waits for x seconds movement(s) on the DUT\n"); - err = Test5aThWaitsForXSecondsMovementsOnTheDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : 5b: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("WNCV.S.A000a")) { - NextTest(); - return; - } - err = Test5bThReadsOperationalStatusAttributeFromDut_15(); - break; - case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : 5c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test5cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : 5d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { - NextTest(); - return; - } - err = Test5dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_17(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mFullMotionDuration; - chip::Optional mTimeout; - - CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { - NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1bThWaitsForXSecondsMovementsOnTheDut_2() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test1cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - } - VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercent100ths", value, 0U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2aThSendsGoToTiltPercentageCommandWith30PercentToDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; - params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:3000U]; - [cluster goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"2a: TH sends GoToTiltPercentage command with 30 percent to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2bDutUpdatesItsAttributes_5() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test2cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("TargetPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("TargetPositionTiltPercent100ths", actualValue, 3000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThSetATimeoutOfXMinutesForFailure_7() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test3bThReadsOperationalStatusAttributeFromDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: TH reads OperationalStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 3000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 30U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test4aThSendsGoToTiltPercentageCommandWith6005PercentToDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; - params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:6005U]; - [cluster goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends GoToTiltPercentage command with 60.05 percent to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test4bDutUpdatesItsAttributes_12() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test4cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"4c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("TargetPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("TargetPositionTiltPercent100ths", actualValue, 6005U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test5aThWaitsForXSecondsMovementsOnTheDut_14() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test5bThReadsOperationalStatusAttributeFromDut_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5b: TH reads OperationalStatus attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test5cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 6005U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test5dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 60U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_4_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_4_3() - : TestCommandBridge("Test_TC_WNCV_4_3") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_4_3() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_4_3\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_4_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); - err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : 1a: If (PA_LF & LF) TH reads CurrentPositionLiftPercent100ths from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test1aIfPaLfLfThReadsCurrentPositionLiftPercent100thsFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : 1b 1c: If (PA_LF & LF) TH reads CurrentPositionLiftPercentage from DUT + assert " - "CurrentPositionLiftPercent100ths/100 equals CurrentPositionLiftPercentage\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test1b1cIfPaLfLfThReadsCurrentPositionLiftPercentageFromDutAssertCurrentPositionLiftPercent100ths100EqualsCurrentPositionLiftPercentage_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : 2b: TH sends GoToLiftPercentage command with BadParam to DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 || WNCV.S.F00 && WNCV.S.C05.Rsp")) { - NextTest(); - return; - } - err = Test2bThSendsGoToLiftPercentageCommandWithBadParamToDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : 3a: TH sends GoToLiftPercentage command with 10001 to DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 || WNCV.S.F00 && WNCV.S.C05.Rsp")) { - NextTest(); - return; - } - err = Test3aThSendsGoToLiftPercentageCommandWith10001ToDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : 4a: TH sends GoToLiftPercentage command with 0xFFFF to DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 || WNCV.S.F00 && WNCV.S.C05.Rsp")) { - NextTest(); - return; - } - err = Test4aThSendsGoToLiftPercentageCommandWith0xFFFFToDut_5(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - NSNumber * _Nullable attrCurrentPositionLiftPercent100ths; - - CHIP_ERROR Test1aIfPaLfLfThReadsCurrentPositionLiftPercent100thsFromDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1a: If (PA_LF & LF) TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); - } - { - attrCurrentPositionLiftPercent100ths = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - Test1b1cIfPaLfLfThReadsCurrentPositionLiftPercentageFromDutAssertCurrentPositionLiftPercent100ths100EqualsCurrentPositionLiftPercentage_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1b 1c: If (PA_LF & LF) TH reads CurrentPositionLiftPercentage from DUT + assert " - @"CurrentPositionLiftPercent100ths/100 equals CurrentPositionLiftPercentage Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, - [attrCurrentPositionLiftPercent100ths unsignedShortValue] / 100U)); - } - if (value != nil) { - - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2bThSendsGoToLiftPercentageCommandWithBadParamToDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; - params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:12288U]; - [cluster goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"2b: TH sends GoToLiftPercentage command with BadParam to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThSendsGoToLiftPercentageCommandWith10001ToDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; - params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:10001U]; - [cluster goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"3a: TH sends GoToLiftPercentage command with 10001 to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test4aThSendsGoToLiftPercentageCommandWith0xFFFFToDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; - params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:65535U]; - [cluster goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends GoToLiftPercentage command with 0xFFFF to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_4_4 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_4_4() - : TestCommandBridge("Test_TC_WNCV_4_4") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_4_4() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_4_4\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_4_4\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : 0: Wait for the commissioned device to be retrieved\n"); - err = Test0WaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : 1a: If (PA_TL & TL) TH reads CurrentPositionTiltPercent100ths from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test1aIfPaTlTlThReadsCurrentPositionTiltPercent100thsFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : 1b 1c: If (PA_LF & LF) TH reads CurrentPositionTiltPercentage from DUT + assert " - "CurrentPositionTiltPercent100ths/100 equals CurrentPositionTiltPercentage\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f && WNCV.S.A0009")) { - NextTest(); - return; - } - err = Test1b1cIfPaLfLfThReadsCurrentPositionTiltPercentageFromDutAssertCurrentPositionTiltPercent100ths100EqualsCurrentPositionTiltPercentage_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : 2b: TH sends GoToTiltPercentage command with BadParam to DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 || WNCV.S.F01 && WNCV.S.C08.Rsp")) { - NextTest(); - return; - } - err = Test2bThSendsGoToTiltPercentageCommandWithBadParamToDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : 3a: TH sends GoToTiltPercentage command with 10001 to DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 || WNCV.S.F01 && WNCV.S.C08.Rsp")) { - NextTest(); - return; - } - err = Test3aThSendsGoToTiltPercentageCommandWith10001ToDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : 4a: TH sends GoToTiltPercentage command with 0xFFFF to DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 || WNCV.S.F01 && WNCV.S.C08.Rsp")) { - NextTest(); - return; - } - err = Test4aThSendsGoToTiltPercentageCommandWith0xFFFFToDut_5(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - NSNumber * _Nullable attrCurrentPositionTiltPercent100ths; - - CHIP_ERROR Test1aIfPaTlTlThReadsCurrentPositionTiltPercent100thsFromDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1a: If (PA_TL & TL) TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); - } - { - attrCurrentPositionTiltPercent100ths = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - Test1b1cIfPaLfLfThReadsCurrentPositionTiltPercentageFromDutAssertCurrentPositionTiltPercent100ths100EqualsCurrentPositionTiltPercentage_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1b 1c: If (PA_LF & LF) TH reads CurrentPositionTiltPercentage from DUT + assert " - @"CurrentPositionTiltPercent100ths/100 equals CurrentPositionTiltPercentage Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, - [attrCurrentPositionTiltPercent100ths unsignedShortValue] / 100U)); - } - if (value != nil) { - - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2bThSendsGoToTiltPercentageCommandWithBadParamToDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; - params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:12288U]; - [cluster goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"2b: TH sends GoToTiltPercentage command with BadParam to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3aThSendsGoToTiltPercentageCommandWith10001ToDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; - params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:10001U]; - [cluster goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"3a: TH sends GoToTiltPercentage command with 10001 to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test4aThSendsGoToTiltPercentageCommandWith0xFFFFToDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; - params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:65535U]; - [cluster goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends GoToTiltPercentage command with 0xFFFF to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_4_5 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WNCV_4_5() - : TestCommandBridge("Test_TC_WNCV_4_5") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_WNCV_4_5() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_4_5\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_4_5\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : 0a: Wait for the commissioned device to be retrieved\n"); - err = Test0aWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : 0b: TH sends UpOrOpen command to preposition the DUT\n"); - err = Test0bThSendsUpOrOpenCommandToPrepositionTheDut_1(); - break; - case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : 1a: If (PA_LF & LF) TH sends GoToLiftPercentage command with 90%% to DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.C05.Rsp")) { - NextTest(); - return; - } - err = Test1aIfPaLfLfThSendsGoToLiftPercentageCommandWith90ToDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : 1b: TH Waits for 100ms-1s\n"); - err = Test1bThWaitsFor100ms1s_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : 1c: TH sends StopMotion command to DUT\n"); - if (ShouldSkip("WNCV.S.C02.Rsp")) { - NextTest(); - return; - } - err = Test1cThSendsStopMotionCommandToDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : 1d: TH Waits for 100ms-1s\n"); - err = Test1dThWaitsFor100ms1s_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : 2a: If (PA_TL & TL) TH sends GoToTiltPercentage command with 90%% to DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.C08.Rsp")) { - NextTest(); - return; - } - err = Test2aIfPaTlTlThSendsGoToTiltPercentageCommandWith90ToDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : 2b: TH Waits for 100ms-1s\n"); - err = Test2bThWaitsFor100ms1s_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : 2c: TH sends StopMotion command to DUT\n"); - if (ShouldSkip("WNCV.S.C02.Rsp")) { - NextTest(); - return; - } - err = Test2cThSendsStopMotionCommandToDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : 2d: TH Waits for 100ms-1s\n"); - err = Test2dThWaitsFor100ms1s_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : 3a: TH reads CurrentPositionLiftPercent100ths from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test3aThReadsCurrentPositionLiftPercent100thsFromDut_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : 3b: TH reads CurrentPositionTiltPercent100ths from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test3bThReadsCurrentPositionTiltPercent100thsFromDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : 3c: reboot/restart the DUT\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = Test3cRebootRestartTheDut_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestRebootTargetDeviceDUT_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : 3d: Wait for the commissioned device to be retrieved\n"); - err = Test3dWaitForTheCommissionedDeviceToBeRetrieved_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : 3e: TH reads CurrentPositionLiftPercent100ths from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { - NextTest(); - return; - } - err = Test3eThReadsCurrentPositionLiftPercent100thsFromDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : 3f: TH reads CurrentPositionTiltPercent100ths from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { - NextTest(); - return; - } - err = Test3fThReadsCurrentPositionTiltPercent100thsFromDut_16(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR Test0aWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR Test0bThSendsUpOrOpenCommandToPrepositionTheDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { - NSLog(@"0b: TH sends UpOrOpen command to preposition the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1aIfPaLfLfThSendsGoToLiftPercentageCommandWith90ToDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; - params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:9000U]; - [cluster - goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"1a: If (PA_LF & LF) TH sends GoToLiftPercentage command with 90%% to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1bThWaitsFor100ms1s_3() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test1cThSendsStopMotionCommandToDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { - NSLog(@"1c: TH sends StopMotion command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test1dThWaitsFor100ms1s_5() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test2aIfPaTlTlThSendsGoToTiltPercentageCommandWith90ToDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; - params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:9000U]; - [cluster - goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"2a: If (PA_TL & TL) TH sends GoToTiltPercentage command with 90%% to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2bThWaitsFor100ms1s_7() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR Test2cThSendsStopMotionCommandToDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { - NSLog(@"2c: TH sends StopMotion command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test2dThWaitsFor100ms1s_9() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs("alpha", value); - } - NSNumber * _Nullable attrCurrentPositionLiftPercent100ths; - - CHIP_ERROR Test3aThReadsCurrentPositionLiftPercent100thsFromDut_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - } - VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercent100ths", value, 0U)); - { - attrCurrentPositionLiftPercent100ths = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nullable attrCurrentPositionTiltPercent100ths; - - CHIP_ERROR Test3bThReadsCurrentPositionTiltPercent100thsFromDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - } - VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercent100ths", value, 0U)); - { - attrCurrentPositionTiltPercent100ths = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3cRebootRestartTheDut_12() - { - - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } - - CHIP_ERROR TestRebootTargetDeviceDUT_13() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR Test3dWaitForTheCommissionedDeviceToBeRetrieved_14() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR Test3eThReadsCurrentPositionLiftPercent100thsFromDut_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3e: TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - if (attrCurrentPositionLiftPercent100ths == nil) { - VerifyOrReturn(CheckValueNull("CurrentPositionLiftPercent100ths", actualValue)); - } else { - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); - VerifyOrReturn( - CheckValue("CurrentPositionLiftPercent100ths", actualValue, attrCurrentPositionLiftPercent100ths)); - } - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3fThReadsCurrentPositionTiltPercent100thsFromDut_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3f: TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - if (attrCurrentPositionTiltPercent100ths == nil) { - VerifyOrReturn(CheckValueNull("CurrentPositionTiltPercent100ths", actualValue)); - } else { - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); - VerifyOrReturn( - CheckValue("CurrentPositionTiltPercent100ths", actualValue, attrCurrentPositionTiltPercent100ths)); - } - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class TV_TargetNavigatorCluster : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TV_TargetNavigatorCluster() - : TestCommandBridge("TV_TargetNavigatorCluster") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~TV_TargetNavigatorCluster() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TV_TargetNavigatorCluster\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TV_TargetNavigatorCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Target Navigator list\n"); - err = TestReadAttributeTargetNavigatorList_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute current navigator target\n"); - err = TestReadAttributeCurrentNavigatorTarget_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Navigate Target Request Command\n"); - err = TestNavigateTargetRequestCommand_3(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadAttributeTargetNavigatorList_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute Target Navigator list Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("TargetList", [actualValue count], static_cast(2))); - VerifyOrReturn( - CheckValue("Identifier", ((MTRTargetNavigatorClusterTargetInfoStruct *) actualValue[0]).identifier, 1U)); - VerifyOrReturn(CheckValueAsString( - "Name", ((MTRTargetNavigatorClusterTargetInfoStruct *) actualValue[0]).name, @"exampleName")); - VerifyOrReturn( - CheckValue("Identifier", ((MTRTargetNavigatorClusterTargetInfoStruct *) actualValue[1]).identifier, 2U)); - VerifyOrReturn(CheckValueAsString( - "Name", ((MTRTargetNavigatorClusterTargetInfoStruct *) actualValue[1]).name, @"exampleName")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeCurrentNavigatorTarget_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute current navigator target Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentTarget", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestNavigateTargetRequestCommand_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; - params.target = [NSNumber numberWithUnsignedChar:1U]; - params.data = @"1"; - [cluster navigateTargetWithParams:params - completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Navigate Target Request Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class TV_AudioOutputCluster : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TV_AudioOutputCluster() - : TestCommandBridge("TV_AudioOutputCluster") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~TV_AudioOutputCluster() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TV_AudioOutputCluster\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TV_AudioOutputCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Audio Output list\n"); - err = TestReadAttributeAudioOutputList_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute current audio output\n"); - err = TestReadAttributeCurrentAudioOutput_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Select Output Command\n"); - err = TestSelectOutputCommand_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Rename Output Command\n"); - err = TestRenameOutputCommand_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute Audio Output list\n"); - err = TestReadAttributeAudioOutputList_5(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadAttributeAudioOutputList_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute Audio Output list Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OutputList", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("Index", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[0]).index, 1U)); - VerifyOrReturn(CheckValue("OutputType", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[0]).outputType, 0U)); - VerifyOrReturn( - CheckValueAsString("Name", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[0]).name, @"HDMI")); - VerifyOrReturn(CheckValue("Index", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[1]).index, 2U)); - VerifyOrReturn(CheckValue("OutputType", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[1]).outputType, 0U)); - VerifyOrReturn( - CheckValueAsString("Name", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[1]).name, @"HDMI")); - VerifyOrReturn(CheckValue("Index", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[2]).index, 3U)); - VerifyOrReturn(CheckValue("OutputType", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[2]).outputType, 0U)); - VerifyOrReturn( - CheckValueAsString("Name", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[2]).name, @"HDMI")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeCurrentAudioOutput_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute current audio output Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentOutput", actualValue, 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSelectOutputCommand_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1U]; - [cluster selectOutputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Select Output Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestRenameOutputCommand_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1U]; - params.name = @"HDMI Test"; - [cluster renameOutputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Rename Output Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeAudioOutputList_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute Audio Output list Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OutputList", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("Index", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[0]).index, 1U)); - VerifyOrReturn(CheckValue("OutputType", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[0]).outputType, 0U)); - VerifyOrReturn( - CheckValueAsString("Name", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[0]).name, @"HDMI Test")); - VerifyOrReturn(CheckValue("Index", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[1]).index, 2U)); - VerifyOrReturn(CheckValue("OutputType", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[1]).outputType, 0U)); - VerifyOrReturn( - CheckValueAsString("Name", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[1]).name, @"HDMI")); - VerifyOrReturn(CheckValue("Index", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[2]).index, 3U)); - VerifyOrReturn(CheckValue("OutputType", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[2]).outputType, 0U)); - VerifyOrReturn( - CheckValueAsString("Name", ((MTRAudioOutputClusterOutputInfoStruct *) actualValue[2]).name, @"HDMI")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class TV_ApplicationLauncherCluster : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TV_ApplicationLauncherCluster() - : TestCommandBridge("TV_ApplicationLauncherCluster") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~TV_ApplicationLauncherCluster() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TV_ApplicationLauncherCluster\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TV_ApplicationLauncherCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Application Launcher list\n"); - err = TestReadAttributeApplicationLauncherList_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute application launcher app\n"); - err = TestReadAttributeApplicationLauncherApp_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Launch App Command\n"); - err = TestLaunchAppCommand_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Stop App Command\n"); - err = TestStopAppCommand_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Hide App Command\n"); - err = TestHideAppCommand_5(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadAttributeApplicationLauncherList_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute Application Launcher list Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("CatalogList", [actualValue count], static_cast(2))); - VerifyOrReturn(CheckValue("", actualValue[0], 123U)); - VerifyOrReturn(CheckValue("", actualValue[1], 456U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeApplicationLauncherApp_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentAppWithCompletion:^( - MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute application launcher app Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNull("CurrentApp", actualValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestLaunchAppCommand_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; - params.application = [[MTRApplicationLauncherClusterApplicationStruct alloc] init]; - ((MTRApplicationLauncherClusterApplicationStruct *) params.application).catalogVendorID = - [NSNumber numberWithUnsignedShort:123U]; - ((MTRApplicationLauncherClusterApplicationStruct *) params.application).applicationID = @"applicationId"; - - params.data = [[NSData alloc] initWithBytes:"data" length:4]; - [cluster - launchAppWithParams:params - completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch App Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn( - CheckValueAsString("Data", actualValue, [[NSData alloc] initWithBytes:"data" length:4])); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStopAppCommand_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; - params.application = [[MTRApplicationLauncherClusterApplicationStruct alloc] init]; - ((MTRApplicationLauncherClusterApplicationStruct *) params.application).catalogVendorID = - [NSNumber numberWithUnsignedShort:123U]; - ((MTRApplicationLauncherClusterApplicationStruct *) params.application).applicationID = @"applicationId"; - - [cluster - stopAppWithParams:params - completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Stop App Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, [[NSData alloc] initWithBytes:"data" length:4])); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestHideAppCommand_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; - params.application = [[MTRApplicationLauncherClusterApplicationStruct alloc] init]; - ((MTRApplicationLauncherClusterApplicationStruct *) params.application).catalogVendorID = - [NSNumber numberWithUnsignedShort:123U]; - ((MTRApplicationLauncherClusterApplicationStruct *) params.application).applicationID = @"applicationId"; - - [cluster - hideAppWithParams:params - completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Hide App Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, [[NSData alloc] initWithBytes:"data" length:4])); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class TV_KeypadInputCluster : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TV_KeypadInputCluster() - : TestCommandBridge("TV_KeypadInputCluster") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~TV_KeypadInputCluster() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TV_KeypadInputCluster\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TV_KeypadInputCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send Key Command\n"); - err = TestSendKeyCommand_1(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestSendKeyCommand_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:3U]; - [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Key Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class TV_AccountLoginCluster : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TV_AccountLoginCluster() - : TestCommandBridge("TV_AccountLoginCluster") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~TV_AccountLoginCluster() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TV_AccountLoginCluster\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TV_AccountLoginCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Get Setup PIN Command\n"); - err = TestGetSetupPinCommand_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Login Command\n"); - err = TestLoginCommand_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Logout Command\n"); - err = TestLogoutCommand_3(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestGetSetupPinCommand_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; - params.tempAccountIdentifier = @"asdf"; - [cluster - getSetupPINWithParams:params - completion:^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Setup PIN Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.setupPIN; - VerifyOrReturn(CheckValueAsString("SetupPIN", actualValue, @"tempPin123")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestLoginCommand_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRAccountLoginClusterLoginParams alloc] init]; - params.tempAccountIdentifier = @"asdf"; - params.setupPIN = @"tempPin123"; - [cluster loginWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Login Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestLogoutCommand_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster logoutWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Logout Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class TV_WakeOnLanCluster : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TV_WakeOnLanCluster() - : TestCommandBridge("TV_WakeOnLanCluster") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~TV_WakeOnLanCluster() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TV_WakeOnLanCluster\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TV_WakeOnLanCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read mac address\n"); - err = TestReadMacAddress_1(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadMacAddress_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read mac address Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinLength("MACAddress", value, 3)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class TV_ApplicationBasicCluster : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TV_ApplicationBasicCluster() - : TestCommandBridge("TV_ApplicationBasicCluster") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~TV_ApplicationBasicCluster() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TV_ApplicationBasicCluster\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TV_ApplicationBasicCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute vendor name\n"); - err = TestReadAttributeVendorName_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute vendor id\n"); - err = TestReadAttributeVendorId_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute application name\n"); - err = TestReadAttributeApplicationName_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute product id\n"); - err = TestReadAttributeProductId_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute application status\n"); - err = TestReadAttributeApplicationStatus_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute application status\n"); - err = TestReadAttributeApplicationStatus_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read attribute application version\n"); - err = TestReadAttributeApplicationVersion_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute application allowed vendor list\n"); - err = TestReadAttributeApplicationAllowedVendorList_8(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadAttributeVendorName_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute vendor name Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("VendorName", actualValue, @"exampleVendorName1")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeVendorId_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute vendor id Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("VendorID", actualValue, 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeApplicationName_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute application name Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("ApplicationName", actualValue, @"exampleName1")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeProductId_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute product id Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ProductID", actualValue, 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeApplicationStatus_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute application status Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeApplicationStatus_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeApplicationWithCompletion:^( - MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute application status Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue( - "CatalogVendorID", ((MTRApplicationBasicClusterApplicationStruct *) actualValue).catalogVendorID, 123U)); - VerifyOrReturn(CheckValueAsString("ApplicationID", - ((MTRApplicationBasicClusterApplicationStruct *) actualValue).applicationID, @"applicationId")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeApplicationVersion_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute application version Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("ApplicationVersion", actualValue, @"exampleVersion")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeApplicationAllowedVendorList_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute application allowed vendor list Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AllowedVendorList", [actualValue count], static_cast(2))); - VerifyOrReturn(CheckValue("", actualValue[0], 1U)); - VerifyOrReturn(CheckValue("", actualValue[1], 456U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class TV_MediaPlaybackCluster : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TV_MediaPlaybackCluster() - : TestCommandBridge("TV_MediaPlaybackCluster") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~TV_MediaPlaybackCluster() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TV_MediaPlaybackCluster\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TV_MediaPlaybackCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute playback state\n"); - err = TestReadAttributePlaybackState_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute start time\n"); - err = TestReadAttributeStartTime_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute duration\n"); - err = TestReadAttributeDuration_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute position\n"); - err = TestReadAttributePosition_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute playback speed\n"); - err = TestReadAttributePlaybackSpeed_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute seek range end\n"); - err = TestReadAttributeSeekRangeEnd_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read attribute seek range start\n"); - err = TestReadAttributeSeekRangeStart_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Media Playback Play Command\n"); - err = TestMediaPlaybackPlayCommand_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Media Playback Pause Command\n"); - err = TestMediaPlaybackPauseCommand_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Media Playback Stop Command\n"); - err = TestMediaPlaybackStopCommand_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Media Playback Start Over Command\n"); - err = TestMediaPlaybackStartOverCommand_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Media Playback Previous Command\n"); - err = TestMediaPlaybackPreviousCommand_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Media Playback Next Command\n"); - err = TestMediaPlaybackNextCommand_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Media Playback Rewind Command\n"); - err = TestMediaPlaybackRewindCommand_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Media Playback Fast Forward Command\n"); - err = TestMediaPlaybackFastForwardCommand_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Media Playback Skip Forward Command\n"); - err = TestMediaPlaybackSkipForwardCommand_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read attribute position after skip forward\n"); - err = TestReadAttributePositionAfterSkipForward_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Media Playback Skip Backward Command\n"); - err = TestMediaPlaybackSkipBackwardCommand_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read attribute position after skip backward\n"); - err = TestReadAttributePositionAfterSkipBackward_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Media Playback Seek Command\n"); - err = TestMediaPlaybackSeekCommand_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read attribute position after seek\n"); - err = TestReadAttributePositionAfterSeek_21(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 22; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadAttributePlaybackState_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute playback state Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeStartTime_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute start time Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("StartTime", actualValue)); - VerifyOrReturn(CheckValue("StartTime", actualValue, 0ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeDuration_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute duration Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("Duration", actualValue)); - VerifyOrReturn(CheckValue("Duration", actualValue, 80000ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributePosition_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute position Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); - VerifyOrReturn( - CheckValue("UpdatedAt", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).updatedAt, 0ULL)); - VerifyOrReturn( - CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); - VerifyOrReturn( - CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 0ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributePlaybackSpeed_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute playback speed Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 0.0f)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeSeekRangeEnd_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute seek range end Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("SeekRangeEnd", actualValue)); - VerifyOrReturn(CheckValue("SeekRangeEnd", actualValue, 80000ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeSeekRangeStart_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute seek range start Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("SeekRangeStart", actualValue)); - VerifyOrReturn(CheckValue("SeekRangeStart", actualValue, 0ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMediaPlaybackPlayCommand_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Play Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMediaPlaybackPauseCommand_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Pause Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMediaPlaybackStopCommand_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster stopWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Stop Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMediaPlaybackStartOverCommand_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - startOverWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Start Over Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMediaPlaybackPreviousCommand_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - previousWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Previous Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMediaPlaybackNextCommand_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster nextWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Next Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMediaPlaybackRewindCommand_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster rewindWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Rewind Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMediaPlaybackFastForwardCommand_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - fastForwardWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Fast Forward Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMediaPlaybackSkipForwardCommand_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; - params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:500ULL]; - [cluster - skipForwardWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Skip Forward Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributePositionAfterSkipForward_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute position after skip forward Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); - VerifyOrReturn( - CheckValue("UpdatedAt", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).updatedAt, 0ULL)); - VerifyOrReturn( - CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); - VerifyOrReturn( - CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 500ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMediaPlaybackSkipBackwardCommand_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; - params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:100ULL]; - [cluster - skipBackwardWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Skip Backward Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributePositionAfterSkipBackward_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute position after skip backward Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); - VerifyOrReturn( - CheckValue("UpdatedAt", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).updatedAt, 0ULL)); - VerifyOrReturn( - CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); - VerifyOrReturn( - CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 400ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMediaPlaybackSeekCommand_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; - params.position = [NSNumber numberWithUnsignedLongLong:1000ULL]; - [cluster seekWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Seek Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributePositionAfterSeek_21() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute position after seek Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); - VerifyOrReturn( - CheckValue("UpdatedAt", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).updatedAt, 0ULL)); - VerifyOrReturn( - CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); - VerifyOrReturn( - CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 1000ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class TV_ChannelCluster : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TV_ChannelCluster() - : TestCommandBridge("TV_ChannelCluster") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~TV_ChannelCluster() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TV_ChannelCluster\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TV_ChannelCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Channel list\n"); - err = TestReadAttributeChannelList_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute channel lineup\n"); - err = TestReadAttributeChannelLineup_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute current channel\n"); - err = TestReadAttributeCurrentChannel_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Change Channel Command\n"); - err = TestChangeChannelCommand_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Change Channel By Number Command\n"); - err = TestChangeChannelByNumberCommand_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Skip Channel Command\n"); - err = TestSkipChannelCommand_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Verify that Skip Channel Command set correct current channel\n"); - err = TestVerifyThatSkipChannelCommandSetCorrectCurrentChannel_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Skip Channel Command\n"); - err = TestSkipChannelCommand_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Verify that Skip Channel Command set correct current channel\n"); - err = TestVerifyThatSkipChannelCommandSetCorrectCurrentChannel_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Test 1.1 - Start from Channel 3\n"); - err = TestTest11StartFromChannel3_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Test 1.2 - Skip Up By 1\n"); - err = TestTest12SkipUpBy1_11(); - break; - case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Test 1.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest13VerifyThatSkipChannelCommandSetCorrectCurrentChannel_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Test 2.1 - Start from Channel 3\n"); - err = TestTest21StartFromChannel3_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Test 2.2 - Skip Up By 2\n"); - err = TestTest22SkipUpBy2_14(); - break; - case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : Test 2.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest23VerifyThatSkipChannelCommandSetCorrectCurrentChannel_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Test 3.1 - Start from Channel 3\n"); - err = TestTest31StartFromChannel3_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Test 3.2 - Skip Up By 3\n"); - err = TestTest32SkipUpBy3_17(); - break; - case 18: - ChipLogProgress( - chipTool, " ***** Test Step 18 : Test 3.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest33VerifyThatSkipChannelCommandSetCorrectCurrentChannel_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Test 4.1 - Start from Channel 3\n"); - err = TestTest41StartFromChannel3_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Test 4.2 - Skip Up By 4\n"); - err = TestTest42SkipUpBy4_20(); - break; - case 21: - ChipLogProgress( - chipTool, " ***** Test Step 21 : Test 4.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest43VerifyThatSkipChannelCommandSetCorrectCurrentChannel_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Test 5.2 - Skip Up By 5\n"); - err = TestTest52SkipUpBy5_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Test 5.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest53VerifyThatSkipChannelCommandSetCorrectCurrentChannel_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Test 6.1 - Start from Channel 3\n"); - err = TestTest61StartFromChannel3_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Test 6.2 - Skip Up By 6\n"); - err = TestTest62SkipUpBy6_25(); - break; - case 26: - ChipLogProgress( - chipTool, " ***** Test Step 26 : Test 6.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest63VerifyThatSkipChannelCommandSetCorrectCurrentChannel_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Test 7.1 - Start from Channel 3\n"); - err = TestTest71StartFromChannel3_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Test 7.2 - Skip Up By 7\n"); - err = TestTest72SkipUpBy7_28(); - break; - case 29: - ChipLogProgress( - chipTool, " ***** Test Step 29 : Test 7.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest73VerifyThatSkipChannelCommandSetCorrectCurrentChannel_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Test 8.1 - Start from Channel 3\n"); - err = TestTest81StartFromChannel3_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Test 8.2 - Skip Up By 8\n"); - err = TestTest82SkipUpBy8_31(); - break; - case 32: - ChipLogProgress( - chipTool, " ***** Test Step 32 : Test 8.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest83VerifyThatSkipChannelCommandSetCorrectCurrentChannel_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Test 1.2 - Skip Down By 1\n"); - err = TestTest12SkipDownBy1_33(); - break; - case 34: - ChipLogProgress( - chipTool, " ***** Test Step 34 : Test 1.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest13VerifyThatSkipChannelCommandSetCorrectCurrentChannel_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Test 2.1 - Start from Channel 3\n"); - err = TestTest21StartFromChannel3_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Test 2.2 - Skip Down By 2\n"); - err = TestTest22SkipDownBy2_36(); - break; - case 37: - ChipLogProgress( - chipTool, " ***** Test Step 37 : Test 2.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest23VerifyThatSkipChannelCommandSetCorrectCurrentChannel_37(); - break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Test 3.1 - Start from Channel 3\n"); - err = TestTest31StartFromChannel3_38(); - break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Test 3.2 - Skip Down By 3\n"); - err = TestTest32SkipDownBy3_39(); - break; - case 40: - ChipLogProgress( - chipTool, " ***** Test Step 40 : Test 3.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest33VerifyThatSkipChannelCommandSetCorrectCurrentChannel_40(); - break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Test 4.1 - Start from Channel 3\n"); - err = TestTest41StartFromChannel3_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Test 4.2 - Skip Down By 4\n"); - err = TestTest42SkipDownBy4_42(); - break; - case 43: - ChipLogProgress( - chipTool, " ***** Test Step 43 : Test 4.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest43VerifyThatSkipChannelCommandSetCorrectCurrentChannel_43(); - break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Test 5.2 - Skip Down By 5\n"); - err = TestTest52SkipDownBy5_44(); - break; - case 45: - ChipLogProgress( - chipTool, " ***** Test Step 45 : Test 5.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest53VerifyThatSkipChannelCommandSetCorrectCurrentChannel_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Test 6.1 - Start from Channel 3\n"); - err = TestTest61StartFromChannel3_46(); - break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Test 6.2 - Skip Down By 6\n"); - err = TestTest62SkipDownBy6_47(); - break; - case 48: - ChipLogProgress( - chipTool, " ***** Test Step 48 : Test 6.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest63VerifyThatSkipChannelCommandSetCorrectCurrentChannel_48(); - break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Test 7.1 - Start from Channel 3\n"); - err = TestTest71StartFromChannel3_49(); - break; - case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Test 7.2 - Skip Down By 7\n"); - err = TestTest72SkipDownBy7_50(); - break; - case 51: - ChipLogProgress( - chipTool, " ***** Test Step 51 : Test 7.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest73VerifyThatSkipChannelCommandSetCorrectCurrentChannel_51(); - break; - case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Test 8.1 - Start from Channel 3\n"); - err = TestTest81StartFromChannel3_52(); - break; - case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : Test 8.2 - Skip Down By 8\n"); - err = TestTest82SkipDownBy8_53(); - break; - case 54: - ChipLogProgress( - chipTool, " ***** Test Step 54 : Test 8.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest83VerifyThatSkipChannelCommandSetCorrectCurrentChannel_54(); - break; - case 55: - ChipLogProgress(chipTool, " ***** Test Step 55 : Test 1.2 - Skip Up By 32,767\n"); - err = TestTest12SkipUpBy32767_55(); - break; - case 56: - ChipLogProgress( - chipTool, " ***** Test Step 56 : Test 1.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest13VerifyThatSkipChannelCommandSetCorrectCurrentChannel_56(); - break; - case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : Test 1.1 - Start from Channel 3\n"); - err = TestTest11StartFromChannel3_57(); - break; - case 58: - ChipLogProgress(chipTool, " ***** Test Step 58 : Test 1.2 - Skip Down By 32,768\n"); - err = TestTest12SkipDownBy32768_58(); - break; - case 59: - ChipLogProgress( - chipTool, " ***** Test Step 59 : Test 1.3 - Verify that Skip Channel Command set correct current channel\n"); - err = TestTest13VerifyThatSkipChannelCommandSetCorrectCurrentChannel_59(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 60; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadAttributeChannelList_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute Channel list Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ChannelList", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[0]).majorNumber, 6U)); - VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[0]).minorNumber, 0U)); - VerifyOrReturn(CheckValueAsString("Name", ((MTRChannelClusterChannelInfoStruct *) actualValue[0]).name, @"ABC")); - VerifyOrReturn( - CheckValueAsString("CallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[0]).callSign, @"KAAL-TV")); - VerifyOrReturn(CheckValueAsString( - "AffiliateCallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[0]).affiliateCallSign, @"KAAL")); - VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[1]).majorNumber, 9U)); - VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[1]).minorNumber, 1U)); - VerifyOrReturn(CheckValueAsString("Name", ((MTRChannelClusterChannelInfoStruct *) actualValue[1]).name, @"PBS")); - VerifyOrReturn( - CheckValueAsString("CallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[1]).callSign, @"KCTS-TV")); - VerifyOrReturn(CheckValueAsString( - "AffiliateCallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[1]).affiliateCallSign, @"KCTS")); - VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[2]).majorNumber, 9U)); - VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[2]).minorNumber, 2U)); - VerifyOrReturn( - CheckValueAsString("Name", ((MTRChannelClusterChannelInfoStruct *) actualValue[2]).name, @"PBS Kids")); - VerifyOrReturn( - CheckValueAsString("CallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[2]).callSign, @"KCTS-TV")); - VerifyOrReturn(CheckValueAsString( - "AffiliateCallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[2]).affiliateCallSign, @"KCTS")); - VerifyOrReturn(CheckValue("MajorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[3]).majorNumber, 9U)); - VerifyOrReturn(CheckValue("MinorNumber", ((MTRChannelClusterChannelInfoStruct *) actualValue[3]).minorNumber, 3U)); - VerifyOrReturn( - CheckValueAsString("Name", ((MTRChannelClusterChannelInfoStruct *) actualValue[3]).name, @"World Channel")); - VerifyOrReturn( - CheckValueAsString("CallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[3]).callSign, @"KCTS-TV")); - VerifyOrReturn(CheckValueAsString( - "AffiliateCallSign", ((MTRChannelClusterChannelInfoStruct *) actualValue[3]).affiliateCallSign, @"KCTS")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeChannelLineup_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute channel lineup Error: %@", err); + [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute channel lineup Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -138586,16 +121159,16 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestThReadsEventListFromDut_10(); - break; + NextTest(); + return; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads EventList from DUT\n"); if (ShouldSkip(" !DGSW.S.E00 && DGSW.S.Afffa ")) { NextTest(); return; } - err = TestThReadsEventListFromDut_11(); - break; + NextTest(); + return; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer " @@ -138946,55 +121519,6 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsEventListFromDut_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 0UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsEventListFromDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR TestThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() { @@ -153051,24 +135575,24 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { break; case 34: ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads EventList from DUT\n"); - err = TestThReadsEventListFromDut_34(); - break; + NextTest(); + return; case 35: ChipLogProgress(chipTool, " ***** Test Step 35 : TH reads optional event(Door position sensor) in EventList\n"); if (ShouldSkip("DRLK.S.F05")) { NextTest(); return; } - err = TestThReadsOptionalEventDoorPositionSensorInEventList_35(); - break; + NextTest(); + return; case 36: ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads optional event(User commands and database) in EventList\n"); if (ShouldSkip("DRLK.S.F08")) { NextTest(); return; } - err = TestThReadsOptionalEventUserCommandsAndDatabaseInEventList_36(); - break; + NextTest(); + return; case 37: ChipLogProgress(chipTool, " ***** Test Step 37 : TH reads AcceptedCommandList from DUT\n"); err = TestThReadsAcceptedCommandListFromDut_37(); @@ -154039,71 +136563,6 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEventListFromDut_34() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("eventList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalEventDoorPositionSensorInEventList_35() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional event(Door position sensor) in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalEventUserCommandsAndDatabaseInEventList_36() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional event(User commands and database) in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 4UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_37() { @@ -156759,720 +139218,56 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("AutoRelockTime", actualValue, 60UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithValidPINCodeAndVerifyThatDutSendsSuccessResponseToTheTh_33() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; - [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with valid PINCode and Verify that DUT sends " - @"SUCCESS response to the TH Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWaitForAutoRelockTimeExpires_34() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestWaitForAutoRelockTimeExpires_35() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 60000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsLockStateAttribute_36() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads LockState attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LockState", actualValue)); - VerifyOrReturn(CheckValue("LockState", actualValue, 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCleanupTheCreatedUser_37() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCleanTheCreatedCredential_38() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clean the created credential Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DRLK_2_4 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DRLK_2_4() - : TestCommandBridge("Test_TC_DRLK_2_4") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DRLK_2_4() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DRLK_2_4\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DRLK_2_4\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Create new user\n"); - err = TestCreateNewUser_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the user back and verify its fields\n"); - err = TestReadTheUserBackAndVerifyItsFields_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Create new PIN credential and lock/unlock user\n"); - err = TestCreateNewPinCredentialAndLockUnlockUser_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Verify created PIN credential\n"); - err = TestVerifyCreatedPinCredential_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH writes AutoRelockTime attribute value as 10 seconds on the DUT\n"); - if (ShouldSkip("DRLK.S.A0023.Write && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThWritesAutoRelockTimeAttributeValueAs10SecondsOnTheDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH writes AutoRelockTime attribute value as 60 seconds on the DUT\n"); - if (ShouldSkip("DRLK.S.A0023.Write && PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH writes AutoRelockTime attribute value as 10 seconds on the DUT\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY && !DRLK.S.A0023.Write")) { - NextTest(); - return; - } - err = TestThWritesAutoRelockTimeAttributeValueAs10SecondsOnTheDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH writes AutoRelockTime attribute value as 60 seconds on the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && !DRLK.S.A0023.Write")) { - NextTest(); - return; - } - err = TestThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends the Unlock with Timeout argument value as 10 seconds\n"); - if (ShouldSkip("DRLK.S.C03.Rsp && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThSendsTheUnlockWithTimeoutArgumentValueAs10Seconds_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends the Unlock with Timeout argument value as 60 seconds\n"); - if (ShouldSkip("DRLK.S.C03.Rsp && PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsTheUnlockWithTimeoutArgumentValueAs60Seconds_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Wait for AutoRelockTime Expires\n"); - if (ShouldSkip("DRLK.S.C03.Rsp && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestWaitForAutoRelockTimeExpires_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait for AutoRelockTime Expires\n"); - if (ShouldSkip("DRLK.S.C03.Rsp && PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestWaitForAutoRelockTimeExpires_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads LockState attribute\n"); - if (ShouldSkip("DRLK.S.A0000 && DRLK.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestThReadsLockStateAttribute_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Cleanup the created user\n"); - err = TestCleanupTheCreatedUser_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Clean the created credential\n"); - if (ShouldSkip("DRLK.S.C26.Rsp")) { - NextTest(); - return; - } - err = TestCleanTheCreatedCredential_15(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestCreateNewUser_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.userName = @"xxx"; - params.userUniqueID = [NSNumber numberWithUnsignedInt:6452UL]; - params.userStatus = [NSNumber numberWithUnsignedChar:1U]; - params.userType = [NSNumber numberWithUnsignedChar:0U]; - params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; - [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create new user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheUserBackAndVerifyItsFields_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("UserName", actualValue)); - VerifyOrReturn(CheckValueAsString("UserName", actualValue, @"xxx")); - } - - { - id actualValue = values.userUniqueID; - VerifyOrReturn(CheckValueNonNull("UserUniqueID", actualValue)); - VerifyOrReturn(CheckValue("UserUniqueID", actualValue, 6452UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("UserStatus", actualValue)); - VerifyOrReturn(CheckValue("UserStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("UserType", actualValue)); - VerifyOrReturn(CheckValue("UserType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("CredentialRule", actualValue)); - VerifyOrReturn(CheckValue("CredentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNonNull("Credentials", actualValue)); - VerifyOrReturn(CheckValue("Credentials", [actualValue count], static_cast(0))); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("NextUserIndex", actualValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCreateNewPinCredentialAndLockUnlockUser_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0U]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.userStatus = nil; - params.userType = nil; - [cluster - setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); - } - - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("NextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("NextCredentialIndex", actualValue, 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyCreatedPinCredential_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created PIN credential Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs10SecondsOnTheDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id autoRelockTimeArgument; - autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:10UL]; - [cluster - writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes AutoRelockTime attribute value as 10 seconds on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id autoRelockTimeArgument; - autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; - [cluster - writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs10SecondsOnTheDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id autoRelockTimeArgument; - autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:10UL]; - [cluster - writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes AutoRelockTime attribute value as 10 seconds on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id autoRelockTimeArgument; - autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; - [cluster - writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsTheUnlockWithTimeoutArgumentValueAs10Seconds_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; - params.timeout = [NSNumber numberWithUnsignedShort:10U]; - params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; - [cluster unlockWithTimeoutWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the Unlock with Timeout argument value as 10 seconds Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id actualValue = value; + VerifyOrReturn(CheckValue("AutoRelockTime", actualValue, 60UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsTheUnlockWithTimeoutArgumentValueAs60Seconds_10() + CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithValidPINCodeAndVerifyThatDutSendsSuccessResponseToTheTh_33() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; - params.timeout = [NSNumber numberWithUnsignedShort:60U]; + __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; - [cluster unlockWithTimeoutWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends the Unlock with Timeout argument value as 60 seconds Error: %@", err); + [cluster unlockDoorWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the unlock Door command to the DUT with valid PINCode and Verify that DUT sends " + @"SUCCESS response to the TH Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWaitForAutoRelockTimeExpires_11() + CHIP_ERROR TestWaitForAutoRelockTimeExpires_34() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 11000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestWaitForAutoRelockTimeExpires_12() + CHIP_ERROR TestWaitForAutoRelockTimeExpires_35() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 70000UL; + value.ms = 60000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsLockStateAttribute_13() + CHIP_ERROR TestThReadsLockStateAttribute_36() { MTRBaseDevice * device = GetDevice("alpha"); @@ -157496,7 +139291,7 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedUser_14() + CHIP_ERROR TestCleanupTheCreatedUser_37() { MTRBaseDevice * device = GetDevice("alpha"); @@ -157517,7 +139312,7 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanTheCreatedCredential_15() + CHIP_ERROR TestCleanTheCreatedCredential_38() { MTRBaseDevice * device = GetDevice("alpha"); @@ -157542,11 +139337,11 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { } }; -class Test_TC_DRLK_2_5 : public TestCommandBridge { +class Test_TC_DRLK_2_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DRLK_2_5() - : TestCommandBridge("Test_TC_DRLK_2_5") + Test_TC_DRLK_2_4() + : TestCommandBridge("Test_TC_DRLK_2_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -157556,7 +139351,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DRLK_2_5() {} + ~Test_TC_DRLK_2_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -157564,11 +139359,11 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DRLK_2_5\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DRLK_2_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DRLK_2_5\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DRLK_2_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -157593,72 +139388,96 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { err = TestReadTheUserBackAndVerifyItsFields_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute\n"); - if (ShouldSkip("DRLK.S.F04 && DRLK.S.A0014")) { - NextTest(); - return; - } - err = TestThReadsNumberOfWeekDaySchedulesSupportedPerUserAttribute_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Create new PIN credential and lock/unlock user\n"); + err = TestCreateNewPinCredentialAndLockUnlockUser_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads NumberOfTotalUsers Supported attribute\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.A0011")) { - NextTest(); - return; - } - err = TestThReadsNumberOfTotalUsersSupportedAttribute_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Verify created PIN credential\n"); + err = TestVerifyCreatedPinCredential_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH send Set Week Day Schedule Command\n"); - if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0b.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH writes AutoRelockTime attribute value as 10 seconds on the DUT\n"); + if (ShouldSkip("DRLK.S.A0023.Write && PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestThSendSetWeekDayScheduleCommand_5(); + err = TestThWritesAutoRelockTimeAttributeValueAs10SecondsOnTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH send Get Week Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH writes AutoRelockTime attribute value as 60 seconds on the DUT\n"); + if (ShouldSkip("DRLK.S.A0023.Write && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendGetWeekDayScheduleCommandToDut_6(); + err = TestThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH send Set Week Day Schedule Command\n"); - if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0b.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH writes AutoRelockTime attribute value as 10 seconds on the DUT\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY && !DRLK.S.A0023.Write")) { NextTest(); return; } - err = TestThSendSetWeekDayScheduleCommand_7(); + err = TestThWritesAutoRelockTimeAttributeValueAs10SecondsOnTheDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH send Get Week Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH writes AutoRelockTime attribute value as 60 seconds on the DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && !DRLK.S.A0023.Write")) { NextTest(); return; } - err = TestThSendGetWeekDayScheduleCommandToDut_8(); + err = TestThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Clear Week Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0d.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends the Unlock with Timeout argument value as 10 seconds\n"); + if (ShouldSkip("DRLK.S.C03.Rsp && PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestThSendsClearWeekDayScheduleCommandToDut_9(); + err = TestThSendsTheUnlockWithTimeoutArgumentValueAs10Seconds_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Get Week Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends the Unlock with Timeout argument value as 60 seconds\n"); + if (ShouldSkip("DRLK.S.C03.Rsp && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsGetWeekDayScheduleCommandToDut_10(); + err = TestThSendsTheUnlockWithTimeoutArgumentValueAs60Seconds_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Cleanup the created user\n"); - err = TestCleanupTheCreatedUser_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Wait for AutoRelockTime Expires\n"); + if (ShouldSkip("DRLK.S.C03.Rsp && PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestWaitForAutoRelockTimeExpires_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait for AutoRelockTime Expires\n"); + if (ShouldSkip("DRLK.S.C03.Rsp && PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestWaitForAutoRelockTimeExpires_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads LockState attribute\n"); + if (ShouldSkip("DRLK.S.A0000 && DRLK.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestThReadsLockStateAttribute_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Cleanup the created user\n"); + err = TestCleanupTheCreatedUser_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Clean the created credential\n"); + if (ShouldSkip("DRLK.S.C26.Rsp")) { + NextTest(); + return; + } + err = TestCleanTheCreatedCredential_15(); break; } @@ -157693,10 +139512,10 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -157707,6 +139526,18 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -157720,7 +139551,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -157840,799 +139671,341 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull NumberOfWeekDaySchedulesSupportedPerUser; - - CHIP_ERROR TestThReadsNumberOfWeekDaySchedulesSupportedPerUserAttribute_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn( - CheckConstraintMinValue("numberOfWeekDaySchedulesSupportedPerUser", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("numberOfWeekDaySchedulesSupportedPerUser", [value unsignedCharValue], 255U)); - { - NumberOfWeekDaySchedulesSupportedPerUser = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull NumberOfTotalUsersSupported; - - CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAttribute_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads NumberOfTotalUsers Supported attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("numberOfTotalUsersSupported", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("numberOfTotalUsersSupported", [value unsignedShortValue], 65534U)); - { - NumberOfTotalUsersSupported = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR TestThSendSetWeekDayScheduleCommand_5() + CHIP_ERROR TestCreateNewPinCredentialAndLockUnlockUser_3() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:2U]; - params.startHour = [NSNumber numberWithUnsignedChar:15U]; - params.startMinute = [NSNumber numberWithUnsignedChar:45U]; - params.endHour = [NSNumber numberWithUnsignedChar:16U]; - params.endMinute = [NSNumber numberWithUnsignedChar:55U]; - [cluster setWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH send Set Week Day Schedule Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendGetWeekDayScheduleCommandToDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.userStatus = nil; + params.userType = nil; [cluster - getWeekDayScheduleWithParams:params - completion:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("WeekDayIndex", actualValue, 1U)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("DaysMask", actualValue, 2U)); - } - - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("StartHour", actualValue, 15U)); - } - - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("StartMinute", actualValue, 45U)); - } - - VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, true)); - if (values.endHour != nil) { - - VerifyOrReturn( - CheckConstraintMinValue("endHour", [values.endHour unsignedCharValue], 16U)); - } - - VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, true)); - if (values.endMinute != nil) { - - VerifyOrReturn( - CheckConstraintMinValue("endMinute", [values.endMinute unsignedCharValue], 55U)); - } - - NextTest(); - }]; + setCredentialWithParams:params + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); - return CHIP_NO_ERROR; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestThSendSetWeekDayScheduleCommand_7() - { + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); + } - __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:7U]; - params.startHour = [NSNumber numberWithUnsignedChar:15U]; - params.startMinute = [NSNumber numberWithUnsignedChar:45U]; - params.endHour = [NSNumber numberWithUnsignedChar:16U]; - params.endMinute = [NSNumber numberWithUnsignedChar:55U]; - [cluster setWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH send Set Week Day Schedule Command Error: %@", err); + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("NextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("NextCredentialIndex", actualValue, 2U)); + } - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendGetWeekDayScheduleCommandToDut_8() + CHIP_ERROR TestVerifyCreatedPinCredential_4() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("WeekDayIndex", actualValue, 0U)); - } + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created PIN credential Error: %@", err); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 133U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); - if (values.daysMask != nil) { - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); + } - VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); - if (values.startHour != nil) { - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + } - VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); - if (values.startMinute != nil) { - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); + } - VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); - if (values.endHour != nil) { - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); + } - VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); - if (values.endMinute != nil) { - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearWeekDayScheduleCommandToDut_9() + CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs10SecondsOnTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Week Day Schedule Command to DUT Error: %@", err); + id autoRelockTimeArgument; + autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:10UL]; + [cluster + writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes AutoRelockTime attribute value as 10 seconds on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetWeekDayScheduleCommandToDut_10() + CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_6() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Week Day Schedule Command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("WeekDayIndex", actualValue, 1U)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 139U)); - } - - VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); - if (values.daysMask != nil) { - } - - VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); - if (values.startHour != nil) { - } - - VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); - if (values.startMinute != nil) { - } - - VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); - if (values.endHour != nil) { - } + id autoRelockTimeArgument; + autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; + [cluster + writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); - VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); - if (values.endMinute != nil) { - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedUser_11() + CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs10SecondsOnTheDut_7() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id autoRelockTimeArgument; + autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:10UL]; + [cluster + writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes AutoRelockTime attribute value as 10 seconds on the DUT Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } -}; - -class Test_TC_DRLK_2_6 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DRLK_2_6() - : TestCommandBridge("Test_TC_DRLK_2_6") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DRLK_2_6() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DRLK_2_6\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DRLK_2_6\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for commissionee\n"); - err = TestWaitForCommissionee_0(); - break; - case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : TH reads NumberOfHoliday SchedulesSupported and saves for future use.\n"); - if (ShouldSkip("DRLK.S.F0b && DRLK.S.A0016")) { - NextTest(); - return; - } - err = TestThReadsNumberOfHolidaySchedulesSupportedAndSavesForFutureUse_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Create Holiday schedule with 1 index\n"); - if (ShouldSkip("DRLK.S.F0b && DRLK.S.C11.Rsp")) { - NextTest(); - return; - } - err = TestCreateHolidayScheduleWith1Index_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Get Holiday Schedule with HolidayIndex as 1\n"); - if (ShouldSkip("DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx")) { - NextTest(); - return; - } - err = TestGetHolidayScheduleWithHolidayIndexAs1_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Create Holiday schedule with invalid operating mode\n"); - if (ShouldSkip("DRLK.S.C11.Rsp")) { - NextTest(); - return; - } - err = TestCreateHolidayScheduleWithInvalidOperatingMode_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Get Holiday Schedule with Invalid HolidayIndex 15.\n"); - if (ShouldSkip("DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx")) { - NextTest(); - return; - } - err = TestGetHolidayScheduleWithInvalidHolidayIndex15_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Get Holiday Schedule with the Non-scheduled HolidayIndex\n"); - if (ShouldSkip("DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx")) { - NextTest(); - return; - } - err = TestGetHolidayScheduleWithTheNonScheduledHolidayIndex_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Clear Holiday schedule with 1 index\n"); - if (ShouldSkip("DRLK.S.F0b && DRLK.S.C13.Rsp")) { - NextTest(); - return; - } - err = TestClearHolidayScheduleWith1Index_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Make sure that holiday schedule was deleted\n"); - if (ShouldSkip("DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx")) { - NextTest(); - return; - } - err = TestMakeSureThatHolidayScheduleWasDeleted_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Cleanup the created user\n"); - err = TestCleanupTheCreatedUser_9(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForCommissionee_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - NSNumber * _Nonnull NumberOfHolidaySchedulesSupported; - CHIP_ERROR TestThReadsNumberOfHolidaySchedulesSupportedAndSavesForFutureUse_1() + CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_8() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads NumberOfHoliday SchedulesSupported and saves for future use. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("numberOfHolidaySchedulesSupported", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("numberOfHolidaySchedulesSupported", [value unsignedCharValue], 255U)); - { - NumberOfHolidaySchedulesSupported = value; - } + id autoRelockTimeArgument; + autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; + [cluster + writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateHolidayScheduleWith1Index_2() + CHIP_ERROR TestThSendsTheUnlockWithTimeoutArgumentValueAs10Seconds_9() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; - params.localStartTime = [NSNumber numberWithUnsignedInt:20UL]; - params.localEndTime = [NSNumber numberWithUnsignedInt:30UL]; - params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; - [cluster setHolidayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create Holiday schedule with 1 index Error: %@", err); + __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; + params.timeout = [NSNumber numberWithUnsignedShort:10U]; + params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; + [cluster unlockWithTimeoutWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the Unlock with Timeout argument value as 10 seconds Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGetHolidayScheduleWithHolidayIndexAs1_3() + CHIP_ERROR TestThSendsTheUnlockWithTimeoutArgumentValueAs60Seconds_10() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; - [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Holiday Schedule with HolidayIndex as 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("HolidayIndex", actualValue, 1U)); - } - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("LocalStartTime", actualValue, 20UL)); - } - - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("LocalEndTime", actualValue, 30UL)); - } - - if (values.localEndTime != nil) { - - VerifyOrReturn(CheckConstraintMinValue( - "localEndTime", [values.localEndTime unsignedIntValue], 21UL)); - } + __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; + params.timeout = [NSNumber numberWithUnsignedShort:60U]; + params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; + [cluster unlockWithTimeoutWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the Unlock with Timeout argument value as 60 seconds Error: %@", err); - { - id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("OperatingMode", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateHolidayScheduleWithInvalidOperatingMode_4() + CHIP_ERROR TestWaitForAutoRelockTimeExpires_11() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; - params.localStartTime = [NSNumber numberWithUnsignedInt:20UL]; - params.localEndTime = [NSNumber numberWithUnsignedInt:30UL]; - params.operatingMode = [NSNumber numberWithUnsignedChar:5U]; - [cluster setHolidayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create Holiday schedule with invalid operating mode Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 11000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestGetHolidayScheduleWithInvalidHolidayIndex15_5() + CHIP_ERROR TestWaitForAutoRelockTimeExpires_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:15U]; - [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Holiday Schedule with Invalid HolidayIndex 15. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("HolidayIndex", actualValue, 15U)); - } - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 133U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 70000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestGetHolidayScheduleWithTheNonScheduledHolidayIndex_6() + CHIP_ERROR TestThReadsLockStateAttribute_13() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:10U]; - [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Get Holiday Schedule with the Non-scheduled HolidayIndex Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads LockState attribute Error: %@", err); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("HolidayIndex", actualValue, 10U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 139U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LockState", actualValue)); + VerifyOrReturn(CheckValue("LockState", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestClearHolidayScheduleWith1Index_7() + CHIP_ERROR TestCleanupTheCreatedUser_14() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; - [cluster clearHolidayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear Holiday schedule with 1 index Error: %@", err); + __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster clearUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Cleanup the created user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestMakeSureThatHolidayScheduleWasDeleted_8() + CHIP_ERROR TestCleanTheCreatedCredential_15() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; - [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Make sure that holiday schedule was deleted Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("HolidayIndex", actualValue, 1U)); - } - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 139U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCleanupTheCreatedUser_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user Error: %@", err); + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clean the created credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_DRLK_2_7 : public TestCommandBridge { +class Test_TC_DRLK_2_5 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DRLK_2_7() - : TestCommandBridge("Test_TC_DRLK_2_7") + Test_TC_DRLK_2_5() + : TestCommandBridge("Test_TC_DRLK_2_5") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -158642,7 +140015,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DRLK_2_7() {} + ~Test_TC_DRLK_2_5() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -158650,11 +140023,11 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DRLK_2_7\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DRLK_2_5\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DRLK_2_7\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DRLK_2_5\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -158677,122 +140050,74 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the user back and verify its fields\n"); err = TestReadTheUserBackAndVerifyItsFields_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads NumberOfYearDay SchedulesSupportedPerUser attribute\n"); - if (ShouldSkip("DRLK.S.F0a && DRLK.S.A0015")) { - NextTest(); - return; - } - err = TestThReadsNumberOfYearDaySchedulesSupportedPerUserAttribute_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads NumberOfTotalUsers Supported attribute\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.A0011")) { - NextTest(); - return; - } - err = TestThReadsNumberOfTotalUsersSupportedAttribute_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Set Year Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0e.Rsp")) { - NextTest(); - return; - } - err = TestThSendsSetYearDayScheduleCommandToDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Get Year Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { - NextTest(); - return; - } - err = TestThSendsGetYearDayScheduleCommandToDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH send Set Year Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.C0e.Rsp")) { - NextTest(); - return; - } - err = TestThSendSetYearDayScheduleCommandToDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Get Year Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.A0014")) { NextTest(); return; } - err = TestThSendsGetYearDayScheduleCommandToDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Create a user with userIndex as 5\n"); - err = TestCreateAUserWithUserIndexAs5_9(); + err = TestThReadsNumberOfWeekDaySchedulesSupportedPerUserAttribute_3(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Get Year Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads NumberOfTotalUsers Supported attribute\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.A0011")) { NextTest(); return; } - err = TestThSendsGetYearDayScheduleCommandToDut_10(); + err = TestThReadsNumberOfTotalUsersSupportedAttribute_4(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Clear Year Day Schedule to DUT\n"); - if (ShouldSkip("DRLK.S.C10.Rsp")) { + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH send Set Week Day Schedule Command\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0b.Rsp")) { NextTest(); return; } - err = TestThSendsClearYearDayScheduleToDut_11(); + err = TestThSendSetWeekDayScheduleCommand_5(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Get Year Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx && DRLK.S.C10.Rsp")) { + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH send Get Week Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { NextTest(); return; } - err = TestThSendsGetYearDayScheduleCommandToDut_12(); + err = TestThSendGetWeekDayScheduleCommandToDut_6(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends Set Year Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.C0e.Rsp")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH send Set Week Day Schedule Command\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0b.Rsp")) { NextTest(); return; } - err = TestThSendsSetYearDayScheduleCommandToDut_13(); + err = TestThSendSetWeekDayScheduleCommand_7(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Get Year Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH send Get Week Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { NextTest(); return; } - err = TestThSendsGetYearDayScheduleCommandToDut_14(); + err = TestThSendGetWeekDayScheduleCommandToDut_8(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Clear Year Day Schedule to DUT\n"); - if (ShouldSkip("DRLK.S.F0a && DRLK.S.C10.Rsp")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Clear Week Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0d.Rsp")) { NextTest(); return; } - err = TestThSendsClearYearDayScheduleToDut_15(); + err = TestThSendsClearWeekDayScheduleCommandToDut_9(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Clear a year day schedule for the first user\n"); - if (ShouldSkip("DRLK.S.F0a && DRLK.S.C10.Rsp")) { + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Get Week Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { NextTest(); return; } - err = TestClearAYearDayScheduleForTheFirstUser_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Cleanup the created user with UserIndex 1\n"); - err = TestCleanupTheCreatedUserWithUserIndex1_17(); + err = TestThSendsGetWeekDayScheduleCommandToDut_10(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Cleanup the created user with UserIndex 5\n"); - err = TestCleanupTheCreatedUserWithUserIndex5_18(); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Cleanup the created user\n"); + err = TestCleanupTheCreatedUser_11(); break; } @@ -158841,27 +140166,6 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -158875,7 +140179,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -158995,27 +140299,27 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull NumberOfYearDaySchedulesSupportedPerUser; + NSNumber * _Nonnull NumberOfWeekDaySchedulesSupportedPerUser; - CHIP_ERROR TestThReadsNumberOfYearDaySchedulesSupportedPerUserAttribute_3() + CHIP_ERROR TestThReadsNumberOfWeekDaySchedulesSupportedPerUserAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( + [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads NumberOfYearDay SchedulesSupportedPerUser attribute Error: %@", err); + NSLog(@"TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn( - CheckConstraintMinValue("numberOfYearDaySchedulesSupportedPerUser", [value unsignedCharValue], 0U)); + CheckConstraintMinValue("numberOfWeekDaySchedulesSupportedPerUser", [value unsignedCharValue], 0U)); VerifyOrReturn( - CheckConstraintMaxValue("numberOfYearDaySchedulesSupportedPerUser", [value unsignedCharValue], 255U)); + CheckConstraintMaxValue("numberOfWeekDaySchedulesSupportedPerUser", [value unsignedCharValue], 255U)); { - NumberOfYearDaySchedulesSupportedPerUser = value; + NumberOfWeekDaySchedulesSupportedPerUser = value; } NextTest(); @@ -159049,21 +140353,24 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetYearDayScheduleCommandToDut_5() + CHIP_ERROR TestThSendSetWeekDayScheduleCommand_5() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.localStartTime = [NSNumber numberWithUnsignedInt:960UL]; - params.localEndTime = [NSNumber numberWithUnsignedInt:1980UL]; - [cluster setYearDayScheduleWithParams:params + params.daysMask = [NSNumber numberWithUnsignedChar:2U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:45U]; + params.endHour = [NSNumber numberWithUnsignedChar:16U]; + params.endMinute = [NSNumber numberWithUnsignedChar:55U]; + [cluster setWeekDayScheduleWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); + NSLog(@"TH send Set Week Day Schedule Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -159073,75 +140380,92 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_6() + CHIP_ERROR TestThSendGetWeekDayScheduleCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + [cluster + getWeekDayScheduleWithParams:params + completion:^( + MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("YearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("WeekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("LocalStartTime", actualValue, 960UL)); - } + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("DaysMask", actualValue, 2U)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("LocalEndTime", actualValue, 1980UL)); - } + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("StartHour", actualValue, 15U)); + } - if (values.localEndTime != nil) { + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("StartMinute", actualValue, 45U)); + } - VerifyOrReturn(CheckConstraintMinValue( - "localEndTime", [values.localEndTime unsignedIntValue], 961UL)); - } + VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, true)); + if (values.endHour != nil) { - NextTest(); - }]; + VerifyOrReturn( + CheckConstraintMinValue("endHour", [values.endHour unsignedCharValue], 16U)); + } + + VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, true)); + if (values.endMinute != nil) { + + VerifyOrReturn( + CheckConstraintMinValue("endMinute", [values.endMinute unsignedCharValue], 55U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendSetYearDayScheduleCommandToDut_7() + CHIP_ERROR TestThSendSetWeekDayScheduleCommand_7() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; - params.userIndex = [NSNumber numberWithUnsignedShort:15U]; - params.localStartTime = [NSNumber numberWithUnsignedInt:1020UL]; - params.localEndTime = [NSNumber numberWithUnsignedInt:2040UL]; - [cluster setYearDayScheduleWithParams:params + __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.daysMask = [NSNumber numberWithUnsignedChar:7U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:45U]; + params.endHour = [NSNumber numberWithUnsignedChar:16U]; + params.endMinute = [NSNumber numberWithUnsignedChar:55U]; + [cluster setWeekDayScheduleWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"TH send Set Year Day Schedule Command to DUT Error: %@", err); + NSLog(@"TH send Set Week Day Schedule Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code @@ -159154,31 +140478,31 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_8() + CHIP_ERROR TestThSendGetWeekDayScheduleCommandToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; - params.userIndex = [NSNumber numberWithUnsignedShort:15U]; - [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getWeekDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("YearDayIndex", actualValue, 0U)); + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("WeekDayIndex", actualValue, 0U)); } { id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("UserIndex", actualValue, 15U)); + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); } { @@ -159186,86 +140510,24 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("Status", actualValue, 133U)); } - VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); - if (values.localStartTime != nil) { - } - - VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); - if (values.localEndTime != nil) { - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCreateAUserWithUserIndexAs5_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0U]; - params.userIndex = [NSNumber numberWithUnsignedShort:5U]; - params.userName = @"xxx"; - params.userUniqueID = [NSNumber numberWithUnsignedInt:6452UL]; - params.userStatus = [NSNumber numberWithUnsignedChar:1U]; - params.userType = [NSNumber numberWithUnsignedChar:0U]; - params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; - [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Create a user with userIndex as 5 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NumberOfYearDaySchedulesSupportedPerUser copy]; - params.userIndex = [NSNumber numberWithUnsignedShort:5U]; - [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.yearDayIndex; - VerifyOrReturn( - CheckValue("YearDayIndex", actualValue, NumberOfYearDaySchedulesSupportedPerUser)); + VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); + if (values.daysMask != nil) { } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("UserIndex", actualValue, 5U)); + VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); + if (values.startHour != nil) { } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 139U)); + VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); + if (values.startMinute != nil) { } - VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); - if (values.localStartTime != nil) { + VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); + if (values.endHour != nil) { } - VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); - if (values.localEndTime != nil) { + VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); + if (values.endMinute != nil) { } NextTest(); @@ -159274,19 +140536,19 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearYearDayScheduleToDut_11() + CHIP_ERROR TestThSendsClearWeekDayScheduleCommandToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearYearDayScheduleWithParams:params + [cluster clearWeekDayScheduleWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Year Day Schedule to DUT Error: %@", err); + NSLog(@"TH sends Clear Week Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -159296,26 +140558,26 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_12() + CHIP_ERROR TestThSendsGetWeekDayScheduleCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + [cluster getWeekDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + NSLog(@"TH sends Get Week Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("YearDayIndex", actualValue, 1U)); + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("WeekDayIndex", actualValue, 1U)); } { @@ -159328,90 +140590,24 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } - VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); - if (values.localStartTime != nil) { - } - - VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); - if (values.localEndTime != nil) { - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsSetYearDayScheduleCommandToDut_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.localStartTime = [NSNumber numberWithUnsignedInt:1080UL]; - params.localEndTime = [NSNumber numberWithUnsignedInt:2100UL]; - [cluster setYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("YearDayIndex", actualValue, 1U)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); + if (values.daysMask != nil) { } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); + if (values.startHour != nil) { } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("LocalStartTime", actualValue, 1080UL)); + VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); + if (values.startMinute != nil) { } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("LocalEndTime", actualValue, 2100UL)); + VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); + if (values.endHour != nil) { } - if (values.localEndTime != nil) { - - VerifyOrReturn(CheckConstraintMinValue( - "localEndTime", [values.localEndTime unsignedIntValue], 1081UL)); + VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); + if (values.endMinute != nil) { } NextTest(); @@ -159420,55 +140616,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearYearDayScheduleToDut_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; - params.userIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster - clearYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Year Day Schedule to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestClearAYearDayScheduleForTheFirstUser_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearYearDayScheduleWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clear a year day schedule for the first user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex1_17() + CHIP_ERROR TestCleanupTheCreatedUser_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -159479,28 +140627,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user with UserIndex 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex5_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; - params.userIndex = [NSNumber numberWithUnsignedShort:5U]; - [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user with UserIndex 5 Error: %@", err); + NSLog(@"Cleanup the created user Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -159511,11 +140638,11 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { } }; -class Test_TC_DRLK_2_8 : public TestCommandBridge { +class Test_TC_DRLK_2_6 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DRLK_2_8() - : TestCommandBridge("Test_TC_DRLK_2_8") + Test_TC_DRLK_2_6() + : TestCommandBridge("Test_TC_DRLK_2_6") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -159525,7 +140652,7 @@ class Test_TC_DRLK_2_8 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DRLK_2_8() {} + ~Test_TC_DRLK_2_6() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -159533,11 +140660,11 @@ class Test_TC_DRLK_2_8 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DRLK_2_8\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DRLK_2_6\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DRLK_2_8\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DRLK_2_6\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -159550,107 +140677,77 @@ class Test_TC_DRLK_2_8 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for commissionee\n"); + err = TestWaitForCommissionee_0(); break; case 1: ChipLogProgress( - chipTool, " ***** Test Step 1 : TH reads NumberOfTotalUsers Supported attribute and saves for future use.\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.A0011")) { + chipTool, " ***** Test Step 1 : TH reads NumberOfHoliday SchedulesSupported and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F0b && DRLK.S.A0016")) { NextTest(); return; } - err = TestThReadsNumberOfTotalUsersSupportedAttributeAndSavesForFutureUse_1(); + err = TestThReadsNumberOfHolidaySchedulesSupportedAndSavesForFutureUse_1(); break; case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as " - "1 UserName as xxx UserUniqueID as 6452 UserStatus as 1 UserType as 0 CredentialRule as 0\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Create Holiday schedule with 1 index\n"); + if (ShouldSkip("DRLK.S.F0b && DRLK.S.C11.Rsp")) { NextTest(); return; } - err = TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs1UserNameAsXxxUserUniqueIDAs6452UserStatusAs1UserTypeAs0CredentialRuleAs0_2(); + err = TestCreateHolidayScheduleWith1Index_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH sends Get User Command to DUT with UserIndex as 1\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Get Holiday Schedule with HolidayIndex as 1\n"); + if (ShouldSkip("DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx")) { NextTest(); return; } - err = TestThSendsGetUserCommandToDutWithUserIndexAs1_3(); + err = TestGetHolidayScheduleWithHolidayIndexAs1_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as " - "2 UserName as xxx UserUniqueID as 6452 UserStatus as 1 UserType as 10 (Invalid value) CredentialRule as 3\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Create Holiday schedule with invalid operating mode\n"); + if (ShouldSkip("DRLK.S.C11.Rsp")) { NextTest(); return; } - err = TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs2UserNameAsXxxUserUniqueIDAs6452UserStatusAs1UserTypeAs10InvalidValueCredentialRuleAs3_4(); + err = TestCreateHolidayScheduleWithInvalidOperatingMode_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as " - "1 (Same as step 2) UserName as xxx UserUniqueID as 8965 UserStatus as 1 UserType as 0 CredentialRule as 0\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Get Holiday Schedule with Invalid HolidayIndex 15.\n"); + if (ShouldSkip("DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx")) { NextTest(); return; } - err = TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs1SameAsStep2UserNameAsXxxUserUniqueIDAs8965UserStatusAs1UserTypeAs0CredentialRuleAs0_5(); + err = TestGetHolidayScheduleWithInvalidHolidayIndex15_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as " - "2 UserName as NULL UserUniqueID as NULL UserStatus as NULL UserType as NULL CredentialRule as NULL\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Get Holiday Schedule with the Non-scheduled HolidayIndex\n"); + if (ShouldSkip("DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx")) { NextTest(); return; } - err = TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs2UserNameAsNullUserUniqueIDAsNullUserStatusAsNullUserTypeAsNullCredentialRuleAsNull_6(); + err = TestGetHolidayScheduleWithTheNonScheduledHolidayIndex_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends Get User Command to DUT with UserIndex as 2\n"); - if (ShouldSkip("DRLK.S.C1a.Rsp && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Clear Holiday schedule with 1 index\n"); + if (ShouldSkip("DRLK.S.F0b && DRLK.S.C13.Rsp")) { NextTest(); return; } - err = TestThSendsGetUserCommandToDutWithUserIndexAs2_7(); + err = TestClearHolidayScheduleWith1Index_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : TH sends Set User Command to DUT with the following values: OperationType as 2 UserIndex as " - "2 UserName as NULL UserUniqueID as NULL UserStatus as NULL UserType as NULL CredentialRule as NULL\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Make sure that holiday schedule was deleted\n"); + if (ShouldSkip("DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx")) { NextTest(); return; } - err = TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs2UserIndexAs2UserNameAsNullUserUniqueIDAsNullUserStatusAsNullUserTypeAsNullCredentialRuleAsNull_8(); + err = TestMakeSureThatHolidayScheduleWasDeleted_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Get User Command to DUT with the UserIndex as 2\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx")) { - NextTest(); - return; - } - err = TestThSendsGetUserCommandToDutWithTheUserIndexAs2_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Clear User Command to DUT with the UserIndex as 1\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1d.Rsp")) { - NextTest(); - return; - } - err = TestThSendsClearUserCommandToDutWithTheUserIndexAs1_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Get User Command to DUT with the UserIndex as 1\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx")) { - NextTest(); - return; - } - err = TestThSendsGetUserCommandToDutWithTheUserIndexAs1_11(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Cleanup the created user\n"); + err = TestCleanupTheCreatedUser_9(); break; } @@ -159679,9 +140776,7 @@ class Test_TC_DRLK_2_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus present", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus value", status.mClusterStatus.Value(), 3)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -159695,12 +140790,6 @@ class Test_TC_DRLK_2_8 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -159714,38 +140803,39 @@ class Test_TC_DRLK_2_8 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestWaitForCommissionee_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nonnull Current_NumberOfTotalUsersSupported; + NSNumber * _Nonnull NumberOfHolidaySchedulesSupported; - CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAttributeAndSavesForFutureUse_1() + CHIP_ERROR TestThReadsNumberOfHolidaySchedulesSupportedAndSavesForFutureUse_1() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads NumberOfTotalUsers Supported attribute and saves for future use. Error: %@", err); + [cluster readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads NumberOfHoliday SchedulesSupported and saves for future use. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("numberOfTotalUsersSupported", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("numberOfTotalUsersSupported", [value unsignedShortValue], 65534U)); + VerifyOrReturn(CheckConstraintMinValue("numberOfHolidaySchedulesSupported", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("numberOfHolidaySchedulesSupported", [value unsignedCharValue], 255U)); { - Current_NumberOfTotalUsersSupported = value; + NumberOfHolidaySchedulesSupported = value; } NextTest(); @@ -159754,512 +140844,264 @@ class Test_TC_DRLK_2_8 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs1UserNameAsXxxUserUniqueIDAs6452UserStatusAs1UserTypeAs0CredentialRuleAs0_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.userName = @"xxx"; - params.userUniqueID = [NSNumber numberWithUnsignedInt:6452UL]; - params.userStatus = [NSNumber numberWithUnsignedChar:1U]; - params.userType = [NSNumber numberWithUnsignedChar:0U]; - params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as 1 " - @"UserName as xxx UserUniqueID as 6452 UserStatus as 1 UserType as 0 CredentialRule as 0 Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsGetUserCommandToDutWithUserIndexAs1_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get User Command to DUT with UserIndex as 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("UserName", actualValue)); - VerifyOrReturn(CheckValueAsString("UserName", actualValue, @"xxx")); - } - - { - id actualValue = values.userUniqueID; - VerifyOrReturn(CheckValueNonNull("UserUniqueID", actualValue)); - VerifyOrReturn(CheckValue("UserUniqueID", actualValue, 6452UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("UserStatus", actualValue)); - VerifyOrReturn(CheckValue("UserStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("UserType", actualValue)); - VerifyOrReturn(CheckValue("UserType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("CredentialRule", actualValue)); - VerifyOrReturn(CheckValue("CredentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNonNull("Credentials", actualValue)); - VerifyOrReturn(CheckValue("Credentials", [actualValue count], static_cast(0))); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("NextUserIndex", actualValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs2UserNameAsXxxUserUniqueIDAs6452UserStatusAs1UserTypeAs10InvalidValueCredentialRuleAs3_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0U]; - params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - params.userName = @"xxx"; - params.userUniqueID = [NSNumber numberWithUnsignedInt:6452UL]; - params.userStatus = [NSNumber numberWithUnsignedChar:1U]; - params.userType = [NSNumber numberWithUnsignedChar:10U]; - params.credentialRule = [NSNumber numberWithUnsignedChar:3U]; - [cluster - setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as 2 " - @"UserName as xxx UserUniqueID as 6452 UserStatus as 1 UserType as 10 (Invalid value) CredentialRule " - @"as 3 Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs1SameAsStep2UserNameAsXxxUserUniqueIDAs8965UserStatusAs1UserTypeAs0CredentialRuleAs0_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.userName = @"xxx"; - params.userUniqueID = [NSNumber numberWithUnsignedInt:8965UL]; - params.userStatus = [NSNumber numberWithUnsignedChar:1U]; - params.userType = [NSNumber numberWithUnsignedChar:0U]; - params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as 1 (Same " - @"as step 2) UserName as xxx UserUniqueID as 8965 UserStatus as 1 UserType as 0 CredentialRule as 0 " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs2UserNameAsNullUserUniqueIDAsNullUserStatusAsNullUserTypeAsNullCredentialRuleAsNull_6() + CHIP_ERROR TestCreateHolidayScheduleWith1Index_2() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0U]; - params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - params.userName = nil; - params.userUniqueID = nil; - params.userStatus = nil; - params.userType = nil; - params.credentialRule = nil; - [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as 2 " - @"UserName as NULL UserUniqueID as NULL UserStatus as NULL UserType as NULL CredentialRule as " - @"NULL Error: %@", - err); + __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.localStartTime = [NSNumber numberWithUnsignedInt:20UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:30UL]; + params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; + [cluster setHolidayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Holiday schedule with 1 index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetUserCommandToDutWithUserIndexAs2_7() + CHIP_ERROR TestGetHolidayScheduleWithHolidayIndexAs1_3() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; - params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get User Command to DUT with UserIndex as 2 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("UserIndex", actualValue, 2U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("UserName", actualValue)); - VerifyOrReturn(CheckValueAsString("UserName", actualValue, @"")); - } + __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; + [cluster getHolidayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Holiday Schedule with HolidayIndex as 1 Error: %@", err); - { - id actualValue = values.userUniqueID; - VerifyOrReturn(CheckValueNull("UserUniqueID", actualValue)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("UserStatus", actualValue)); - VerifyOrReturn(CheckValue("UserStatus", actualValue, 1U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("HolidayIndex", actualValue, 1U)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("UserType", actualValue)); - VerifyOrReturn(CheckValue("UserType", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("CredentialRule", actualValue)); - VerifyOrReturn(CheckValue("CredentialRule", actualValue, 0U)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("LocalStartTime", actualValue, 20UL)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNonNull("Credentials", actualValue)); - VerifyOrReturn(CheckValue("Credentials", [actualValue count], static_cast(0))); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("LocalEndTime", actualValue, 30UL)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); - } + if (values.localEndTime != nil) { - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); - } + VerifyOrReturn(CheckConstraintMinValue( + "localEndTime", [values.localEndTime unsignedIntValue], 21UL)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("NextUserIndex", actualValue)); - } + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("OperatingMode", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs2UserIndexAs2UserNameAsNullUserUniqueIDAsNullUserStatusAsNullUserTypeAsNullCredentialRuleAsNull_8() + CHIP_ERROR TestCreateHolidayScheduleWithInvalidOperatingMode_4() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:2U]; - params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - params.userName = nil; - params.userUniqueID = nil; - params.userStatus = nil; - params.userType = nil; - params.credentialRule = nil; - [cluster setUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Set User Command to DUT with the following values: OperationType as 2 UserIndex as 2 " - @"UserName as NULL UserUniqueID as NULL UserStatus as NULL UserType as NULL CredentialRule as " - @"NULL Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.localStartTime = [NSNumber numberWithUnsignedInt:20UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:30UL]; + params.operatingMode = [NSNumber numberWithUnsignedChar:5U]; + [cluster setHolidayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Holiday schedule with invalid operating mode Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetUserCommandToDutWithTheUserIndexAs2_9() + CHIP_ERROR TestGetHolidayScheduleWithInvalidHolidayIndex15_5() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; - params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get User Command to DUT with the UserIndex as 2 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("UserIndex", actualValue, 2U)); - } + __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:15U]; + [cluster getHolidayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Holiday Schedule with Invalid HolidayIndex 15. Error: %@", err); - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("UserName", actualValue)); - VerifyOrReturn(CheckValueAsString("UserName", actualValue, @"")); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userUniqueID; - VerifyOrReturn(CheckValueNull("UserUniqueID", actualValue)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("HolidayIndex", actualValue, 15U)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("UserStatus", actualValue)); - VerifyOrReturn(CheckValue("UserStatus", actualValue, 1U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 133U)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("UserType", actualValue)); - VerifyOrReturn(CheckValue("UserType", actualValue, 0U)); - } + NextTest(); + }]; - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("CredentialRule", actualValue)); - VerifyOrReturn(CheckValue("CredentialRule", actualValue, 0U)); - } + return CHIP_NO_ERROR; + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNonNull("Credentials", actualValue)); - VerifyOrReturn(CheckValue("Credentials", [actualValue count], static_cast(0))); - } + CHIP_ERROR TestGetHolidayScheduleWithTheNonScheduledHolidayIndex_6() + { - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); - } + __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:10U]; + [cluster getHolidayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Holiday Schedule with the Non-scheduled HolidayIndex Error: %@", err); - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("NextUserIndex", actualValue)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("HolidayIndex", actualValue, 10U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearUserCommandToDutWithTheUserIndexAs1_10() + CHIP_ERROR TestClearHolidayScheduleWith1Index_7() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear User Command to DUT with the UserIndex as 1 Error: %@", err); + __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; + [cluster clearHolidayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear Holiday schedule with 1 index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetUserCommandToDutWithTheUserIndexAs1_11() + CHIP_ERROR TestMakeSureThatHolidayScheduleWasDeleted_8() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get User Command to DUT with the UserIndex as 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } + __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; + [cluster getHolidayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that holiday schedule was deleted Error: %@", err); - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("UserName", actualValue)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userUniqueID; - VerifyOrReturn(CheckValueNull("UserUniqueID", actualValue)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("HolidayIndex", actualValue, 1U)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("UserStatus", actualValue)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("UserType", actualValue)); - } + NextTest(); + }]; - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("CredentialRule", actualValue)); - } + return CHIP_NO_ERROR; + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("Credentials", actualValue)); - } + CHIP_ERROR TestCleanupTheCreatedUser_9() + { - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("CreatorFabricIndex", actualValue)); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("LastModifiedFabricIndex", actualValue)); - } + __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster clearUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Cleanup the created user Error: %@", err); - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("NextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("NextUserIndex", actualValue, 2U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_DRLK_2_11 : public TestCommandBridge { +class Test_TC_DRLK_2_7 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DRLK_2_11() - : TestCommandBridge("Test_TC_DRLK_2_11") + Test_TC_DRLK_2_7() + : TestCommandBridge("Test_TC_DRLK_2_7") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("PINCredentialData", &mPINCredentialData); - AddArgument("RFIDCredentialData", &mRFIDCredentialData); - AddArgument("FingerVeinCredentialData", &mFingerVeinCredentialData); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DRLK_2_11() {} + ~Test_TC_DRLK_2_7() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -160267,11 +141109,11 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DRLK_2_11\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DRLK_2_7\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DRLK_2_11\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DRLK_2_7\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -160288,172 +141130,128 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Create new user with default parameters\n"); - err = TestCreateNewUserWithDefaultParameters_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Create new user\n"); + err = TestCreateNewUser_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the user back and verify its fields\n"); err = TestReadTheUserBackAndVerifyItsFields_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads NumberOfTotalUsersSupported and saves for future use.\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads NumberOfYearDay SchedulesSupportedPerUser attribute\n"); + if (ShouldSkip("DRLK.S.F0a && DRLK.S.A0015")) { NextTest(); return; } - err = TestThReadsNumberOfTotalUsersSupportedAndSavesForFutureUse_3(); + err = TestThReadsNumberOfYearDaySchedulesSupportedPerUserAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads MinPINCodeLength and saves for future use.\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads NumberOfTotalUsers Supported attribute\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.A0011")) { NextTest(); return; } - err = TestThReadsMinPINCodeLengthAndSavesForFutureUse_4(); + err = TestThReadsNumberOfTotalUsersSupportedAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads MaxPINCodeLength and saves for future use.\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Set Year Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0e.Rsp")) { NextTest(); return; } - err = TestThReadsMaxPINCodeLengthAndSavesForFutureUse_5(); + err = TestThSendsSetYearDayScheduleCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads MinRFIDCodeLength and saves for future use.\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A001a")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Get Year Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestThReadsMinRFIDCodeLengthAndSavesForFutureUse_6(); + err = TestThSendsGetYearDayScheduleCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads MaxRFIDCodeLength and saves for future use.\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A0019")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH send Set Year Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.C0e.Rsp")) { NextTest(); return; } - err = TestThReadsMaxRFIDCodeLengthAndSavesForFutureUse_7(); + err = TestThSendSetYearDayScheduleCommandToDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Set Credential Command to DUT with type PIN\n"); - if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Get Year Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutWithTypePin_8(); + err = TestThSendsGetYearDayScheduleCommandToDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Set Credential Command to DUT with type RFID\n"); - if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { - NextTest(); - return; - } - err = TestThSendsSetCredentialCommandToDutWithTypeRfid_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Create a user with userIndex as 5\n"); + err = TestCreateAUserWithUserIndexAs5_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Set Credential Command to DUT with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Get Year Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutWithTypeFingerVein_10(); + err = TestThSendsGetYearDayScheduleCommandToDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Get Credential Status Command with type PIN\n"); - if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Clear Year Day Schedule to DUT\n"); + if (ShouldSkip("DRLK.S.C10.Rsp")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypePin_11(); + err = TestThSendsClearYearDayScheduleToDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Get Credential Status Command with type RFID\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Get Year Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx && DRLK.S.C10.Rsp")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypeRfid_12(); + err = TestThSendsGetYearDayScheduleCommandToDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends Get Credential Status Command with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends Set Year Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.C0e.Rsp")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_13(); + err = TestThSendsSetYearDayScheduleCommandToDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Clear Credential Command to DUT with type PIN\n"); - if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Get Year Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestThSendsClearCredentialCommandToDutWithTypePin_14(); + err = TestThSendsGetYearDayScheduleCommandToDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Get Credential Status Command with type RFID\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Clear Year Day Schedule to DUT\n"); + if (ShouldSkip("DRLK.S.F0a && DRLK.S.C10.Rsp")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypeRfid_15(); + err = TestThSendsClearYearDayScheduleToDut_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Get Credential Status Command with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Clear a year day schedule for the first user\n"); + if (ShouldSkip("DRLK.S.F0a && DRLK.S.C10.Rsp")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_16(); + err = TestClearAYearDayScheduleForTheFirstUser_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Clear Credential Command to DUT with type RFID\n"); - if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { - NextTest(); - return; - } - err = TestThSendsClearCredentialCommandToDutWithTypeRfid_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Cleanup the created user with UserIndex 1\n"); + err = TestCleanupTheCreatedUserWithUserIndex1_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH sends Get Credential Status Command with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { - NextTest(); - return; - } - err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH sends Clear Credential Command to DUT with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { - NextTest(); - return; - } - err = TestThSendsClearCredentialCommandToDutWithTypeFingerVein_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends Get Credential Status Command to DUT with type PIN\n"); - if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { - NextTest(); - return; - } - err = TestThSendsGetCredentialStatusCommandToDutWithTypePin_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends Get Credential Status Command to DUT with type RFID\n"); - if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { - NextTest(); - return; - } - err = TestThSendsGetCredentialStatusCommandToDutWithTypeRfid_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends Get Credential Status Command to DUT with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { - NextTest(); - return; - } - err = TestThSendsGetCredentialStatusCommandToDutWithTypeFingerVein_22(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Cleanup the created user with UserIndex 5\n"); + err = TestCleanupTheCreatedUserWithUserIndex5_18(); break; } @@ -160488,7 +141286,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -160512,7 +141310,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -160523,18 +141321,6 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -160548,14 +141334,11 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 23; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mPINCredentialData; - chip::Optional mRFIDCredentialData; - chip::Optional mFingerVeinCredentialData; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -160566,7 +141349,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestCreateNewUserWithDefaultParameters_1() + CHIP_ERROR TestCreateNewUser_1() { MTRBaseDevice * device = GetDevice("alpha"); @@ -160583,7 +141366,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"Create new user with default parameters Error: %@", err); + NSLog(@"Create new user Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -160671,42 +141454,53 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull NumberOfYearDaySchedulesSupportedPerUser; - CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAndSavesForFutureUse_3() + CHIP_ERROR TestThReadsNumberOfYearDaySchedulesSupportedPerUserAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads NumberOfTotalUsersSupported and saves for future use. Error: %@", err); + [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads NumberOfYearDay SchedulesSupportedPerUser attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("numberOfTotalUsersSupported", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("numberOfTotalUsersSupported", [value unsignedShortValue], 65535U)); + VerifyOrReturn( + CheckConstraintMinValue("numberOfYearDaySchedulesSupportedPerUser", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("numberOfYearDaySchedulesSupportedPerUser", [value unsignedCharValue], 255U)); + { + NumberOfYearDaySchedulesSupportedPerUser = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull NumberOfTotalUsersSupported; - CHIP_ERROR TestThReadsMinPINCodeLengthAndSavesForFutureUse_4() + CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MinPINCodeLength and saves for future use. Error: %@", err); + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads NumberOfTotalUsers Supported attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("minPINCodeLength", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minPINCodeLength", [value unsignedCharValue], 255U)); + VerifyOrReturn(CheckConstraintMinValue("numberOfTotalUsersSupported", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("numberOfTotalUsersSupported", [value unsignedShortValue], 65534U)); + { + NumberOfTotalUsersSupported = value; + } NextTest(); }]; @@ -160714,775 +141508,1217 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsMaxPINCodeLengthAndSavesForFutureUse_5() + CHIP_ERROR TestThSendsSetYearDayScheduleCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MaxPINCodeLength and saves for future use. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.localStartTime = [NSNumber numberWithUnsignedInt:960UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:1980UL]; + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckConstraintMinValue("maxPINCodeLength", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxPINCodeLength", [value unsignedCharValue], 255U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsMinRFIDCodeLengthAndSavesForFutureUse_6() + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MinRFIDCodeLength and saves for future use. Error: %@", err); + __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getYearDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("minRFIDCodeLength", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minRFIDCodeLength", [value unsignedCharValue], 255U)); + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("YearDayIndex", actualValue, 1U)); + } - NextTest(); - }]; + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("LocalStartTime", actualValue, 960UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("LocalEndTime", actualValue, 1980UL)); + } + + if (values.localEndTime != nil) { + + VerifyOrReturn(CheckConstraintMinValue( + "localEndTime", [values.localEndTime unsignedIntValue], 961UL)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsMaxRFIDCodeLengthAndSavesForFutureUse_7() + CHIP_ERROR TestThSendSetYearDayScheduleCommandToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MaxRFIDCodeLength and saves for future use. Error: %@", err); + __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; + params.userIndex = [NSNumber numberWithUnsignedShort:15U]; + params.localStartTime = [NSNumber numberWithUnsignedInt:1020UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:2040UL]; + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH send Set Year Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; - VerifyOrReturn(CheckConstraintMinValue("maxRFIDCodeLength", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxRFIDCodeLength", [value unsignedCharValue], 255U)); + return CHIP_NO_ERROR; + } - NextTest(); - }]; + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; + params.userIndex = [NSNumber numberWithUnsignedShort:15U]; + [cluster getYearDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("YearDayIndex", actualValue, 0U)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 15U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 133U)); + } + + VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); + if (values.localStartTime != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); + if (values.localEndTime != nil) { + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypePin_8() + CHIP_ERROR TestCreateAUserWithUserIndexAs5_9() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; params.operationType = [NSNumber numberWithUnsignedChar:0U]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:5U]; + params.userName = @"xxx"; + params.userUniqueID = [NSNumber numberWithUnsignedInt:6452UL]; + params.userStatus = [NSNumber numberWithUnsignedChar:1U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; + params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; + [cluster setUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create a user with userIndex as 5 Error: %@", err); - params.credentialData = mPINCredentialData.HasValue() - ? [NSData dataWithBytes:mPINCredentialData.Value().data() length:mPINCredentialData.Value().size()] - : [[NSData alloc] initWithBytes:"123456" length:6]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NumberOfYearDaySchedulesSupportedPerUser copy]; + params.userIndex = [NSNumber numberWithUnsignedShort:5U]; + [cluster getYearDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn( + CheckValue("YearDayIndex", actualValue, NumberOfYearDaySchedulesSupportedPerUser)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 5U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); + } + + VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); + if (values.localStartTime != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); + if (values.localEndTime != nil) { + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsClearYearDayScheduleToDut_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.userStatus = nil; - params.userType = nil; + [cluster clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear Year Day Schedule to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getYearDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("YearDayIndex", actualValue, 1U)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); + } + + VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); + if (values.localStartTime != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); + if (values.localEndTime != nil) { + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsSetYearDayScheduleCommandToDut_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.localStartTime = [NSNumber numberWithUnsignedInt:1080UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:2100UL]; + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getYearDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("YearDayIndex", actualValue, 1U)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("LocalStartTime", actualValue, 1080UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("LocalEndTime", actualValue, 2100UL)); + } + + if (values.localEndTime != nil) { + + VerifyOrReturn(CheckConstraintMinValue( + "localEndTime", [values.localEndTime unsignedIntValue], 1081UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsClearYearDayScheduleToDut_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; + params.userIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster - setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT with type PIN Error: %@", err); + clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear Year Day Schedule to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestClearAYearDayScheduleForTheFirstUser_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear a year day schedule for the first user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex1_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster clearUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Cleanup the created user with UserIndex 1 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex5_18() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:5U]; + [cluster clearUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Cleanup the created user with UserIndex 5 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DRLK_2_8 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DRLK_2_8() + : TestCommandBridge("Test_TC_DRLK_2_8") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_DRLK_2_8() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DRLK_2_8\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DRLK_2_8\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress( + chipTool, " ***** Test Step 1 : TH reads NumberOfTotalUsers Supported attribute and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.A0011")) { + NextTest(); + return; + } + err = TestThReadsNumberOfTotalUsersSupportedAttributeAndSavesForFutureUse_1(); + break; + case 2: + ChipLogProgress(chipTool, + " ***** Test Step 2 : TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as " + "1 UserName as xxx UserUniqueID as 6452 UserStatus as 1 UserType as 0 CredentialRule as 0\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp")) { + NextTest(); + return; + } + err = TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs1UserNameAsXxxUserUniqueIDAs6452UserStatusAs1UserTypeAs0CredentialRuleAs0_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH sends Get User Command to DUT with UserIndex as 1\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx")) { + NextTest(); + return; + } + err = TestThSendsGetUserCommandToDutWithUserIndexAs1_3(); + break; + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as " + "2 UserName as xxx UserUniqueID as 6452 UserStatus as 1 UserType as 10 (Invalid value) CredentialRule as 3\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp")) { + NextTest(); + return; + } + err = TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs2UserNameAsXxxUserUniqueIDAs6452UserStatusAs1UserTypeAs10InvalidValueCredentialRuleAs3_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as " + "1 (Same as step 2) UserName as xxx UserUniqueID as 8965 UserStatus as 1 UserType as 0 CredentialRule as 0\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp")) { + NextTest(); + return; + } + err = TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs1SameAsStep2UserNameAsXxxUserUniqueIDAs8965UserStatusAs1UserTypeAs0CredentialRuleAs0_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as " + "2 UserName as NULL UserUniqueID as NULL UserStatus as NULL UserType as NULL CredentialRule as NULL\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp")) { + NextTest(); + return; + } + err = TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs2UserNameAsNullUserUniqueIDAsNullUserStatusAsNullUserTypeAsNullCredentialRuleAsNull_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends Get User Command to DUT with UserIndex as 2\n"); + if (ShouldSkip("DRLK.S.C1a.Rsp && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx")) { + NextTest(); + return; + } + err = TestThSendsGetUserCommandToDutWithUserIndexAs2_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : TH sends Set User Command to DUT with the following values: OperationType as 2 UserIndex as " + "2 UserName as NULL UserUniqueID as NULL UserStatus as NULL UserType as NULL CredentialRule as NULL\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp")) { + NextTest(); + return; + } + err = TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs2UserIndexAs2UserNameAsNullUserUniqueIDAsNullUserStatusAsNullUserTypeAsNullCredentialRuleAsNull_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Get User Command to DUT with the UserIndex as 2\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx")) { + NextTest(); + return; + } + err = TestThSendsGetUserCommandToDutWithTheUserIndexAs2_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Clear User Command to DUT with the UserIndex as 1\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1d.Rsp")) { + NextTest(); + return; + } + err = TestThSendsClearUserCommandToDutWithTheUserIndexAs1_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Get User Command to DUT with the UserIndex as 1\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx")) { + NextTest(); + return; + } + err = TestThSendsGetUserCommandToDutWithTheUserIndexAs1_11(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("clusterStatus present", status.mClusterStatus.HasValue(), true)); + VerifyOrReturn(CheckValue("clusterStatus value", status.mClusterStatus.Value(), 3)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); - } +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 12; - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("NextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("NextCredentialIndex", actualValue, 2U)); - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } + NSNumber * _Nonnull Current_NumberOfTotalUsersSupported; - CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypeRfid_9() + CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAttributeAndSavesForFutureUse_1() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0U]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - params.credentialData = mRFIDCredentialData.HasValue() - ? [NSData dataWithBytes:mRFIDCredentialData.Value().data() length:mRFIDCredentialData.Value().size()] - : [[NSData alloc] initWithBytes:"RFIDTESTDATA" length:12]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.userStatus = nil; - params.userType = nil; - [cluster - setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT with type RFID Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads NumberOfTotalUsers Supported attribute and saves for future use. Error: %@", err); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("NextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("NextCredentialIndex", actualValue, 2U)); - } + VerifyOrReturn(CheckConstraintMinValue("numberOfTotalUsersSupported", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("numberOfTotalUsersSupported", [value unsignedShortValue], 65534U)); + { + Current_NumberOfTotalUsersSupported = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypeFingerVein_10() + CHIP_ERROR + TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs1UserNameAsXxxUserUniqueIDAs6452UserStatusAs1UserTypeAs0CredentialRuleAs0_2() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; params.operationType = [NSNumber numberWithUnsignedChar:0U]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:4U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - params.credentialData = mFingerVeinCredentialData.HasValue() - ? [NSData dataWithBytes:mFingerVeinCredentialData.Value().data() length:mFingerVeinCredentialData.Value().size()] - : [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.userStatus = nil; - params.userType = nil; + params.userName = @"xxx"; + params.userUniqueID = [NSNumber numberWithUnsignedInt:6452UL]; + params.userStatus = [NSNumber numberWithUnsignedChar:1U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; + params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster - setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT with type FingerVein Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); - } + setUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as 1 " + @"UserName as xxx UserUniqueID as 6452 UserStatus as 1 UserType as 0 CredentialRule as 0 Error: %@", + err); - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("NextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("NextCredentialIndex", actualValue, 2U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypePin_11() + CHIP_ERROR TestThSendsGetUserCommandToDutWithUserIndexAs1_3() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command with type PIN Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); - } - - VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); - } - - NextTest(); - }]; + __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Get User Command to DUT with UserIndex as 1 Error: %@", err); - return CHIP_NO_ERROR; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeRfid_12() - { + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("UserName", actualValue)); + VerifyOrReturn(CheckValueAsString("UserName", actualValue, @"xxx")); + } - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; + { + id actualValue = values.userUniqueID; + VerifyOrReturn(CheckValueNonNull("UserUniqueID", actualValue)); + VerifyOrReturn(CheckValue("UserUniqueID", actualValue, 6452UL)); + } - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command with type RFID Error: %@", err); + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("UserStatus", actualValue)); + VerifyOrReturn(CheckValue("UserStatus", actualValue, 1U)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("UserType", actualValue)); + VerifyOrReturn(CheckValue("UserType", actualValue, 0U)); + } - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("CredentialRule", actualValue)); + VerifyOrReturn(CheckValue("CredentialRule", actualValue, 0U)); + } - VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNonNull("Credentials", actualValue)); + VerifyOrReturn(CheckValue("Credentials", [actualValue count], static_cast(0))); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("NextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_13() + CHIP_ERROR + TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs2UserNameAsXxxUserUniqueIDAs6452UserStatusAs1UserTypeAs10InvalidValueCredentialRuleAs3_4() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:4U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command with type FingerVein Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); - } - - VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); - } + __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; + params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + params.userName = @"xxx"; + params.userUniqueID = [NSNumber numberWithUnsignedInt:6452UL]; + params.userStatus = [NSNumber numberWithUnsignedChar:1U]; + params.userType = [NSNumber numberWithUnsignedChar:10U]; + params.credentialRule = [NSNumber numberWithUnsignedChar:3U]; + [cluster + setUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as 2 " + @"UserName as xxx UserUniqueID as 6452 UserStatus as 1 UserType as 10 (Invalid value) CredentialRule " + @"as 3 Error: %@", + err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypePin_14() + CHIP_ERROR + TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs1SameAsStep2UserNameAsXxxUserUniqueIDAs8965UserStatusAs1UserTypeAs0CredentialRuleAs0_5() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Credential Command to DUT with type PIN Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.userName = @"xxx"; + params.userUniqueID = [NSNumber numberWithUnsignedInt:8965UL]; + params.userStatus = [NSNumber numberWithUnsignedChar:1U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; + params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; + [cluster + setUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as 1 (Same " + @"as step 2) UserName as xxx UserUniqueID as 8965 UserStatus as 1 UserType as 0 CredentialRule as 0 " + @"Error: %@", + err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeRfid_15() + CHIP_ERROR + TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs0UserIndexAs2UserNameAsNullUserUniqueIDAsNullUserStatusAsNullUserTypeAsNullCredentialRuleAsNull_6() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command with type RFID Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); - } - - VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); - } + __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; + params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + params.userName = nil; + params.userUniqueID = nil; + params.userStatus = nil; + params.userType = nil; + params.credentialRule = nil; + [cluster setUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as 2 " + @"UserName as NULL UserUniqueID as NULL UserStatus as NULL UserType as NULL CredentialRule as " + @"NULL Error: %@", + err); - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_16() + CHIP_ERROR TestThSendsGetUserCommandToDutWithUserIndexAs2_7() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:4U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command with type FingerVein Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); - } + __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + [cluster getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Get User Command to DUT with UserIndex as 2 Error: %@", err); - VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 2U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("UserName", actualValue)); + VerifyOrReturn(CheckValueAsString("UserName", actualValue, @"")); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); - } + { + id actualValue = values.userUniqueID; + VerifyOrReturn(CheckValueNull("UserUniqueID", actualValue)); + } - NextTest(); - }]; + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("UserStatus", actualValue)); + VerifyOrReturn(CheckValue("UserStatus", actualValue, 1U)); + } - return CHIP_NO_ERROR; - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("UserType", actualValue)); + VerifyOrReturn(CheckValue("UserType", actualValue, 0U)); + } - CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypeRfid_17() - { + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("CredentialRule", actualValue)); + VerifyOrReturn(CheckValue("CredentialRule", actualValue, 0U)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNonNull("Credentials", actualValue)); + VerifyOrReturn(CheckValue("Credentials", [actualValue count], static_cast(0))); + } - __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); + } - [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Credential Command to DUT with type RFID Error: %@", err); + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("NextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_18() + CHIP_ERROR + TestThSendsSetUserCommandToDutWithTheFollowingValuesOperationTypeAs2UserIndexAs2UserNameAsNullUserUniqueIDAsNullUserStatusAsNullUserTypeAsNullCredentialRuleAsNull_8() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:4U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command with type FingerVein Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); - } - - VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); - } + __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:2U]; + params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + params.userName = nil; + params.userUniqueID = nil; + params.userStatus = nil; + params.userType = nil; + params.credentialRule = nil; + [cluster setUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Set User Command to DUT with the following values: OperationType as 2 UserIndex as 2 " + @"UserName as NULL UserUniqueID as NULL UserStatus as NULL UserType as NULL CredentialRule as " + @"NULL Error: %@", + err); - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypeFingerVein_19() + CHIP_ERROR TestThSendsGetUserCommandToDutWithTheUserIndexAs2_9() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:4U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Credential Command to DUT with type FingerVein Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; + __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + [cluster getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Get User Command to DUT with the UserIndex as 2 Error: %@", err); - return CHIP_NO_ERROR; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypePin_20() - { + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 2U)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("UserName", actualValue)); + VerifyOrReturn(CheckValueAsString("UserName", actualValue, @"")); + } - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; + { + id actualValue = values.userUniqueID; + VerifyOrReturn(CheckValueNull("UserUniqueID", actualValue)); + } - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command to DUT with type PIN Error: %@", err); + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("UserStatus", actualValue)); + VerifyOrReturn(CheckValue("UserStatus", actualValue, 1U)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("UserType", actualValue)); + VerifyOrReturn(CheckValue("UserType", actualValue, 0U)); + } - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("CredentialExists", actualValue, false)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("CredentialRule", actualValue)); + VerifyOrReturn(CheckValue("CredentialRule", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNonNull("Credentials", actualValue)); + VerifyOrReturn(CheckValue("Credentials", [actualValue count], static_cast(0))); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("CreatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("LastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("NextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypeRfid_21() + CHIP_ERROR TestThSendsClearUserCommandToDutWithTheUserIndexAs1_10() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command to DUT with type RFID Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("CredentialExists", actualValue, false)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("CreatorFabricIndex", actualValue)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("LastModifiedFabricIndex", actualValue)); - } + __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster clearUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear User Command to DUT with the UserIndex as 1 Error: %@", err); - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypeFingerVein_22() + CHIP_ERROR TestThSendsGetUserCommandToDutWithTheUserIndexAs1_11() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:4U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; + __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Get User Command to DUT with the UserIndex as 1 Error: %@", err); - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command to DUT with type FingerVein Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + } - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("CredentialExists", actualValue, false)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("UserName", actualValue)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); - } + { + id actualValue = values.userUniqueID; + VerifyOrReturn(CheckValueNull("UserUniqueID", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("CreatorFabricIndex", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("UserStatus", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("LastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("UserType", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("CredentialRule", actualValue)); + } - NextTest(); - }]; + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("Credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("CreatorFabricIndex", actualValue)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("LastModifiedFabricIndex", actualValue)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNonNull("NextUserIndex", actualValue)); + VerifyOrReturn(CheckValue("NextUserIndex", actualValue, 2U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_DRLK_2_12 : public TestCommandBridge { +class Test_TC_DRLK_2_11 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DRLK_2_12() - : TestCommandBridge("Test_TC_DRLK_2_12") + Test_TC_DRLK_2_11() + : TestCommandBridge("Test_TC_DRLK_2_11") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("PINCredentialData", &mPINCredentialData); + AddArgument("RFIDCredentialData", &mRFIDCredentialData); + AddArgument("FingerVeinCredentialData", &mFingerVeinCredentialData); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DRLK_2_12() {} + ~Test_TC_DRLK_2_11() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -161490,11 +142726,11 @@ class Test_TC_DRLK_2_12 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DRLK_2_12\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DRLK_2_11\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DRLK_2_12\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DRLK_2_11\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -161511,312 +142747,172 @@ class Test_TC_DRLK_2_12 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Create new user\n"); - err = TestCreateNewUser_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Create new user with default parameters\n"); + err = TestCreateNewUserWithDefaultParameters_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the user back and verify its fields\n"); err = TestReadTheUserBackAndVerifyItsFields_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Create new PIN credential and lock/unlock user\n"); - err = TestCreateNewPinCredentialAndLockUnlockUser_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads NumberOfTotalUsersSupported and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.A0011")) { + NextTest(); + return; + } + err = TestThReadsNumberOfTotalUsersSupportedAndSavesForFutureUse_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Verify created PIN credential\n"); - err = TestVerifyCreatedPinCredential_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads MinPINCodeLength and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F00")) { + NextTest(); + return; + } + err = TestThReadsMinPINCodeLengthAndSavesForFutureUse_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 1: TH writes the RequirePINforRemoteOperation attribute value as False on the DUT\n"); - if (ShouldSkip("DRLK.S.F0c && DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads MaxPINCodeLength and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F00")) { NextTest(); return; } - err = TestStep1ThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDut_5(); + err = TestThReadsMaxPINCodeLengthAndSavesForFutureUse_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 1: TH writes the RequirePINforRemoteOperation attribute value as False on the DUT\n"); - if (ShouldSkip("DRLK.S.F0c && DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033.Write")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads MinRFIDCodeLength and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A001a")) { NextTest(); return; } - err = TestStep1ThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDut_6(); + err = TestThReadsMinRFIDCodeLengthAndSavesForFutureUse_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Step 2: TH reads the RequirePINforRemoteOperation attribute from the DUT\n"); - if (ShouldSkip("DRLK.S.F0c && DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads MaxRFIDCodeLength and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A0019")) { NextTest(); return; } - err = TestStep2ThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_7(); + err = TestThReadsMaxRFIDCodeLengthAndSavesForFutureUse_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 3: TH sends Ubolt Door Command to the DUT without PINCode\n"); - if (ShouldSkip("DRLK.S.C27.Rsp && DRLK.S.F0c")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Set Credential Command to DUT with type PIN\n"); + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestStep3ThSendsUboltDoorCommandToTheDutWithoutPINCode_8(); + err = TestThSendsSetCredentialCommandToDutWithTypePin_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4: TH sends Ubolt Door Command to the DUT with PINCode\n"); - if (ShouldSkip("DRLK.S.C27.Rsp && DRLK.S.F0c")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Set Credential Command to DUT with type RFID\n"); + if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestStep4ThSendsUboltDoorCommandToTheDutWithPINCode_9(); + err = TestThSendsSetCredentialCommandToDutWithTypeRfid_9(); break; case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 5: TH writes the RequirePINforRemoteOperation attribute value as true on the DUT\n"); - if (ShouldSkip("DRLK.S.F0c && DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Set Credential Command to DUT with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestStep5ThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_10(); + err = TestThSendsSetCredentialCommandToDutWithTypeFingerVein_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 5: TH writes the RequirePINforRemoteOperation attribute value as true on the DUT\n"); - if (ShouldSkip("DRLK.S.F0c && DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033.Write")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Get Credential Status Command with type PIN\n"); + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestStep5ThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_11(); + err = TestThSendsGetCredentialStatusCommandWithTypePin_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 6: TH reads the RequirePINforRemoteOperation attribute from the DUT\n"); - if (ShouldSkip("DRLK.S.F0c && DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Get Credential Status Command with type RFID\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestStep6ThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_12(); + err = TestThSendsGetCredentialStatusCommandWithTypeRfid_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: TH sends Ubolt Door Command to the DUT with valid PINCode\n"); - if (ShouldSkip("DRLK.S.C27.Rsp && DRLK.S.F0c")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends Get Credential Status Command with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestStep7ThSendsUboltDoorCommandToTheDutWithValidPINCode_13(); + err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_13(); break; case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : Step 8: TH sends Unbolt Door Command to the DUT with Invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C27.Rsp && DRLK.S.F0c")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Clear Credential Command to DUT with type PIN\n"); + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { NextTest(); return; } - err = TestStep8ThSendsUnboltDoorCommandToTheDutWithInvalidPINCode_14(); + err = TestThSendsClearCredentialCommandToDutWithTypePin_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 9: TH sends Unbolt Door Command to the DUT without PINCode\n"); - if (ShouldSkip("DRLK.S.C27.Rsp && DRLK.S.F0c")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Get Credential Status Command with type RFID\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestStep9ThSendsUnboltDoorCommandToTheDutWithoutPINCode_15(); + err = TestThSendsGetCredentialStatusCommandWithTypeRfid_15(); break; case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : Step 10: TH writes WrongCodeEntryLimit attribute value as 3 on the DUT\n"); - if (ShouldSkip("DRLK.S.F0c && ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0030.Write")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Get Credential Status Command with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestStep10ThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDut_16(); + err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_16(); break; case 17: - ChipLogProgress( - chipTool, " ***** Test Step 17 : Step 10: TH writes WrongCodeEntryLimit attribute value as 3 on the DUT\n"); - if (ShouldSkip("DRLK.S.F0c && ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0030.Write")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Clear Credential Command to DUT with type RFID\n"); + if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { NextTest(); return; } - err = TestStep10ThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDut_17(); + err = TestThSendsClearCredentialCommandToDutWithTypeRfid_17(); break; case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 11: TH writes UserCodeTemporaryDisableTime attribute value as 15 Seconds on the DUT " - "and Verify that the DUT sends Success response\n"); - if (ShouldSkip("DRLK.S.F0c && ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031.Write")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : TH sends Get Credential Status Command with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestStep11ThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyThatTheDutSendsSuccessResponse_18(); + err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_18(); break; case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 11: TH writes UserCodeTemporaryDisableTime attribute value as 15 Seconds on the DUT " - "and Verify that the DUT sends Success response\n"); - if (ShouldSkip("DRLK.S.F0c && ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0031.Write")) { - NextTest(); - return; - } - err = TestStep11ThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyThatTheDutSendsSuccessResponse_19(); - break; - case 20: - ChipLogProgress( - chipTool, " ***** Test Step 20 : Step 12a: TH sends Unbolt Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C27.Rsp")) { - NextTest(); - return; - } - err = TestStep12aThSendsUnboltDoorCommandToTheDutWithInvalidPINCode_20(); - break; - case 21: - ChipLogProgress( - chipTool, " ***** Test Step 21 : Step 12b: TH sends Unbolt Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C27.Rsp")) { - NextTest(); - return; - } - err = TestStep12bThSendsUnboltDoorCommandToTheDutWithInvalidPINCode_21(); - break; - case 22: - ChipLogProgress( - chipTool, " ***** Test Step 22 : Step 12c: TH sends Unbolt Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C27.Rsp")) { - NextTest(); - return; - } - err = TestStep12cThSendsUnboltDoorCommandToTheDutWithInvalidPINCode_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : Step 12d: TH sends Unbolt Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C27.Rsp")) { - NextTest(); - return; - } - err = TestStep12dThSendsUnboltDoorCommandToTheDutWithInvalidPINCode_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Step 13: TH reads UserCodedTemporaryDisableTime attribute from DUT\n"); - if (ShouldSkip("DRLK.S.F0c && ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031")) { - NextTest(); - return; - } - err = TestStep13ThReadsUserCodedTemporaryDisableTimeAttributeFromDut_24(); - break; - case 25: - ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 14: TH sends Unbolt Door Command to the DUT with valid PINCode before " - "UserCodeTemporaryDisableTime expires\n"); - if (ShouldSkip("DRLK.S.C27.Rsp")) { - NextTest(); - return; - } - err = TestStep14ThSendsUnboltDoorCommandToTheDutWithValidPINCodeBeforeUserCodeTemporaryDisableTimeExpires_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Wait for UserCodeTemporaryDisableTime expires\n"); - if (ShouldSkip("DRLK.S.F0c && ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031")) { - NextTest(); - return; - } - err = TestWaitForUserCodeTemporaryDisableTimeExpires_26(); - break; - case 27: - ChipLogProgress( - chipTool, " ***** Test Step 27 : Step 15: TH writes AutoRelockTime attribute value as 60 seconds on the DUT\n"); - if (ShouldSkip("DRLK.S.A0023.Write && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestStep15ThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_27(); - break; - case 28: - ChipLogProgress( - chipTool, " ***** Test Step 28 : Step 15: TH writes AutoRelockTime attribute value as 60 seconds on the DUT\n"); - if (ShouldSkip("DRLK.S.A0023.Write && PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestStep15ThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_28(); - break; - case 29: - ChipLogProgress( - chipTool, " ***** Test Step 29 : Step 15: TH writes AutoRelockTime attribute value as 10 seconds on the DUT\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY && !DRLK.S.A0023.Write")) { - NextTest(); - return; - } - err = TestStep15ThWritesAutoRelockTimeAttributeValueAs10SecondsOnTheDut_29(); - break; - case 30: - ChipLogProgress( - chipTool, " ***** Test Step 30 : Step 15: TH writes AutoRelockTime attribute value as 60 seconds on the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && !DRLK.S.A0023.Write")) { - NextTest(); - return; - } - err = TestStep15ThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Step 16: TH reads the AutoRelockTime attribute from the DUT\n"); - if (ShouldSkip("DRLK.S.A0023 && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestStep16ThReadsTheAutoRelockTimeAttributeFromTheDut_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Step 16: TH reads the AutoRelockTime attribute from the DUT\n"); - if (ShouldSkip("DRLK.S.A0023 && PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestStep16ThReadsTheAutoRelockTimeAttributeFromTheDut_32(); - break; - case 33: - ChipLogProgress( - chipTool, " ***** Test Step 33 : Step 17: TH sends the Unbolt Door command to the DUT with valid PINCode\n"); - if (ShouldSkip("DRLK.S.C27.Rsp")) { - NextTest(); - return; - } - err = TestStep17ThSendsTheUnboltDoorCommandToTheDutWithValidPINCode_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Wait for AutoRelockTime Expires\n"); - if (ShouldSkip("DRLK.S.A0023 && PICS_SDK_CI_ONLY")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : TH sends Clear Credential Command to DUT with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { NextTest(); return; } - err = TestWaitForAutoRelockTimeExpires_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Wait for AutoRelockTime Expires\n"); - if (ShouldSkip("DRLK.S.A0023 && PICS_SKIP_SAMPLE_APP")) { + err = TestThSendsClearCredentialCommandToDutWithTypeFingerVein_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends Get Credential Status Command to DUT with type PIN\n"); + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestWaitForAutoRelockTimeExpires_35(); + err = TestThSendsGetCredentialStatusCommandToDutWithTypePin_20(); break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Step 18: TH reads LockState attribute\n"); - if (ShouldSkip("DRLK.S.A0000 && DRLK.S.C01.Rsp")) { + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends Get Credential Status Command to DUT with type RFID\n"); + if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestStep18ThReadsLockStateAttribute_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Cleanup the created user\n"); - err = TestCleanupTheCreatedUser_37(); + err = TestThSendsGetCredentialStatusCommandToDutWithTypeRfid_21(); break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Clean the created credential\n"); - if (ShouldSkip("DRLK.S.C26.Rsp")) { + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends Get Credential Status Command to DUT with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestCleanTheCreatedCredential_38(); + err = TestThSendsGetCredentialStatusCommandToDutWithTypeFingerVein_22(); break; } @@ -161848,7 +142944,7 @@ class Test_TC_DRLK_2_12 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -161863,7 +142959,7 @@ class Test_TC_DRLK_2_12 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -161872,78 +142968,30 @@ class Test_TC_DRLK_2_12 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 37: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 38: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; } @@ -161959,11 +143007,14 @@ class Test_TC_DRLK_2_12 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 39; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mPINCredentialData; + chip::Optional mRFIDCredentialData; + chip::Optional mFingerVeinCredentialData; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -161974,7 +143025,7 @@ class Test_TC_DRLK_2_12 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestCreateNewUser_1() + CHIP_ERROR TestCreateNewUserWithDefaultParameters_1() { MTRBaseDevice * device = GetDevice("alpha"); @@ -161991,7 +143042,7 @@ class Test_TC_DRLK_2_12 : public TestCommandBridge { params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"Create new user Error: %@", err); + NSLog(@"Create new user with default parameters Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -162080,171 +143131,83 @@ class Test_TC_DRLK_2_12 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewPinCredentialAndLockUnlockUser_3() + CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAndSavesForFutureUse_3() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0U]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.userStatus = nil; - params.userType = nil; - [cluster - setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads NumberOfTotalUsersSupported and saves for future use. Error: %@", err); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("NextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("NextCredentialIndex", actualValue, 2U)); - } + VerifyOrReturn(CheckConstraintMinValue("numberOfTotalUsersSupported", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("numberOfTotalUsersSupported", [value unsignedShortValue], 65535U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyCreatedPinCredential_4() + CHIP_ERROR TestThReadsMinPINCodeLengthAndSavesForFutureUse_4() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Verify created PIN credential Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); - VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); - } + [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MinPINCodeLength and saves for future use. Error: %@", err); - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); - } + VerifyOrReturn(CheckConstraintMinValue("minPINCodeLength", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minPINCodeLength", [value unsignedCharValue], 255U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep1ThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDut_5() + CHIP_ERROR TestThReadsMaxPINCodeLengthAndSavesForFutureUse_5() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id requirePINforRemoteOperationArgument; - requirePINforRemoteOperationArgument = [NSNumber numberWithBool:false]; - [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 1: TH writes the RequirePINforRemoteOperation attribute " - @"value as False on the DUT Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep1ThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDut_6() - { + [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MaxPINCodeLength and saves for future use. Error: %@", err); - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - id requirePINforRemoteOperationArgument; - requirePINforRemoteOperationArgument = [NSNumber numberWithBool:false]; - [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 1: TH writes the RequirePINforRemoteOperation attribute " - @"value as False on the DUT Error: %@", - err); + VerifyOrReturn(CheckConstraintMinValue("maxPINCodeLength", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxPINCodeLength", [value unsignedCharValue], 255U)); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2ThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_7() + CHIP_ERROR TestThReadsMinRFIDCodeLengthAndSavesForFutureUse_6() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); + [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MinRFIDCodeLength and saves for future use. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("RequirePINforRemoteOperation", actualValue, false)); - } + VerifyOrReturn(CheckConstraintMinValue("minRFIDCodeLength", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minRFIDCodeLength", [value unsignedCharValue], 255U)); NextTest(); }]; @@ -162252,693 +143215,713 @@ class Test_TC_DRLK_2_12 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ThSendsUboltDoorCommandToTheDutWithoutPINCode_8() + CHIP_ERROR TestThReadsMaxRFIDCodeLengthAndSavesForFutureUse_7() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - [cluster unboltDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 3: TH sends Ubolt Door Command to the DUT without PINCode Error: %@", err); + [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MaxRFIDCodeLength and saves for future use. Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintMinValue("maxRFIDCodeLength", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxRFIDCodeLength", [value unsignedCharValue], 255U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ThSendsUboltDoorCommandToTheDutWithPINCode_9() + CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypePin_8() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; - [cluster unboltDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 4: TH sends Ubolt Door Command to the DUT with PINCode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; + __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - return CHIP_NO_ERROR; - } + params.credentialData = mPINCredentialData.HasValue() + ? [NSData dataWithBytes:mPINCredentialData.Value().data() length:mPINCredentialData.Value().size()] + : [[NSData alloc] initWithBytes:"123456" length:6]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.userStatus = nil; + params.userType = nil; + [cluster + setCredentialWithParams:params + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Set Credential Command to DUT with type PIN Error: %@", err); - CHIP_ERROR TestStep5ThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_10() - { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - id requirePINforRemoteOperationArgument; - requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; - [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 5: TH writes the RequirePINforRemoteOperation attribute " - @"value as true on the DUT Error: %@", - err); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("NextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("NextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_11() + CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypeRfid_9() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id requirePINforRemoteOperationArgument; - requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; - [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 5: TH writes the RequirePINforRemoteOperation attribute " - @"value as true on the DUT Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } + __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - CHIP_ERROR TestStep6ThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_12() - { + params.credentialData = mRFIDCredentialData.HasValue() + ? [NSData dataWithBytes:mRFIDCredentialData.Value().data() length:mRFIDCredentialData.Value().size()] + : [[NSData alloc] initWithBytes:"RFIDTESTDATA" length:12]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.userStatus = nil; + params.userType = nil; + [cluster + setCredentialWithParams:params + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Set Credential Command to DUT with type RFID Error: %@", err); - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6: TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("RequirePINforRemoteOperation", actualValue, true)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("NextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("NextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThSendsUboltDoorCommandToTheDutWithValidPINCode_13() + CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypeFingerVein_10() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; - [cluster unboltDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 7: TH sends Ubolt Door Command to the DUT with valid PINCode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:4U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - NextTest(); - }]; + params.credentialData = mFingerVeinCredentialData.HasValue() + ? [NSData dataWithBytes:mFingerVeinCredentialData.Value().data() length:mFingerVeinCredentialData.Value().size()] + : [[NSData alloc] initWithBytes:"123456" length:6]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.userStatus = nil; + params.userType = nil; + [cluster + setCredentialWithParams:params + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Set Credential Command to DUT with type FingerVein Error: %@", err); - return CHIP_NO_ERROR; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestStep8ThSendsUnboltDoorCommandToTheDutWithInvalidPINCode_14() - { + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); + } - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; - [cluster - unboltDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 8: TH sends Unbolt Door Command to the DUT with Invalid PINCode Error: %@", err); + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("NextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("NextCredentialIndex", actualValue, 2U)); + } - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep9ThSendsUnboltDoorCommandToTheDutWithoutPINCode_15() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypePin_11() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - [cluster - unboltDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 9: TH sends Unbolt Door Command to the DUT without PINCode Error: %@", err); + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Credential Status Command with type PIN Error: %@", err); - return CHIP_NO_ERROR; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestStep10ThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDut_16() - { + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + } - id wrongCodeEntryLimitArgument; - wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; - [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 10: TH writes WrongCodeEntryLimit attribute value as 3 on the " - @"DUT Error: %@", - err); + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); + } - NextTest(); - }]; + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep10ThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDut_17() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeRfid_12() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id wrongCodeEntryLimitArgument; - wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; - [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 10: TH writes WrongCodeEntryLimit attribute value as 3 on the " - @"DUT Error: %@", - err); + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Credential Status Command with type RFID Error: %@", err); - return CHIP_NO_ERROR; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR - TestStep11ThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyThatTheDutSendsSuccessResponse_18() - { + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + } - id userCodeTemporaryDisableTimeArgument; - userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; - [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 11: TH writes UserCodeTemporaryDisableTime attribute " - @"value as 15 Seconds on the DUT and Verify that the DUT sends " - @"Success response Error: %@", - err); + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); + } - NextTest(); - }]; + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep11ThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyThatTheDutSendsSuccessResponse_19() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_13() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id userCodeTemporaryDisableTimeArgument; - userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; - [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 11: TH writes UserCodeTemporaryDisableTime attribute " - @"value as 15 Seconds on the DUT and Verify that the DUT sends " - @"Success response Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep12aThSendsUnboltDoorCommandToTheDutWithInvalidPINCode_20() - { + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:4U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Credential Status Command with type FingerVein Error: %@", err); - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123457" length:6]; - [cluster - unboltDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 12a: TH sends Unbolt Door Command to the DUT with invalid PINCode Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); + } - return CHIP_NO_ERROR; - } + VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + } - CHIP_ERROR TestStep12bThSendsUnboltDoorCommandToTheDutWithInvalidPINCode_21() - { + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); + } - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; - [cluster - unboltDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 12b: TH sends Unbolt Door Command to the DUT with invalid PINCode Error: %@", err); + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); + } - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep12cThSendsUnboltDoorCommandToTheDutWithInvalidPINCode_22() + CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypePin_14() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123459" length:6]; - [cluster - unboltDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 12c: TH sends Unbolt Door Command to the DUT with invalid PINCode Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep12dThSendsUnboltDoorCommandToTheDutWithInvalidPINCode_23() - { + __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear Credential Command to DUT with type PIN Error: %@", err); - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123460" length:6]; - [cluster - unboltDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 12d: TH sends Unbolt Door Command to the DUT with invalid PINCode Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep13ThReadsUserCodedTemporaryDisableTimeAttributeFromDut_24() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeRfid_15() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 13: TH reads UserCodedTemporaryDisableTime attribute from DUT Error: %@", err); + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Credential Status Command with type RFID Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("UserCodeTemporaryDisableTime", actualValue, 15U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); + } - return CHIP_NO_ERROR; - } + VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + } - CHIP_ERROR TestStep14ThSendsUnboltDoorCommandToTheDutWithValidPINCodeBeforeUserCodeTemporaryDisableTimeExpires_25() - { + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); + } - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; - [cluster - unboltDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 14: TH sends Unbolt Door Command to the DUT with valid PINCode before " - @"UserCodeTemporaryDisableTime expires Error: %@", - err); + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); + } - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWaitForUserCodeTemporaryDisableTimeExpires_26() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 15000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestStep15ThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_27() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_16() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id autoRelockTimeArgument; - autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:10UL]; - [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 15: TH writes AutoRelockTime attribute value as 60 seconds on the DUT " - @"Error: %@", - err); + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:4U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Credential Status Command with type FingerVein Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - return CHIP_NO_ERROR; - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); + } - CHIP_ERROR TestStep15ThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_28() - { + VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); + } - id autoRelockTimeArgument; - autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; - [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 15: TH writes AutoRelockTime attribute value as 60 seconds on the DUT " - @"Error: %@", - err); + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep15ThWritesAutoRelockTimeAttributeValueAs10SecondsOnTheDut_29() + CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypeRfid_17() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id autoRelockTimeArgument; - autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:10UL]; - [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 15: TH writes AutoRelockTime attribute value as 10 seconds on the DUT " - @"Error: %@", - err); + __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear Credential Command to DUT with type RFID Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep15ThWritesAutoRelockTimeAttributeValueAs60SecondsOnTheDut_30() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_18() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id autoRelockTimeArgument; - autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; - [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 15: TH writes AutoRelockTime attribute value as 60 seconds on the DUT " - @"Error: %@", - err); + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:4U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Credential Status Command with type FingerVein Error: %@", err); - return CHIP_NO_ERROR; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestStep16ThReadsTheAutoRelockTimeAttributeFromTheDut_31() - { + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("CredentialExists", actualValue, true)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("UserIndex", actualValue)); + VerifyOrReturn(CheckValue("UserIndex", actualValue, 1U)); + } - [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 16: TH reads the AutoRelockTime attribute from the DUT Error: %@", err); + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("CreatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("CreatorFabricIndex", actualValue, 1U)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("LastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("LastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("AutoRelockTime", actualValue, 10UL)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep16ThReadsTheAutoRelockTimeAttributeFromTheDut_32() + CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypeFingerVein_19() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 16: TH reads the AutoRelockTime attribute from the DUT Error: %@", err); + __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:4U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear Credential Command to DUT with type FingerVein Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AutoRelockTime", actualValue, 60UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep17ThSendsTheUnboltDoorCommandToTheDutWithValidPINCode_33() + CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypePin_20() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; - [cluster unboltDoorWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 17: TH sends the Unbolt Door command to the DUT with valid PINCode Error: %@", err); + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Credential Status Command to DUT with type PIN Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - return CHIP_NO_ERROR; - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("CredentialExists", actualValue, false)); + } - CHIP_ERROR TestWaitForAutoRelockTimeExpires_34() - { + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); + } - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("CreatorFabricIndex", actualValue)); + } - CHIP_ERROR TestWaitForAutoRelockTimeExpires_35() - { + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("LastModifiedFabricIndex", actualValue)); + } - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 60000UL; - return WaitForMs("alpha", value); + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep18ThReadsLockStateAttribute_36() + CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypeRfid_21() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 18: TH reads LockState attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LockState", actualValue)); - VerifyOrReturn(CheckValue("LockState", actualValue, 1U)); - } + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Credential Status Command to DUT with type RFID Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - return CHIP_NO_ERROR; - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("CredentialExists", actualValue, false)); + } - CHIP_ERROR TestCleanupTheCreatedUser_37() - { + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("CreatorFabricIndex", actualValue)); + } - __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearUserWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user Error: %@", err); + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("LastModifiedFabricIndex", actualValue)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanTheCreatedCredential_38() + CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypeFingerVein_22() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; - ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:4U]; ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Clean the created credential Error: %@", err); + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Credential Status Command to DUT with type FingerVein Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("CredentialExists", actualValue, false)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("CreatorFabricIndex", actualValue)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("LastModifiedFabricIndex", actualValue)); + } - NextTest(); - }]; + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("NextCredentialIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -164474,1116 +145457,97 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 48; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mPayload; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForAlpha_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestOpenCommissioningWindowFromAlpha_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from alpha Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCommissionFromBeta_2() - { - - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_3() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("beta", value); - } - - CHIP_ERROR TestReadMaxGroupsPerFabric_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read maxGroupsPerFabric Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("maxGroupsPerFabric", [value unsignedShortValue], 4U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadMaxGroupKeysPerFabric_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read maxGroupKeysPerFabric Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("maxGroupKeysPerFabric", [value unsignedShortValue], 3U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWrite1_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:1110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:1110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWrite2CacheAndSync_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:1U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 2 CacheAndSync Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWrite2TrustFirst_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 2 TrustFirst Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWrite3CacheAndSync_9() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:1U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:" !\042#$%&'()*+,-./" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 3 CacheAndSync Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWrite3TrustFirst_10() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:" !\042#$%&'()*+,-./" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 3 TrustFirst Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetRead_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - [cluster - keySetReadWithParams:params - completion:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.groupKeySet; - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); - VerifyOrReturn(CheckValueNull( - "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); - VerifyOrReturn(CheckValue("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 1110000ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); - VerifyOrReturn(CheckValue("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 1110001ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); - VerifyOrReturn(CheckValue("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 1110002ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetReadAllIndices_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster keySetReadAllIndicesWithCompletion:^( - MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read All Indices Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintContains("groupKeySetIDs", values.groupKeySetIDs, 417U)); - VerifyOrReturn(CheckConstraintContains("groupKeySetIDs", values.groupKeySetIDs, 418U)); - VerifyOrReturn(CheckConstraintContains("groupKeySetIDs", values.groupKeySetIDs, 0U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteGroupKeysInvalid_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id groupKeyMapArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:0U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - groupKeyMapArgument = temp_0; - } - [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys (invalid) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteGroupKeysTooMany_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id groupKeyMapArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:257U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupId = [NSNumber numberWithUnsignedShort:257U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[2] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[3] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[4] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[4]).groupId = [NSNumber numberWithUnsignedShort:259U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[4]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[4]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[5] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[5]).groupId = [NSNumber numberWithUnsignedShort:259U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[5]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[5]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[6] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[6]).groupId = [NSNumber numberWithUnsignedShort:260U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[6]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[6]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[7] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[7]).groupId = [NSNumber numberWithUnsignedShort:260U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[7]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[7]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[8] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[8]).groupId = [NSNumber numberWithUnsignedShort:261U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[8]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[8]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[9] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[9]).groupId = [NSNumber numberWithUnsignedShort:261U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[9]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[9]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[10] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[10]).groupId = [NSNumber numberWithUnsignedShort:262U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[10]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[10]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[11] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[11]).groupId = [NSNumber numberWithUnsignedShort:262U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[11]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[11]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[12] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[12]).groupId = [NSNumber numberWithUnsignedShort:263U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[12]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[12]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[13] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[13]).groupId = [NSNumber numberWithUnsignedShort:263U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[13]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[13]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - groupKeyMapArgument = temp_0; - } - [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys (too many) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteGroupKeysOnAlpha_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id groupKeyMapArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:257U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[2] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupId = [NSNumber numberWithUnsignedShort:259U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[3] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupId = [NSNumber numberWithUnsignedShort:260U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - groupKeyMapArgument = temp_0; - } - [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys on alpha Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteGroupKeysOnBeta_16() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id groupKeyMapArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupId = [NSNumber numberWithUnsignedShort:259U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[2] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupId = [NSNumber numberWithUnsignedShort:260U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[3] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupId = [NSNumber numberWithUnsignedShort:261U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - groupKeyMapArgument = temp_0; - } - [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys on beta Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupKeysOnAlpha_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Group Keys on alpha Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, - 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, - 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, - 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupId, 260U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupKeySetID, - 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).fabricIndex, - 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = false; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Group Keys on alpha without fabric filtering Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(8))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, - 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, - 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, - 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupId, 260U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupKeySetID, - 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).groupId, 260U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).groupId, 261U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).fabricIndex, - 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupKeysOnBeta_19() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Group Keys on beta Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 260U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupId, 261U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).fabricIndex, - 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_20() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = false; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Group Keys on beta without fabric filtering Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(8))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, - 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, - 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, - 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupId, 260U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupKeySetID, - 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).groupId, 260U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).groupId, 261U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).fabricIndex, - 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestAddGroup1_21() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:257U]; - params.groupName = @"Group #1"; - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestAddGroup2_22() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:258U]; - params.groupName = @"Group #2"; - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 2 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 258U)); - } - - NextTest(); - }]; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestAddGroup3_23() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:259U]; - params.groupName = @"Group #3"; - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 3 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 48; - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mPayload; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForAlpha_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestAddGroup4_24() + CHIP_ERROR TestOpenCommissioningWindowFromAlpha_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:260U]; - params.groupName = @"Group #4"; - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 4 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + [cluster openBasicCommissioningWindowWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Open Commissioning Window from alpha Error: %@", err); - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 260U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup5_25() + CHIP_ERROR TestCommissionFromBeta_2() { - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:261U]; - params.groupName = @"Group #5"; - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 5 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 261U)); - } + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode("beta", value); + } - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_3() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("beta", value); } - CHIP_ERROR TestReadGroupTableFromAlpha_26() + CHIP_ERROR TestReadMaxGroupsPerFabric_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -165592,87 +145556,20 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable from alpha Error: %@", err); + [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read maxGroupsPerFabric Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Group #1")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[1]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, - @"Group #2")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[2]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupName, - @"Group #3")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupId, 260U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[3]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupName, - @"Group #4")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).fabricIndex, - 1U)); - } + VerifyOrReturn(CheckConstraintMinValue("maxGroupsPerFabric", [value unsignedShortValue], 4U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_27() + CHIP_ERROR TestReadMaxGroupKeysPerFabric_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -165681,250 +145578,100 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = false; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable from alpha without fabric filtering Error: %@", err); + [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read maxGroupKeysPerFabric Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(5))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Group #1")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[1]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, - @"Group #2")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[2]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupName, - @"Group #3")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupId, 260U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[3]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupName, - @"Group #4")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).groupId, 261U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[4]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).groupName, - @"Group #5")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).fabricIndex, - 2U)); - } + VerifyOrReturn(CheckConstraintMinValue("maxGroupKeysPerFabric", [value unsignedShortValue], 3U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBeta_28() + CHIP_ERROR TestKeySetWrite1_6() { - MTRBaseDevice * device = GetDevice("beta"); + MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable from beta Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1110002ULL]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Write 1 Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 261U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Group #5")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, - 2U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_29() + CHIP_ERROR TestKeySetWrite2CacheAndSync_7() { - MTRBaseDevice * device = GetDevice("beta"); + MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = false; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable from beta without fabric filtering Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:1U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:2110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:2110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:2110002ULL]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Write 2 CacheAndSync Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(5))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Group #1")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[1]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, - @"Group #2")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[2]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupName, - @"Group #3")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupId, 260U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[3]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupName, - @"Group #4")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).groupId, 261U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[4]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).groupName, - @"Group #5")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).fabricIndex, - 2U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove1_30() + CHIP_ERROR TestKeySetWrite2TrustFirst_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -165933,99 +145680,118 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Remove 1 Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:2110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:2110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:2110002ULL]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Write 2 TrustFirst Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadRemoved_31() + CHIP_ERROR TestKeySetWrite3CacheAndSync_9() { - MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseDevice * device = GetDevice("beta"); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - [cluster - keySetReadWithParams:params - completion:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read (removed) Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:419U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:1U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:2110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:2110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:" !\042#$%&'()*+,-./" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:2110002ULL]; - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_NOT_FOUND)); - NextTest(); - }]; + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Write 3 CacheAndSync Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_32() + CHIP_ERROR TestKeySetWrite3TrustFirst_10() { - MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseDevice * device = GetDevice("beta"); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - [cluster - keySetReadWithParams:params - completion:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read (not removed) CacheAndSync Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:419U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:2110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:2110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:" !\042#$%&'()*+,-./" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:2110002ULL]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Write 3 TrustFirst Error: %@", err); - { - id actualValue = values.groupKeySet; - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 1U)); - VerifyOrReturn(CheckValueNull( - "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); - VerifyOrReturn(CheckValue("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2110000ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); - VerifyOrReturn(CheckValue("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2110001ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); - VerifyOrReturn(CheckValue("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2110002ULL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_33() + CHIP_ERROR TestKeySetRead_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -166035,19 +145801,19 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; [cluster keySetReadWithParams:params completion:^( MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read (not removed) TrustFirst Error: %@", err); + NSLog(@"KeySet Read Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = values.groupKeySet; VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 418U)); + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 417U)); VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); VerifyOrReturn(CheckValueNull( @@ -166055,19 +145821,19 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValueNonNull("EpochStartTime0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); VerifyOrReturn(CheckValue("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2110000ULL)); + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 1110000ULL)); VerifyOrReturn(CheckValueNull( "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); VerifyOrReturn(CheckValueNonNull("EpochStartTime1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); VerifyOrReturn(CheckValue("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2110001ULL)); + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 1110001ULL)); VerifyOrReturn(CheckValueNull( "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); VerifyOrReturn(CheckValueNonNull("EpochStartTime2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); VerifyOrReturn(CheckValue("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2110002ULL)); + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 1110002ULL)); } NextTest(); @@ -166076,38 +145842,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveGroup1_34() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:257U]; - [cluster removeGroupWithParams:params - completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove Group 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupTable2_35() + CHIP_ERROR TestKeySetReadAllIndices_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -166116,90 +145851,23 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable 2 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 258U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Group #2")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[1]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, - @"Group #3")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupId, 260U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[2]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupName, - @"Group #4")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).fabricIndex, - 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestRemoveAll_36() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Remove All Error: %@", err); + [cluster keySetReadAllIndicesWithCompletion:^( + MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"KeySet Read All Indices Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintContains("groupKeySetIDs", values.groupKeySetIDs, 417U)); + VerifyOrReturn(CheckConstraintContains("groupKeySetIDs", values.groupKeySetIDs, 418U)); + VerifyOrReturn(CheckConstraintContains("groupKeySetIDs", values.groupKeySetIDs, 0U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable3_37() + CHIP_ERROR TestWriteGroupKeysInvalid_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -166208,27 +145876,33 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable 3 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id groupKeyMapArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:258U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:0U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(0))); - } + groupKeyMapArgument = temp_0; + } + [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write Group Keys (invalid) Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove2_38() + CHIP_ERROR TestWriteGroupKeysTooMany_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -166237,88 +145911,98 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Remove 2 Error: %@", err); + id groupKeyMapArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:257U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + temp_0[1] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupId = [NSNumber numberWithUnsignedShort:257U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - NextTest(); - }]; + temp_0[2] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupId = [NSNumber numberWithUnsignedShort:258U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - return CHIP_NO_ERROR; - } + temp_0[3] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupId = [NSNumber numberWithUnsignedShort:258U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - CHIP_ERROR TestKeySetReadAlsoRemoved_39() - { + temp_0[4] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[4]).groupId = [NSNumber numberWithUnsignedShort:259U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[4]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[4]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + temp_0[5] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[5]).groupId = [NSNumber numberWithUnsignedShort:259U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[5]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[5]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - [cluster - keySetReadWithParams:params - completion:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read (also removed) Error: %@", err); + temp_0[6] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[6]).groupId = [NSNumber numberWithUnsignedShort:260U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[6]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[6]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_NOT_FOUND)); - NextTest(); - }]; + temp_0[7] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[7]).groupId = [NSNumber numberWithUnsignedShort:260U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[7]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[7]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - return CHIP_NO_ERROR; - } + temp_0[8] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[8]).groupId = [NSNumber numberWithUnsignedShort:261U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[8]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[8]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - CHIP_ERROR TestKeySetWrite1_40() - { + temp_0[9] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[9]).groupId = [NSNumber numberWithUnsignedShort:261U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[9]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[9]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + temp_0[10] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[10]).groupId = [NSNumber numberWithUnsignedShort:262U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[10]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[10]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:1110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:1110002ULL]; + temp_0[11] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[11]).groupId = [NSNumber numberWithUnsignedShort:262U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[11]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[11]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 1 Error: %@", err); + temp_0[12] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[12]).groupId = [NSNumber numberWithUnsignedShort:263U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[12]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[12]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + temp_0[13] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[13]).groupId = [NSNumber numberWithUnsignedShort:263U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[13]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[13]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - NextTest(); - }]; + groupKeyMapArgument = temp_0; + } + [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write Group Keys (too many) Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2CacheAndSync_41() + CHIP_ERROR TestWriteGroupKeysOnAlpha_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -166327,81 +146011,47 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:1U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 2 CacheAndSync Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } + id groupKeyMapArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:257U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - CHIP_ERROR TestKeySetWrite2TrustFirst_42() - { + temp_0[1] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupId = [NSNumber numberWithUnsignedShort:258U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + temp_0[2] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupId = [NSNumber numberWithUnsignedShort:259U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2110002ULL]; + temp_0[3] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupId = [NSNumber numberWithUnsignedShort:260U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 2 TrustFirst Error: %@", err); + groupKeyMapArgument = temp_0; + } + [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write Group Keys on alpha Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_43() + CHIP_ERROR TestWriteGroupKeysOnBeta_16() { - MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseDevice * device = GetDevice("beta"); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; @@ -166411,25 +146061,30 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:257U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:258U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; temp_0[1] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupId = [NSNumber numberWithUnsignedShort:259U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; temp_0[2] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupId = [NSNumber numberWithUnsignedShort:260U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + temp_0[3] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupId = [NSNumber numberWithUnsignedShort:261U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + groupKeyMapArgument = temp_0; } [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument completion:^(NSError * _Nullable err) { - NSLog(@"Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2 Error: %@", err); + NSLog(@"Write Group Keys on beta Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -166439,7 +146094,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset1_44() + CHIP_ERROR TestReadGroupKeysOnAlpha_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -166448,21 +146103,60 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Remove keyset 1 Error: %@", err); + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupKeyMapWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Group Keys on alpha Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn( + CheckValue("GroupKeyMap", [actualValue count], static_cast(4))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 257U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, + 417U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 258U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, + 418U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 259U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, + 417U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupId, 260U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupKeySetID, + 418U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).fabricIndex, + 1U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_45() + CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -166472,26 +146166,82 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; + params.filterByFabric = false; [cluster readAttributeGroupKeyMapWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH verifies GroupKeyMap entries for KeySet 1 have been removed Error: %@", err); + NSLog(@"Read Group Keys on alpha without fabric filtering Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(1))); + CheckValue("GroupKeyMap", [actualValue count], static_cast(8))); VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 258U)); + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 257U)); VerifyOrReturn(CheckValue("GroupKeySetID", ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, - 418U)); + 417U)); VerifyOrReturn(CheckValue("FabricIndex", ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 258U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, + 418U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 259U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, + 417U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupId, 260U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupKeySetID, + 418U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).groupId, 258U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).groupKeySetID, + 419U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).fabricIndex, + 2U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).groupId, 259U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).groupKeySetID, + 419U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).fabricIndex, + 2U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).groupId, 260U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).groupKeySetID, + 419U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).fabricIndex, + 2U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).groupId, 261U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).groupKeySetID, + 419U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).fabricIndex, + 2U)); } NextTest(); @@ -166500,51 +146250,154 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset2_46() + CHIP_ERROR TestReadGroupKeysOnBeta_19() { - MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseDevice * device = GetDevice("beta"); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Remove keyset 2 Error: %@", err); + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupKeyMapWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Group Keys on beta Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn( + CheckValue("GroupKeyMap", [actualValue count], static_cast(4))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 258U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, + 419U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, + 2U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 259U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, + 419U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, + 2U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 260U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, + 419U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, + 2U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupId, 261U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupKeySetID, + 419U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).fabricIndex, + 2U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_47() + CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_20() { - MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseDevice * device = GetDevice("beta"); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; + params.filterByFabric = false; [cluster readAttributeGroupKeyMapWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH verifies GroupKeyMap entries for KeySet 2 have been removed Error: %@", err); + NSLog(@"Read Group Keys on beta without fabric filtering Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(0))); + CheckValue("GroupKeyMap", [actualValue count], static_cast(8))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 257U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, + 417U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 258U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, + 418U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 259U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, + 417U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupId, 260U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupKeySetID, + 418U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).groupId, 258U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).groupKeySetID, + 419U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).fabricIndex, + 2U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).groupId, 259U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).groupKeySetID, + 419U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).fabricIndex, + 2U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).groupId, 260U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).groupKeySetID, + 419U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).fabricIndex, + 2U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).groupId, 261U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).groupKeySetID, + 419U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).fabricIndex, + 2U)); } NextTest(); @@ -166552,1001 +146405,1143 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } -}; -class Test_TC_G_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_G_1_1() - : TestCommandBridge("Test_TC_G_1_1") - , mTestIndex(0) + CHIP_ERROR TestAddGroup1_21() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_G_1_1() {} + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; + __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:257U]; + params.groupName = @"Group #1"; + [cluster addGroupWithParams:params + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Add Group 1 Error: %@", err); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_G_1_1\n"); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_G_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - Wait(); + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); + } - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); - err = TestThReadsTheClusterRevisionFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - if (ShouldSkip(" !G.S.F00 ")) { - NextTest(); - return; - } - err = TestThReadsTheFeatureMapFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Given G.S.F00 ensure featuremap has the correct bit set\n"); - if (ShouldSkip("G.S.F00")) { - NextTest(); - return; - } - err = TestGivenGsf00EnsureFeaturemapHasTheCorrectBitSet_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AttributeList from DUT\n"); - err = TestThReadsAttributeListFromDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads EventList from DUT\n"); - err = TestThReadsEventListFromDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads AcceptedCommandList from DUT\n"); - err = TestThReadsAcceptedCommandListFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads GeneratedCommandList from DUT\n"); - err = TestThReadsGeneratedCommandListFromDut_7(); - break; - } + NextTest(); + }]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestAddGroup2_22() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:258U]; + params.groupName = @"Group #2"; + [cluster addGroupWithParams:params + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Add Group 2 Error: %@", err); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 258U)); + } - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestAddGroup3_23() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:259U]; + params.groupName = @"Group #3"; + [cluster addGroupWithParams:params + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Add Group 3 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestAddGroup4_24() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:260U]; + params.groupName = @"Group #4"; + [cluster addGroupWithParams:params + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Add Group 4 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 260U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenGsf00EnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestAddGroup5_25() { - MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseDevice * device = GetDevice("beta"); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given G.S.F00 ensure featuremap has the correct bit set Error: %@", err); + __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:261U]; + params.groupName = @"Group #5"; + [cluster addGroupWithParams:params + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Add Group 5 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 261U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAttributeListFromDut_4() + CHIP_ERROR TestReadGroupTableFromAlpha_26() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AttributeList from DUT Error: %@", err); + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read GroupTable from alpha Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(4))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 257U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[0]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, + @"Group #1")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 258U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[1]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, + @"Group #2")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupId, 259U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[2]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupName, + @"Group #3")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupId, 260U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[3]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupName, + @"Group #4")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).fabricIndex, + 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEventListFromDut_5() + CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_27() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList from DUT Error: %@", err); + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = false; + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read GroupTable from alpha without fabric filtering Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 257U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[0]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, + @"Group #1")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 258U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[1]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, + @"Group #2")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupId, 259U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[2]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupName, + @"Group #3")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupId, 260U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[3]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupName, + @"Group #4")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).groupId, 261U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[4]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).groupName, + @"Group #5")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).fabricIndex, + 2U)); + } - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_6() + CHIP_ERROR TestReadGroupTableFromBeta_28() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + MTRBaseDevice * device = GetDevice("beta"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read GroupTable from beta Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 261U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[0]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, + @"Group #5")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, + 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsGeneratedCommandListFromDut_7() + CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_29() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + MTRBaseDevice * device = GetDevice("beta"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = false; + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read GroupTable from beta without fabric filtering Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 257U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[0]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, + @"Group #1")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 258U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[1]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, + @"Group #2")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupId, 259U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[2]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupName, + @"Group #3")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupId, 260U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[3]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupName, + @"Group #4")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).groupId, 261U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[4]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).groupName, + @"Group #5")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).fabricIndex, + 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } -}; - -class Test_TC_ACFREMON_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ACFREMON_1_1() - : TestCommandBridge("Test_TC_ACFREMON_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ACFREMON_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestKeySetRemove1_30() { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ACFREMON_1_1\n"); - } - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ACFREMON_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("!ACFREMON.S.F00 && !ACFREMON.S.F01")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Given ACFREMON.S.F00(Condition) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("ACFREMON.S.F00")) { - NextTest(); - return; - } - err = TestGivenACFREMONSF00ConditionEnsureFeaturemapHasTheCorrectBitSet_3(); - break; - case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Given ACFREMON.S.F01(Warning) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("ACFREMON.S.F01")) { - NextTest(); - return; - } - err = TestGivenACFREMONSF01WarningEnsureFeaturemapHasTheCorrectBitSet_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Read the feature dependent(ACFREMON.S.F00) attribute in AttributeList\n"); - if (ShouldSkip("ACFREMON.S.F00")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentACFREMONSF00AttributeInAttributeList_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList\n"); - if (ShouldSkip("ACFREMON.S.A0002")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0002InAttributeList_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional command (ResetCondition) in AcceptedCommandList\n"); - if (ShouldSkip("ACFREMON.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestReadTheOptionalCommandResetConditionInAcceptedCommandList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads EventList attribute from DUT\n"); - err = TestThReadsEventListAttributeFromDut_11(); - break; - } + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + [cluster keySetRemoveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Remove 1 Error: %@", err); - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } + NextTest(); + }]; - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestKeySetReadRemoved_31() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + [cluster + keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"KeySet Read (removed) Error: %@", err); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_NOT_FOUND)); + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_32() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + [cluster + keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"KeySet Read (not removed) CacheAndSync Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } + { + id actualValue = values.groupKeySet; + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 418U)); + VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 1U)); + VerifyOrReturn(CheckValueNull( + "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); + VerifyOrReturn(CheckValue("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2110000ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); + VerifyOrReturn(CheckValue("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2110001ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); + VerifyOrReturn(CheckValue("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2110002ULL)); + } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_33() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + [cluster + keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"KeySet Read (not removed) TrustFirst Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + { + id actualValue = values.groupKeySet; + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 418U)); + VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); + VerifyOrReturn(CheckValueNull( + "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); + VerifyOrReturn(CheckValue("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2110000ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); + VerifyOrReturn(CheckValue("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2110001ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); + VerifyOrReturn(CheckValue("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2110002ULL)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenACFREMONSF00ConditionEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestRemoveGroup1_34() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given ACFREMON.S.F00(Condition) ensure featuremap has the correct bit set Error: %@", err); + __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:257U]; + [cluster removeGroupWithParams:params + completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Remove Group 1 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenACFREMONSF01WarningEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestReadGroupTable2_35() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given ACFREMON.S.F01(Warning) ensure featuremap has the correct bit set Error: %@", err); + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read GroupTable 2 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 258U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[0]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, + @"Group #2")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 259U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[1]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, + @"Group #3")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupId, 260U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[2]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).endpoints[0], + 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupName, + @"Group #4")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).fabricIndex, + 1U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestRemoveAll_36() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Remove All Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentACFREMONSF00AttributeInAttributeList_6() + CHIP_ERROR TestReadGroupTable3_37() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent(ACFREMON.S.F00) attribute in AttributeList Error: %@", err); + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read GroupTable 3 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(0))); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0002InAttributeList_7() + CHIP_ERROR TestKeySetRemove2_38() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + [cluster keySetRemoveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Remove 2 Error: %@", err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_8() + CHIP_ERROR TestKeySetReadAlsoRemoved_39() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + [cluster + keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"KeySet Read (also removed) Error: %@", err); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_NOT_FOUND)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandResetConditionInAcceptedCommandList_9() + CHIP_ERROR TestKeySetWrite1_40() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command (ResetCondition) in AcceptedCommandList Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1110002ULL]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Write 1 Error: %@", err); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_10() + CHIP_ERROR TestKeySetWrite2CacheAndSync_41() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:1U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:2110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:2110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:2110002ULL]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Write 2 CacheAndSync Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEventListAttributeFromDut_11() + CHIP_ERROR TestKeySetWrite2TrustFirst_42() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList attribute from DUT Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:2110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:2110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:2110002ULL]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Write 2 TrustFirst Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } -}; - -class Test_TC_ACFREMON_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ACFREMON_2_1() - : TestCommandBridge("Test_TC_ACFREMON_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_ACFREMON_2_1() {} - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_43() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ACFREMON_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ACFREMON_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - Wait(); + id groupKeyMapArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:257U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the Condition attribute.\n"); - if (ShouldSkip("ACFREMON.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheConditionAttribute_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the DegradationDirection attribute..\n"); - if (ShouldSkip("ACFREMON.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheDegradationDirectionAttribute_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the ChangeIndication attribute.\n"); - if (ShouldSkip("ACFREMON.S.A0002")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheChangeIndicationAttribute_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the InPlaceIndicator attribute\n"); - if (ShouldSkip("ACFREMON.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheInPlaceIndicatorAttribute_4(); - break; - } + temp_0[1] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupId = [NSNumber numberWithUnsignedShort:258U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } + temp_0[2] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupId = [NSNumber numberWithUnsignedShort:258U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; + groupKeyMapArgument = temp_0; } + [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2 Error: %@", err); - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheConditionAttribute_1() + CHIP_ERROR TestRemoveKeyset1_44() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the Condition attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; + [cluster keySetRemoveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Remove keyset 1 Error: %@", err); - VerifyOrReturn(CheckConstraintType("condition", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("condition", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("condition", [value unsignedCharValue], 100U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheDegradationDirectionAttribute_2() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_45() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the DegradationDirection attribute.. Error: %@", err); + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupKeyMapWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH verifies GroupKeyMap entries for KeySet 1 have been removed Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("degradationDirection", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("degradationDirection", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("degradationDirection", [value unsignedCharValue], 1U)); + { + id actualValue = value; + VerifyOrReturn( + CheckValue("GroupKeyMap", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 258U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, + 418U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, + 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheChangeIndicationAttribute_3() + CHIP_ERROR TestRemoveKeyset2_46() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the ChangeIndication attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + [cluster keySetRemoveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Remove keyset 2 Error: %@", err); - VerifyOrReturn(CheckConstraintType("changeIndication", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("changeIndication", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("changeIndication", [value unsignedCharValue], 2U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheInPlaceIndicatorAttribute_4() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_47() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the InPlaceIndicator attribute Error: %@", err); + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupKeyMapWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH verifies GroupKeyMap entries for KeySet 2 have been removed Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("inPlaceIndicator", "boolean", "boolean")); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn( + CheckValue("GroupKeyMap", [actualValue count], static_cast(0))); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { +class Test_TC_G_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_HEPAFREMON_1_1() - : TestCommandBridge("Test_TC_HEPAFREMON_1_1") + Test_TC_G_1_1() + : TestCommandBridge("Test_TC_G_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -167556,7 +147551,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_HEPAFREMON_1_1() {} + ~Test_TC_G_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -167564,11 +147559,11 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_HEPAFREMON_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_G_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_HEPAFREMON_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_G_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -167585,76 +147580,40 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("!HEPAFREMON.S.F00 && !HEPAFREMON.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip(" !G.S.F00 ")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMap_2(); + err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Given HEPAFREMON.S.F00(Condition) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("HEPAFREMON.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Given G.S.F00 ensure featuremap has the correct bit set\n"); + if (ShouldSkip("G.S.F00")) { NextTest(); return; } - err = TestGivenHEPAFREMONSF00ConditionEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestGivenGsf00EnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Given HEPAFREMON.S.F01(Warning) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("HEPAFREMON.S.F01")) { - NextTest(); - return; - } - err = TestGivenHEPAFREMONSF01WarningEnsureFeaturemapHasTheCorrectBitSet_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads EventList from DUT\n"); + NextTest(); + return; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList\n"); - if (ShouldSkip("HEPAFREMON.S.F00")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in AttributeList\n"); - if (ShouldSkip("HEPAFREMON.S.A0002")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0002InAttributeList_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional command (ResetCondition) in AcceptedCommandList\n"); - if (ShouldSkip("HEPAFREMON.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestReadTheOptionalCommandResetConditionInAcceptedCommandList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads EventList attribute from DUT\n"); - err = TestThReadsEventListAttributeFromDut_11(); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_7(); break; } @@ -167691,18 +147650,6 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -167716,7 +147663,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -167731,23 +147678,21 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -167757,17 +147702,15 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -167783,38 +147726,15 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGivenHEPAFREMONSF00ConditionEnsureFeaturemapHasTheCorrectBitSet_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given HEPAFREMON.S.F00(Condition) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestGivenHEPAFREMONSF01WarningEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestGivenGsf00EnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Given HEPAFREMON.S.F01(Warning) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Given G.S.F00 ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -167825,22 +147745,20 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -167854,90 +147772,25 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0002InAttributeList_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalCommandResetConditionInAcceptedCommandList_9() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional command (ResetCondition) in AcceptedCommandList Error: %@", err); + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); NextTest(); }]; @@ -167945,274 +147798,24 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_10() + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsEventListAttributeFromDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EventList attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_HEPAFREMON_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_HEPAFREMON_2_1() - : TestCommandBridge("Test_TC_HEPAFREMON_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_HEPAFREMON_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_HEPAFREMON_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_HEPAFREMON_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the Condition attribute.\n"); - if (ShouldSkip("HEPAFREMON.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheConditionAttribute_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the DegradationDirection attribute..\n"); - if (ShouldSkip("HEPAFREMON.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheDegradationDirectionAttribute_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the ChangeIndication attribute.\n"); - if (ShouldSkip("HEPAFREMON.S.A0002")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheChangeIndicationAttribute_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the InPlaceIndicator attribute\n"); - if (ShouldSkip("HEPAFREMON.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheInPlaceIndicatorAttribute_4(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsFromTheDutTheConditionAttribute_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the Condition attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("condition", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("condition", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("condition", [value unsignedCharValue], 100U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheDegradationDirectionAttribute_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the DegradationDirection attribute.. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("degradationDirection", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("degradationDirection", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("degradationDirection", [value unsignedCharValue], 1U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheChangeIndicationAttribute_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the ChangeIndication attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("changeIndication", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("changeIndication", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("changeIndication", [value unsignedCharValue], 2U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheInPlaceIndicatorAttribute_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the InPlaceIndicator attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); - VerifyOrReturn(CheckConstraintType("inPlaceIndicator", "boolean", "boolean")); NextTest(); }]; @@ -168237,8 +147840,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -168261,26 +147862,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -168297,7 +147878,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -168466,14 +148046,9 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), #endif // CONFIG_ENABLE_YAML_TESTS };